Tk Source Code

View Ticket
Login
2026-10-08
15:05 • Closed ticket [4face822]: wm attributes -fullscreen w/dual monitor opens to fullscreen in the wrong display plus 7 other changes artifact: 0f77bd53 user: nemethi
14:18
Fix for [4face822b0]: wm attributes -fullscreen w/dual monitor opens to fullscreen in the wrong display. check-in: 5a3ac179 user: csaba tags: core-8-6-branch
14:10
Fix for [4face822b0]: wm attributes -fullscreen w/dual monitor opens to fullscreen in the wrong display. check-in: c30bc468 user: csaba tags: core-9-0-branch
14:02
Fix for [4face822b0]: wm attributes -fullscreen w/dual monitor opens to fullscreen in the wrong display. check-in: 52a9c119 user: csaba tags: trunk, main
2026-10-03
16:37 • Closed ticket [106af72a]: windows: wm attributes .window -fullscreen puts screen on a different monitor plus 5 other changes artifact: 99cbc11b user: serhiy.storchaka
16:37 • Ticket [4face822] wm attributes -fullscreen w/dual monitor opens to fullscreen in the wrong display status still Open with 2 other changes artifact: f0d14fbd user: serhiy.storchaka
16:36 • Ticket [4face822]: 3 changes artifact: 3678b693 user: serhiy.storchaka
16:34
Fix [4face822b0]: wm attributes -fullscreen w/dual monitor opens to fullscreen in the wrong display. UpdateWrapper always used the primary screen; use the monitor nearest the window instead. closed check-in: 94e8295d user: serhiy.storchaka tags: win-fullscreen-monitor
2026-09-18
09:44 • Ticket [c95d4691] winfo screenheight w/dual monitors returns the screen height of the primary display status still Open with 3 other changes artifact: 5ff82298 user: serhiy.storchaka
2016-08-15
10:21 • Ticket [4face822] wm attributes -fullscreen w/dual monitor opens to fullscreen in the wrong display status still Open with 3 other changes artifact: d1c05943 user: fvogel
2016-05-31
18:54 • Ticket [c95d4691] winfo screenheight w/dual monitors returns the screen height of the primary display status still Open with 3 other changes artifact: 2d9ab40f user: fvogel
18:54 • Ticket [4face822] wm attributes -fullscreen w/dual monitor opens to fullscreen in the wrong display status still Open with 3 other changes artifact: cc25f65e user: fvogel
2016-04-23
01:01 • Ticket [4face822]: 4 changes artifact: affdf77a user: anonymous
2016-04-22
22:17 • Ticket [c95d4691] winfo screenheight w/dual monitors returns the screen height of the primary display status still Open with 3 other changes artifact: 8cfc18fa user: fvogel
21:49 • Ticket [4face822] wm attributes -fullscreen w/dual monitor opens to fullscreen in the wrong display status still Open with 3 other changes artifact: 022cd03f user: fvogel
2016-04-18
20:57 • Ticket [4face822]: 4 changes artifact: 1f640caa user: fvogel
2015-02-25
16:45 • Ticket [4face822]: 4 changes artifact: 240050ae user: oehhar
2015-01-10
23:58 • New ticket [4face822]. artifact: e618b5a1 user: anonymous

Ticket UUID: 4face822b0b3d0cb8383c5cf46ff2099715846fa
Title: wm attributes -fullscreen w/dual monitor opens to fullscreen in the wrong display
Type: Bug Version: 8.6.18, 9.0.5, 9.1.0
Submitter: anonymous Created on: 2015-01-10 23:58:35
Subsystem: 68. Win Window Operations Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-10-08 15:05:12
Resolution: Fixed Closed By: nemethi
    Closed on: 2026-10-08 15:05:12
Description:
With a dual monitor setup, a window in the second display, changed to fullscreen mode will go to fullscreen in the first display rather than the second.   I tested this on Windows Vista and VirtualBox/Windows 7.


#!/usr/bin/tclsh

package require Tk

proc toggleFullscreen { } {
   set fs [wm attribute .win2 -fullscreen]
   wm attribute .win2 -fullscreen [expr {1-$fs}]
}

toplevel .win2
bind .win2 <Double-1> toggleFullscreen
ttk::label .lab1 -text {Window 1}
pack .lab1 -in .
ttk::label .win2.lab2 -text {Window 2}
pack .win2.lab2 -in .win2
User Comments: nemethi (claiming to be Csaba Nemethi) added on 2026-10-08 15:05:12:

Many thanks, Serhiy! Merged into main, core-9-0-branch, and core-8-6-branch by commits [52a9c119], [c30bc468], and [5a3ac179].


serhiy.storchaka added on 2026-10-03 16:36:42:

UpdateWrapper (win/tkWinWm.c) always used the origin and size of the primary screen for full screen mode.

Proposed fix in branch win-fullscreen-monitor: use the monitor nearest the window (MonitorFromRect, GetMonitorInfo). Tested on Windows 11 with two monitors: a normal, zoomed or not yet mapped window on the second monitor now goes full screen on the second monitor, and returns to its previous geometry or zoomed state there.

[106af72ae0] is a duplicate.


fvogel added on 2016-05-31 18:54:00:

Confirmed it works OK on Debian 8 with two monitors. Double-clicking inside window 2 toggles fullscreen on the monitor where the window is displayed.

Looks like the WM understands there is a single screen displayed on two monitors. (this remark in link with the discussion around [c95d4691ff]).


anonymous (claiming to be [email protected]) added on 2016-04-23 01:01:24:
This is not a problem on Linux.
The windows changes to fullscreen on the correct monitor.

I am unable to test on Mac OS X -- I only have a single monitor there.

Works on FreeBSD (mate desktop)-- tested just now.

fvogel added on 2016-04-22 21:49:43:

Looks like it's hardcoded for MacOSX as well but I'm not sure.

Again:

Could someone please confirm whether this problem exists on Mac and on Linux, or not?


fvogel added on 2016-04-18 20:57:30:

This appears to be hardcoded in Tk, at least for Windows.

Could someone please confirm whether this problem exists on Mac and on Linux, or not?


oehhar added on 2015-02-25 16:45:39:
Confirmed on Win 8.1 with a Laptop with an external Monitor.
Fullscreen always on the Primary screen, even if normal window on the extended screen.