xpra icon
Bug tracker and wiki

Opened 5 years ago

Closed 5 years ago

#726 closed defect (fixed)

minimize windows on the server when minimized on the client

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.15
Component: server Version: trunk
Keywords: Cc:

Description (last modified by Antoine Martin)

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.

Attachments (1)

unmap-windows.patch (5.3 KB) - added by Antoine Martin 5 years ago.
unmaps windows to hide them, and re-maps them when shown again

Download all attachments as: .zip

Change History (7)

comment:1 Changed 5 years ago by Antoine Martin

Description: modified (diff)
Owner: changed from Antoine Martin to Antoine Martin
Status: newassigned

comment:2 Changed 5 years ago by Antoine Martin

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

Changed 5 years ago by Antoine Martin

Attachment: unmap-windows.patch added

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

comment:3 Changed 5 years ago by Antoine Martin

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 = type = PropertyNotify, serial = 420, send_event = false, \
    display = 140580387884144, window = sun.awt.X11.XFramePeer@f5c5bba(2a00018), atom = WM_STATE:331, time = 242438341, 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 = type = PropertyNotify, serial = 445, send_event = false, \
    display = 140379128433632, window = sun.awt.X11.XFramePeer@471f4073(800007), atom = WM_STATE:293, time = 242882557, 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..

Last edited 5 years ago by Antoine Martin (previous) (diff)

comment:4 Changed 5 years ago by Antoine Martin

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

comment:5 Changed 5 years ago by Antoine Martin

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

comment:6 Changed 5 years ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Working as expected. Closing.

Note: See TracTickets for help on using tickets.