I use a config with just one panel at the bottom, and encountered the following bug:
1) Start e.g. Thunar, mousepad, terminal - whatever to have a regular, not maximized, yet maximizable window
2) Catch the window (vertically) with the mouse in the middle of its titlebar. Drag this window to the top edge of the screen - the window gets maximized. Don't release the button immediately.
3) While still holding the mouse button down (i.e. still dragging) move the cursor couple of pixels down from the very top edge. The window will still be in maximized state (this behaviour is welcomed and ok). Now release the button. You have a maximized window. So far so good.
4) Now move the mouse cursor to the very top of the screen, then press and hold LMB and (slowly) drag the mouse down. For the first 10pixels or so (for about half the titlebar height), the window would erratically, repeatedly, very quickly switch back and forth between unmaximized/maximized case (this is bug#1). After dragging downwards enough, the windows finally becomes unmaximized, but sometimes the mouse cursor is completely off (e.g. half screen to the right) of the window title bar, which severely limits the places where the (now unmaximized) window could be moved to (this is bug #2).
While this might seem contrived, it is not. I encountered the bug from time to time, when the drag to maximize/unmaximize would behave erratically. Took me some time to figure out what triggers it; the result is the above procedure.
I would like to kindly ask to fix this annoyance.
xfwm4 version 4.12.3 (revision 7fdcb53) on Arch linux
Can confirm. Dragging down maximized windows this way does cause some flickering.
The bug exhibit itself when there is no panel at the top, i.e. the titlebar is on the top.
If there is a panel on the top (as in the default config), I was not able to reproduce the bug.
I have a single panel at the bottom, so I encounter this frequently..
Created attachment 7540
Patch removing the erratic behaviour when unmaximizing with dragging
The attached patch basically makes the problem go away.
Well, the code that attachment 7540 removes is to allow for some pointer movement before triggering un-maximize, so I am not sure how that could help with the issue (which I cannot reproduce btw).
So, if you can prepare a well formed patch (using "git format-patch"), reindent the code as necessary, with a commit message which explains how this helps with the issue and attach all this to this bug, I would most likely push it (assuming I agree with the explanation as to why this helps).
The bug is triggered near the top edge of the screen and near the start of drag of maximized window titlebar. There must be no panel on the top, otherwise the bug won't trigger.
With each motion event, the maximization is toggled, in an area roughly 30x10 pixels (the vertical 10 is the "dist" from clientMoveTile(), 30 horizontally comes from 2*15).
In the original code in clientMoveEventFilter() near the proposed patch: when you begin to drag (slowly) a maximized window from the absolute top, clientToggleMaximizedAtPoint() gets called in clientMoveTile() once per each motion event, until 15 pixels away from original position, which leads to the back and forth maximization/unmaximization. After removing the check for the 15 pixels distance, maximized (and/or tiled) window get first unmaximized (with clientToggleMaximized()), and then potentially maximized immediately again inside clientMoveTile(), if it is still near the edge/corner. Hence it either stays maximized (this occurs near the edges) or get unmaximized when away from top, bottom or sides.
I hope I got it right and also hope this explains the patch.
I will try to prepare the well formed patch asap.
Created attachment 7541
Created attachment 7542
VIdeo demonstrating the bug
Created attachment 7543
fix to erratic unmaximization by dragging
improved style, added link to bug
Created attachment 7544
link to bug reformatted to proper style
Adam Purkrt referenced this bugreport in commit 84b905b7854bc04b00b681588b8d9cbd7f29493e
Fix to erratic unmaximization by dragging