Tk Source Code

View Ticket
Login
Ticket UUID: 557441302b148a04f3b19222911a13c3bf4e6150
Title: wm geometry returns wrong position for zoomed toplevels
Type: Bug Version: 6.5
Submitter: anonymous Created on: 2016-07-14 18:15:52
Subsystem: 62. Geometry Functions Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-11-05 16:35:17
Resolution: Fixed Closed By: nemethi
    Closed on: 2026-11-05 16:35:17
Description:
This is from a wish session on Windows 7:

(bin) 1 % wm geometry .
200x200+703+175
(bin) 2 % wm state . zoomed
(bin) 3 % wm geometry .
1280x738+703+175
(bin) 4 % 

Note how, after the toplevel is zoomed, the size reported by "wm geometry" is updated to reflect the new size but the position remains the same.
User Comments: nemethi (claiming to be Csaba Nemethi) added on 2026-11-05 16:35:17:

Serhiy, many thanks! Merged into main, core-9-0-branch, and core-8-6-branch by commits [b362a698], [59adf2ca], and [18879eb2]. Tested that the bug is not present on macOS.


serhiy.storchaka added on 2026-11-04 21:07:14:

Fixed on branch win-zoomed-geometry: on Windows, wm geometry of a zoomed toplevel reports its actual position, as on X11, for example +-8+-8 (the frame border is off the screen). This includes a toplevel iconified from zoomed, which will be restored zoomed. The restored position is kept, and restoring the window still goes back to it.

A wm geometry with a new position or size while the window is zoomed is still neither applied nor remembered for when the window is restored, on Windows and on X11.

Not tested on macOS.


fvogel added on 2016-07-29 21:03:47:
Hmmm, if you iconify the window you also still get its previous geometry.

Following your example:

% wm geometry .
200x200+703+175
% wm state . iconic
% wm geometry .
200x200+703+175

Despite perhaps unexpected at first, I'm not so sure this output is wrong.