New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong position of client window after maximize/normalize window #115
Comments
You are setting PPostion, PSize, USPosition and USSize. That is wrong. Pick a pair. Also, few window managers respect either. |
@bbidulock |
I would say it's a nightmare to make a toolkit for X11 just in general. Window managers have the additional nightmare of dealing with the myriad of applications that abuse X11, ICCCM, and EWMH. Anyway, I think the problem is that JWM is applying the window gravity multiple times when restoring a window if PPosition or USPosition is set (JWM actually doesn't make a distinction between USPosition and PPosition). |
I don't think so. MSEgui runs on Windows too and as a toolkit maker I much more prefer X11 over gdi32/user32. Z-order handling is the exception because not all WM's support |
The effect is not caused by the xsetwmnormalhints() calll with PPostion, PSize, USPosition and USSize but the |
When I run a little test.pl, I get: The little test program is here: JWM acts fine for static windows. You must be doing something wrong. |
The important code is this:
|
$win->set_gravity('static') in the test does that. WM_NORMAL_HINTS(WM_SIZE_HINTS): So, obviously you did not try running the program... |
I am surprised about the aggressive and dismissive tone in the JWM community.
probably sets the wmnormalhints property the equivalent of
in my test program, this not the same as setting the window create attributes. |
Pardon, me. ICCCM 2.0 4.1.6. Changing Window Attributes: The window manager is free to override the window gravity; a reparenting window manager may want to set the top-level window's window gravity for its own purposes. So, don't set it to 'static'. Set the win_gravity in WM_NORMAL_HINTS instead. |
It seems to me that actually JWM does not override the window gravity but it should. ;-) |
when reparenting client window: - sets backing store to NotUseful - sets win gravity to NorthWestGravity in case client did something stupid with these values.
Ideally JWM should handle static gravity. Even if the standard says it's not strictly necessary, there is code in JWM to handle the various window gravities, so it should work and if it doesn't there's a bug. I'm not sure what's going on in this case yet, but I plan to investigate this more when I get a chance. |
Wmnormalhints sizehints works OK, the problem was that I set win_gravity=staticgravity in xcreatewindow attributes and JWM did not remove it before maximizing window, see my comment above. Seems already been fixed by bbidulock. |
IceWM just sets win_gravity to NorthWestGravity before reparenting the window. |
I protected 8 other window managers from that: icewm, blackbox, larswm, waimea, flwm, etwm, ctwm, adwm. 2bwm and mcwm don't reparent and are immune to that. |
That makes sense. |
Fixed, thanks a lot! |
It has been reported that MSEgui applications:
http://sourceforge.net/projects/mseide-msegui/
don't work well with jwm 2.2.2. After maximizing/normalizing a MSEgui window by the frame buttons the position of the client window is wrong, maybe because of the staticgravity or other settings in xsetwmnormalhints() call.
The test project is here:
https://gitorious.org/mseuniverse/mseuniverse/source/testcase/window/clientwindowpos
The text was updated successfully, but these errors were encountered: