Tk Source Code

View Ticket
Login
Ticket UUID: d1a711b5000287aaf697ad3a049131f883fc4476
Title: X11: wm geometry reports the requested position after the window manager moved the window out of a panel's area
Type: Bug Version: 8.6.18, 9.0.5, 9.1b1
Submitter: serhiy.storchaka Created on: 2026-09-30 13:49:11
Subsystem: 67. Unix Window Operations Assigned To: aku
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-11-04 17:59:32
Resolution: Fixed Closed By: nemethi
    Closed on: 2026-11-04 17:59:32
Description:

If the window manager reserves an area at the top of the screen for a panel (_NET_WORKAREA) and moves a toplevel requested at a position inside that area to below it, wm geometry still reports the requested position:

toplevel .t -width 200 -height 150
wm geometry .t +20+0
update
after 500
wm geometry .t

With a panel of 26 pixels at the top, this returns 200x150+20+0 under xfwm4 and metacity, although the window is at y=26. Tk ignores the move because it happens while its own move request is pending; this is intentional, to not let windows "walk" under window managers which interpret the coordinates differently (see [220791] and [940220]).

Under KWin on Wayland (for Xwayland clients) the window is not reparented, and wm geometry reports the position of the window itself instead of the decorated window, e.g. +20+108 for a 66 pixel panel and a 42 pixel title bar.

This makes unixWm-4.3 fail with a panel at the top of the screen ([1751560]).

Proposed fix in branch x11-wm-position-work-area: if the requested position was outside of the work area and the window manager moved the decorated window to its edge, the position of the decorated window is reported. The decorations reported in _NET_FRAME_EXTENTS are taken into account for windows which are not reparented. The unixWm tests use the top-most position which a window can actually get instead of 0.

User Comments: nemethi (claiming to be Csaba Nemethi) added on 2026-11-04 17:59:32:

Serhiy, many thanks! Merged into main, core-9-0-branch, and core-8-6-branch by commits [8cbf5a82], [2eca4467], and [29451af5].