| 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. | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki