Skip to content
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

minimize windows on the server when minimized on the client #726

Closed
totaam opened this issue Nov 3, 2014 · 11 comments
Closed

minimize windows on the server when minimized on the client #726

totaam opened this issue Nov 3, 2014 · 11 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Nov 3, 2014

Issue migrated from trac ticket # 726

component: server | priority: major | resolution: fixed

2014-11-03 14:15:21: totaam created the issue


This causes problems with applications that need to know the correct state of the window, ie: the test code from #718

Also related to #765, the "iconic" state handling is messy, conflates too many things and then we have the duplication in the desktop manager too.

@totaam
Copy link
Collaborator Author

totaam commented Dec 23, 2014

2014-12-23 12:36:11: totaam changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Dec 23, 2014

2014-12-23 12:36:11: totaam changed owner from antoine to totaam

@totaam
Copy link
Collaborator Author

totaam commented Dec 23, 2014

2014-12-23 12:36:11: totaam edited the issue description

@totaam
Copy link
Collaborator Author

totaam commented Dec 28, 2014

2014-12-28 10:37:51: antoine commented


More info in [#718#comment:7]: looks like we may have to unmap the window.

@totaam
Copy link
Collaborator Author

totaam commented Dec 28, 2014

2014-12-28 13:17:12: antoine uploaded file unmap-windows.patch (5.3 KiB)

unmaps windows to hide them, and re-maps them when shown again

@totaam
Copy link
Collaborator Author

totaam commented Dec 28, 2014

2014-12-28 16:30:28: antoine commented


Despite the changes in the patch above to unmap the window when we iconify it, we don't get a Java java.awt.event.WindowEvent[WINDOW_STATE_CHANGED,opposite=null,oldState=0,newState=1] and from then on, the window state stays as "normal".

This is normally generated in handleIconify which is fired from handlePropertyNotify.

Verbose Java logging shows this when we do detect the iconified window:

sun.awt.X11.XFramePeer handlePropertyNotify
FINER: Property change XPropertyEvent # typePropertyNotify, serial # 420, send_eventfalse, \
    display # 140580387884144, windowsun.awt.X11.XFramePeer@f5c5bba(2a00018), atom # WM_STATE:331, time242438341, state = 0, 
sun.awt.X11.XWM isStateChange
FINER: Window WM_STATE is 3
sun.awt.X11.XNETProtocol doStateProtocol
FINER: doStateProtocol() returns true
sun.awt.X11.XFramePeer handlePropertyNotify
FINER: Iconified

With xpra:

sun.awt.X11.XFramePeer handlePropertyNotify
FINER: Property change XPropertyEvent # typePropertyNotify, serial # 445, send_eventfalse, \
    display # 140379128433632, windowsun.awt.X11.XFramePeer@471f4073(800007), atom # WM_STATE:293, time242882557, state = 0, 
sun.awt.X11.XWM isStateChange
FINER: Window WM_STATE is 872457728
sun.awt.X11.XNETProtocol doStateProtocol
FINER: doStateProtocol() returns true
sun.awt.X11.XFramePeer handlePropertyNotify
FINER: State is the same: 0

Why is the WM_STATE so out of range?
When I look at it using xprop, it looks fine - same value in both cases... well, it would be because the type of the property is wrong - and it has been wrong.. forever!

r8318 fixes that and should be backported.

r8319 merges the map / unmap patch (with some renaming), it looks safe but could still cause some regressions..

@totaam
Copy link
Collaborator Author

totaam commented Dec 29, 2014

2014-12-29 04:05:56: antoine commented


Backport of r8318 in 8320. I probably won't backport r8319.

@totaam
Copy link
Collaborator Author

totaam commented Jan 2, 2015

2015-01-02 09:39:45: antoine commented


One more iconification race fixed in r8352 + backport in 8353.

@totaam
Copy link
Collaborator Author

totaam commented Jan 15, 2015

2015-01-15 16:21:45: totaam changed status from assigned to closed

@totaam
Copy link
Collaborator Author

totaam commented Jan 15, 2015

2015-01-15 16:21:45: totaam changed resolution from ** to fixed

@totaam
Copy link
Collaborator Author

totaam commented Jan 15, 2015

2015-01-15 16:21:45: totaam commented


Working as expected. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant