Tk Source Code

View Ticket
Login
Ticket UUID: 7e33bcfd9a43512601c5d9b1337c053442a32c0
Title: mac os : error messages during -fullscreen
Type: Bug Version: 8.6.11
Submitter: bll Created on: 2021-02-16 13:33:00
Subsystem: (unused) Assigned To: marc_culler
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2021-02-16 18:55:12
Resolution: None Closed By: nobody
    Closed on:
Description:
a) Using a simple script, I toggle fullscreen on a couple of toplevels.
After a few toggles, I start getting the following messages.

2021-02-16 05:20:17.123 tclsh[22282:214524] not in fullscreen state
2021-02-16 05:20:22.700 tclsh[22282:214524] not in fullscreen state
2021-02-16 05:20:26.324 tclsh[22282:214524] not in fullscreen state

This appears when moving the mouse to the other toplevel and toggling it.

b) The Control-Meta-F (Control-Command-F) key sequence does not work 
on a Tk window toggled to fullscreen.


c) I finally learned that I can move the mouse up to the top,
and the menu/title bar shows up, and the green button does work.


package require Tk

proc fstoggle { w } {
  set fs [wm attributes $w -fullscreen]
  set fs [expr {1-$fs}]
  wm attributes $w -fullscreen $fs
}

toplevel .a
toplevel .b
wm withdraw .
bind .a <Double-1> [list fstoggle %W]
bind .b <Double-1> [list fstoggle %W]
User Comments: bll added on 2021-02-16 18:55:12:
I actually got this message with a single window.
Some sort of race condition with mouse events for a single window???
The two window situation is much easier to duplicate.

bll added on 2021-02-16 15:54:44:
Sorry, double-click on .b, double-click on .b again.
Then same for .b.
Then again for .a.

No idea about the fake full screen.  That's not occurring for me.

marc_culler (claiming to be Marc Culler) added on 2021-02-16 15:48:16:
I can't double click on .b and then double click on .a since .b covers .a once
.b goes into "fake" full screen mode.

I guess this must require two monitors.

I think the fake full screen mode will give a clue, though, about what is
happening.  The code must be explicitly doing that.  I suspect that there
is some old Carbon cruft lying around in there.

bll added on 2021-02-16 15:07:50:
And I did the build on Catalina, not Big Sur.

bll added on 2021-02-16 15:06:31:
Oh, and I build my tclsh with minimum version = 10.11, which may change
the code path somewhat.

bll added on 2021-02-16 15:04:06:
Control-Meta-F is a MacOS shortcut.
You can see it in the "View" menu for most applications.

I am currently booted into Catalina.  
To get the error message, I double-clicked on .b, then .a, then .b.
It popped up when switching between toplevels.

I am getting real fullscreen mode on Catalina.

marc_culler (claiming to be Marc Culler) added on 2021-02-16 14:42:31:
Why would you expect Control-Meta-F to do anything?  I have never heard of
that. Is that a Mac shortcut or a Tk shortcut?

When the mouse hovers over the green button on a Mac toplevel you are supposed
to get a menu that lets you choose between making the window go full screen or
be tiled on the left or right half as a split screen.  If you select a split
screen option then you are supposed to click on a thumbnail to choose which
window to use for the other half.  As far as I know, these all work (with
one monitor anyway).  When a window is fullscreen its title bar is hidden
unless you move the mouse to the top and the window contents covers the entire
screen including the menu bar and the dock.

When I run your script I do not get a "real" fullscreen window like I get
with the green button.  Instead it is a"fake" fullscreen window like
the old Carbon ones.  It is just resizing the toplevel to the visual size
of the screen (excluding the menubar and dock).  This is pretty strange,
since I get a "real" toplevel if I run "wm attributes .a -fullscreen 1"
at the tclsh prompt.  Apparently setting that attribute from an event
handler does something different from what happens when it is set directly.

I never saw your error message when I ran your script.