Quote:
Originally Posted by jpollard
the window is tagged with the hint "MAXIMIZED"... so it ignores size changes other than through the mouse (and some window managers even ignore that, but most of those are no longer used).
|
I think you misunderstand. The window WAS maximized, but it is NOT anymore, it is unmaximized (either manually or programmatically). All normal window managers allow you to move unmaximized windows with a mouse, otherwise it would be impossible to move windows with a mouse.
Quote:
Originally Posted by jpollard
Unmapping a window removes all window attributes, then mapping it back allows for a resize (the MAXIMIZED hint was removed by unmapping).
|
This depends. For example if I run:
Code:
xdotool windowunmap $WID; sleep 3; xdotool windowmap $WID
There two possible outcomes: if I keep mouse cursor on the same monitor, the window will reapper maximized if it was maximized, but it will reappear unmaximized if I move mouse cursor to other screen. This is why it's necessary to explicitly unmaximize the window for reliable result, unmapping/mapping by itself is not enough.
Quote:
Originally Posted by jpollard
This could be considered a bug, but it also could be considered a feature as the user did indicate that the window was to be MAXIMIZED.
|
But it wasn't to be maximized. Let's say I have maximized window $WID. If I execute "xwininfo -wm -id $WID" I get:
Code:
Window type:
Normal
Window state:
Maximized Vert
Maximized Horz
Now if I run "wmctrl -i -r $WID -b remove,maximized_vert,maximized_horz" and then xwininfo -wm -id $WID" again I get:
Code:
Window type:
Normal
Note that there is no "Maximized" states anymore, and "Window state:" is not printed anymore because all states were removed. But if I try "wmctrl -i -r $WID -e 0,$x,$y,$width,$height" it will do nothing. So I move the window manually a bit and try the command again. Now it works and resizes/moves the window.
Let's try that again but record more info in attempt to find out what happened. I maximize the window again, now unmaximize it. I record all info I can get about current state of the window using "xwininfo -all -id $WID > /tmp/unmaximized-stuck". If I try to move/resize the window programatically now it will be stuck. I resize the window manually a bit, and then set its size exactly as it was before (it does not matter programmatically or manually). I record its current state again: "xwininfo -all -id $WID > /tmp/unmaximized-not-stuck". Then I try to find out what's the difference between "programmatically stuck" window and normal window:
Code:
diff /tmp/unmaximized-stuck /tmp/unmaximized-not-stuck
It turns out that both files are exactly the same, so there is seems to be no difference, but that can't be right. In both cases we had unmaximized window of the same size in the same location but in the first case the window couldn't be moved programmatically and in the second could, so there must be some difference. Very strange.
What you are saying about unmapping and mapping clearing some window attributes makes me think that some other unknown window property (so definitely not "maximized vertically" or "maximized horizontally") exists, perhaps it's undocumented, which does not allow freshly unmaximized window to be moved/resize programmatically, and it is removed by unmapping and mapping (or manual move/resize). But I have no idea how to find it, because xwininfo -all does not show it. Unmapping and mapping again is just a workaround for unknown problem, so any help or ideas how to find this unknown window property would be appreciated.
Perhaps somebody knows a way to get more info about X11 window than xwininfo -all can give?