Skip Menu |

This queue is for tickets about the Tcl-pTk CPAN distribution.

Report information
The Basics
Id: 127772
Status: open
Priority: 0/
Queue: Tcl-pTk

People
Owner: Nobody in particular
Requestors: CAC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.94
Fixed in: (no value)

Attachments
Screen Shot 2018-11-21 at 12.28.52 AM.png



Subject: [macOS] aqua: BrowseEntry dropdown appears behind window
Using aqua Tk 8.6.9.1 on macOS 10.14.1, the dropdown list/popup for BrowseEntry widgets appears behind the window rather than in front of it. (I don't remember ever trying this on Tk 8.6.8 or earlier.) See attached screenshot.
 
Some workarounds would be to use ComboBox or ttkBrowseEntry instead, although I am not completely aware of how they differ from BrowseEntry. Without having investigated this much, I'm not sure BrowseEntry can be completely replaced by either of those in a Perl/Tk compatible manner. For example, existing code might depend on BrowseEntry's discrete listbox or button widgets. It would be simpler if BrowseEntry wasn't something to separately maintain, though.
Subject: Screen Shot 2018-11-21 at 12.28.52 AM.png
Screen Shot 2018-11-21 at 12.28.52 AM.png
There is a documented limitation in the behavior of grab on Tk Aqua where only the grab window can be focused and receive mouse and key events.

A Tcl script that exhibits the limitation (careful when running this on X11):


pack [ttk::button .b -text {Popup overlay}]
 
toplevel .t -background green
wm overrideredirect .t 1
wm withdraw .t
 
.b configure -command {
    wm deiconify .t
    wm geometry .t [wm geometry .]
    raise .t
 
    # On Aqua, this raises . and
    # doesn't allow interacting with .t
    grab -global .
}
 

Maybe BrowseEntry can be revised to act more like ttk::combobox, which uses slightly different approaches for each platform (see combobox.tcl in Tk).