Tk Source Code

View Ticket
Login
Ticket UUID: fa367a12f059651045dd9f5cc80805bebf3f4bbe
Title: Wayland branch: wm state and wm attributes -zoomed report a zoomed window which the compositor did not maximize (wm-state-2.20 fails under sway)
Type: Bug Version: wayland
Submitter: serhiy.storchaka Created on: 2026-11-08 14:14:12
Subsystem: (unused) Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-11-08 16:10:45
Resolution: Fixed Closed By: serhiy.storchaka
    Closed on: 2026-11-08 16:10:45
Description:

Under sway (floating or tiled), wm attributes .t -zoomed 1 and wm state .t zoomed do not change the window: sway answers xdg_toplevel.set_maximized with a configure event of the old size and without the maximized state. But Tk reports the window as zoomed:

toplevel .t
wm geometry .t 200x200
update
wm attributes .t -zoomed 1
after 1500; update
list [wm attributes .t -zoomed] [wm state .t] [winfo width .t]x[winfo height .t]

Under sway this returns 1 zoomed 200x200. Test wm-state-2.20 fails.

wm attributes -zoomed and wm state zoomed set attributes.zoomed when sending the request, and TkWaylandWindowMaximizeCallback is not called, because the maximized state of the GLFW window does not change. On X11, Tk reports the state set by the window manager in _NET_WM_STATE.

User Comments: serhiy.storchaka added on 2026-11-08 16:07:47:

Fixed in [f0bc082234]: the zoomed state of a shown window is set only when the compositor reports it. A zoom requested before the window was shown was never sent to the compositor; now it is, so such a window is also maximized under GNOME.

Under sway, wm-state-2.20 still fails, because sway does not maximize the window. It also fails on X11 under twm and mwm, which do not support maximizing.