Tk Source Code

View Ticket
Login
Ticket UUID: c2fc80fe53a54500fd71683e1fd933602061116
Title: macos: withdrawing a fullscreen mode window leaves the screen black
Type: Bug Version: 8.6.11
Submitter: bll Created on: 2021-02-16 14:24:20
Subsystem: (unused) Assigned To: marc_culler
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2021-02-16 18:49:13
Resolution: None Closed By: nobody
    Closed on:
Description:
After putting a toplevel into fullscreen mode on a second monitor, 
a withdraw on that toplevel leaves the screen black.  No other macos
windows are visible, the background color is not set.

A further deiconify restores the window properly.

Note that if the toplevel is not in full-screen mode, the withdraw/deiconify
works fine.

If anyone tries this with the primary monitor, I would make sure you have
a ssh session open to your computer.  I haven't tried this on the primary
monitor.
User Comments: bll added on 2021-02-16 18:49:13:
Something similar to the following seems to work:

wm attributes $w -fullscreen 0
set ::resize 0
vwait ::resize  ; # wait for the configure event to arrive
set ::x 0
after 500 [list set ::x 1]
vwait ::x
wm withdraw $w

Without the half second timer, an 'update' immediately before the 'wm withdraw' 
caused a hang.

It's slow, but it works.

bll added on 2021-02-16 17:36:48:
Probably, Tk should disallow a withdraw of a window if it is in fullscreen mode.

Doesn't solve my issue.  I have to figure out when the window is
done being switched from fullscreen to normal so that I can withdraw it.

bll added on 2021-02-16 16:30:05:
A fullscreen window on mac os does not have its minimize button enabled.

bll added on 2021-02-16 15:30:50:
Trying to find a work-around such as:

wm attributes $w -fullscreen 0
update ; # or update idletasks
wm withdraw $w

But it's not working out.
I don't know that the fullscreen toggle has finished before the withdraw
command is executed.