Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS aqua: BrowseEntry dropdown appears behind window #15

Open
chrstphrchvz opened this issue Feb 7, 2021 · 2 comments
Open

macOS aqua: BrowseEntry dropdown appears behind window #15

chrstphrchvz opened this issue Feb 7, 2021 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@chrstphrchvz
Copy link
Owner

chrstphrchvz commented Feb 7, 2021

https://rt.cpan.org/Ticket/Display.html?id=127772#txn-1821064

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.

image

@chrstphrchvz
Copy link
Owner Author

https://rt.cpan.org/Ticket/Display.html?id=127772#txn-1890228

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).

@chrstphrchvz
Copy link
Owner Author

chrstphrchvz commented Feb 7, 2021

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

So far I have not been successful at adapting the approach in combobox.tcl. And because of the platform inconsistencies evident in combobox.tcl, I'm not sure I could convince upstream Tcl/Tk that there is an inconsistency they can or should address that would resolve this issue.

@chrstphrchvz chrstphrchvz added help wanted Extra attention is needed bug Something isn't working labels Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant