The window jumps, chooses some seemingly random size and location, but doesn't actually maximize. (discovered testing for #2146)
-d win32
log output of a maximize event:
2019-03-18 04:56:59,299 NotifyIconWndProc(197372, 28, 1, 0) instance=win32NotifyIcon(0x0), message(28)=None 2019-03-18 04:56:59,299 callbacks for event WM_ACTIVATEAPP: [<bound method ClientExtras.activateapp of <xpra.platform.win32.gui.ClientExtras object at 0x0000000006a714e0>>] 2019-03-18 04:56:59,299 WM_ACTIVATEAPP: 1/0 client=gtk3.client 2019-03-18 04:56:59,307 gpointer=0x308b4b0 2019-03-18 04:56:59,307 hwnd=0x402f2 2019-03-18 04:56:59,307 fixup_window_style() unchanged style BORDER, CAPTION, CLIPCHILDREN, CLIPSIBLINGS, DLGFRAME, MINIMIZEBOX, TABSTOP, TILED, THICKFRAME, SYSMENU, VISIBLE (0x16cf0000) on window 0x402f2 2019-03-18 04:56:59,307 fixup_window_style() ws_visible=True (was True), iconified=False, been_mapped=True 2019-03-18 04:56:59,307 DefWindowProc(590590, 28, 1, 0)=0 2019-03-18 04:56:59,682 window_state_updated(ClientWindow(1)) 2019-03-18 04:56:59,682 gpointer=0x308b4b0 2019-03-18 04:56:59,682 hwnd=0x402f2 2019-03-18 04:56:59,682 fixup_window_style() unchanged style BORDER, CAPTION, CLIPCHILDREN, CLIPSIBLINGS, DLGFRAME, MINIMIZEBOX, MAXIMIZE, TABSTOP, TILED, THICKFRAME, SYSMENU, VISIBLE (0x17cf0000) on window 0x402f2 2019-03-18 04:56:59,682 fixup_window_style() ws_visible=True (was True), iconified=False, been_mapped=True 2019-03-18 04:56:59,682 apply_geometry_hints({b'min_width': 132, b'min_height': 38, b'base_width': 19, b'base_height': 4, b'width_inc': 6, b'height_inc': 13, b'max_width': 32767, b'max_height': 32764}) 2019-03-18 04:56:59,682 gpointer=0x308b4b0 2019-03-18 04:56:59,690 hwnd=0x402f2 2019-03-18 04:56:59,690 apply_maxsize_hints(ClientWindow(1), {b'min_width': 132, b'min_height': 38, b'base_width': 19, b'base_height': 4, b'width_inc': 6, b'height_inc': 13, b'max_width': 32767, b'max_height': 32764}) handle=262898 2019-03-18 04:56:59,690 apply_maxsize_hints(ClientWindow(1), {b'min_width': 132, b'min_height': 38, b'base_width': 19, b'base_height': 4, b'width_inc': 6, b'height_inc': 13, b'max_width': 32767, b'max_height': 32764}) found min: 0x0, max: 0x0 2019-03-18 04:56:59,690 window_state_updated(ClientWindow(1)) 2019-03-18 04:56:59,690 gpointer=0x308b4b0 2019-03-18 04:56:59,690 hwnd=0x402f2 2019-03-18 04:56:59,690 fixup_window_style() unchanged style BORDER, CAPTION, CLIPCHILDREN, CLIPSIBLINGS, DLGFRAME, MINIMIZEBOX, MAXIMIZE, TABSTOP, TILED, THICKFRAME, SYSMENU, VISIBLE (0x17cf0000) on window 0x402f2 2019-03-18 04:56:59,690 fixup_window_style() ws_visible=True (was True), iconified=False, been_mapped=True 2019-03-18 04:56:59,690 apply_geometry_hints({b'min_width': 132, b'min_height': 38, b'base_width': 19, b'base_height': 4, b'width_inc': 6, b'height_inc': 13, b'max_width': 32767, b'max_height': 32764}) 2019-03-18 04:56:59,690 gpointer=0x308b4b0 2019-03-18 04:56:59,690 hwnd=0x402f2 2019-03-18 04:56:59,690 apply_maxsize_hints(ClientWindow(1), {b'min_width': 132, b'min_height': 38, b'base_width': 19, b'base_height': 4, b'width_inc': 6, b'height_inc': 13, b'max_width': 32767, b'max_height': 32764}) handle=262898 2019-03-18 04:56:59,690 apply_maxsize_hints(ClientWindow(1), {b'min_width': 132, b'min_height': 38, b'base_width': 19, b'base_height': 4, b'width_inc': 6, b'height_inc': 13, b'max_width': 32767, b'max_height': 32764}) found min: 0x0, max: 0x0 2019-03-18 04:56:59,690 window_state_updated(ClientWindow(1)) 2019-03-18 04:56:59,690 gpointer=0x308b4b0 2019-03-18 04:56:59,690 hwnd=0x402f2 2019-03-18 04:56:59,690 fixup_window_style() unchanged style BORDER, CAPTION, CLIPCHILDREN, CLIPSIBLINGS, DLGFRAME, MINIMIZEBOX, MAXIMIZE, TABSTOP, TILED, THICKFRAME, SYSMENU, VISIBLE (0x17cf0000) on window 0x402f2 2019-03-18 04:56:59,690 fixup_window_style() ws_visible=True (was True), iconified=False, been_mapped=True
With r22104 + r22105 and the new XPRA_SET_SIZE_CONSTRAINTS=0
and XPRA_WIN32_WINDOW_HOOKS=1
switches, the xterm does maximize properly:
2019-03-18 12:53:27,092 client @28.797 ClientWindow(1).window_state_updated(ClientWindow(1), <Gdk.EventWindowState object at 0x000000001f82cd18 (void at 0x000000001c520ca0)>) changed_mask=<flags GDK_WINDOW_STATE_MAXIMIZED of type Gdk.WindowState>, new_window_state=<flags GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FOCUSED of type Gdk.WindowState> 2019-03-18 12:53:27,092 client @28.797 _maximized=True (was False) 2019-03-18 12:53:27,092 client @28.797 window_state_updated(..) state updates: {'maximized': True}, actual updates: {'maximized': True}, server updates: {'maximized': True} 2019-03-18 12:53:27,092 client @28.797 ClientWindow(1).do_configure_event(<Gdk.EventConfigure object at 0x000000001f82cd18 (void at 0x000000001c520f20)>) OR=False, iconified=False 2019-03-18 12:53:27,092 client @28.797 ['configure-window', 1, 0, 22, 1648, 998, {}, 0, {'maximized': True}, False, 1, (577, 145), ['mod2']] 2019-03-18 12:53:27,092 client @28.797 configure event: current size=(499, 316), new size=(1648, 998), backing=gtk3.CairoBacking(<cairo.ImageSurface object at 0x000000001e0e7dd0>), iconified=False 2019-03-18 12:53:27,092 client @28.797 clip_to_backing(gtk3.CairoBacking(<cairo.ImageSurface object at 0x000000001e0e7d30>), <cairo.Context object at 0x000000001d1631b0>) rectangle=(0, 0, 1648, 998) 2019-03-18 12:53:27,272 client @28.938 clip_to_backing(gtk3.CairoBacking(<cairo.ImageSurface object at 0x000000001e0e7d30>), <cairo.Context object at 0x000000001f809730>) rectangle=(0, 0, 1648, 998) 2019-03-18 12:53:27,367 client @29.063 _process_window_move_resize[1, 0, 22, 1645, 992, 1] moving / resizing window ClientWindow(1) (id=1) to (0, 22, 1645, 992) 2019-03-18 12:53:27,368 client @29.063 window 1 move_resize(0, 22, 1645, 992, 1645) 2019-03-18 12:53:27,369 client @29.063 unchanged position 0x22, using resize(1645, 992) 2019-03-18 12:53:27,369 client @29.063 resize(1645, 992, 0) current size=(1648, 998), fullscreen=None, maximized=True 2019-03-18 12:53:27,370 client @29.063 using window offset values 1,3 2019-03-18 12:53:27,370 client @29.063 center_backing(1645, 992) window size=1648x998, backing offsets=(1, 3, 2, 3) 2019-03-18 12:53:27,370 client @29.063 backing offsets=(1, 3, 2, 3), window offset=(1, 3) 2019-03-18 12:53:27,375 client @29.094 paint_backing_offset_border(gtk3.CairoBacking(<cairo.ImageSurface object at 0x000000001e0e7f30>), <cairo.Context object at 0x000000001e0e7a30>) offsets=(1, 3, 2, 3), size=(1648, 998), rgb=(0, 0, 0), coords=((0, 0, 1, 998), (0, 0, 1648, 3), (1646, 0, 2, 998), (0, 995, 1648, 3)) 2019-03-18 12:53:27,375 client @29.094 clip_to_backing(gtk3.CairoBacking(<cairo.ImageSurface object at 0x000000001e0e7f30>), <cairo.Context object at 0x000000001e0e7a30>) rectangle=(1, 3, 1645, 992) 2019-03-18 12:53:27,466 client @29.141 paint_backing_offset_border(gtk3.CairoBacking(<cairo.ImageSurface object at 0x000000001e0e7f30>), <cairo.Context object at 0x0000000007671ed0>) offsets=(1, 3, 2, 3), size=(1648, 998), rgb=(0, 0, 0), coords=((0, 0, 1, 998), (0, 0, 1648, 3), (1646, 0, 2, 998), (0, 995, 1648, 3)) 2019-03-18 12:53:27,466 client @29.141 clip_to_backing(gtk3.CairoBacking(<cairo.ImageSurface object at 0x000000001e0e7f30>), <cairo.Context object at 0x0000000007671ed0>) rectangle=(1, 3, 1645, 992)
Summary: we get the maximized state change, send a configure-window
packet to the server, and since the geometry does not match the size-constraints
the server sends back a move-resize
with the correct dimensions (1645x992 instead of 1648x998).
When enabling size-constraints, the differences are:
fixup_window_style()
though it doesn't make any changes
configure-window
is already wrong:
2019-03-18 13:03:33,430 client @38.829 ['configure-window', 1, 0, 22, 132, 38, {}, 0, {'maximized': True}, False, 1, (711, 87), ['mod2']] 2019-03-18 13:03:33,430 client @38.829 configure event: current size=(643, 303), new size=(132, 38), backing=gtk3.CairoBacking(<cairo.ImageSurface object at 0x000000001fe55fd0>), iconified=False
Workaround with simple test case in r22112.
See also #2714
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2214