Skip to content

IDLE: completions toplevel blank on Tk Aqua 8.7 #104499

Closed

Description

@chrstphrchvz

# Put widgets in place
self.autocompletewindow = acw = Toplevel(self.widget)
# Put it in a position so that it is not seen.
acw.wm_geometry("+10000+10000")
# Make it float
acw.wm_overrideredirect(1)

Using wm geometry to move an overrideredirect toplevel far enough offscreen triggers a strange bug in recent Tk Aqua 8.7 (assuming it isn’t actually a macOS bug) which leaves the toplevel completely blank. I have reported it upstream: https://core.tcl-lang.org/tk/tktview/132dd3d350

However, I would like to see if IDLE can make a simple change to avoid the issue, in case Tk Aqua does not address it soon. Moving a toplevel far offscreen to hide it while configuring its contents seems improper, as opposed to something like withdrawing it. Hiding the toplevel to avoid visual artifacts is probably no longer necessary, except maybe on something sufficiently slow like X11 forwarding. IDLE also does not make a similar effort to temporarily hide the toplevel for calltips.

So I would suggest making this wm_geometry() call only when acw._windowingsystem == 'x11' or at least acw._windowingsystem != 'aqua'.

Linked PRs

Activity

  1. terryjreedy commented on May 15, 2023

    @terryjreedy
    Member

    I always thought moving offscreen instead of withdrawing, as done elsewhere while setting geometry, was a bit weird, but changing was not a priority before now. I think I would use query.py as an example.

  2. self-assigned this
    on May 15, 2023
  3. added 2 commits that reference this issue on May 17, 2023
  4. added a commit that references this issue on May 18, 2023
  5. added a commit that references this issue on May 18, 2023
  6. added 3 commits that reference this issue on May 18, 2023
  7. added a commit that references this issue on May 18, 2023
  8. terryjreedy commented on May 18, 2023

    @terryjreedy
    Member

    I am a little surprised that there is no withdraw for calltips. It might have been dropped when we redid tooltip and based calltip on tooltip. So I might review the need for withdrawal by checking performance on my 2012 MacBook Air. However, in some cases, tests skip deiconify so as to minimize visual flutter.

    Making windows deiconified for tests seems needed when simulating keypresses and mouse actions. I have wondered whether the latter would still work if the test window were put off screen.

  9. added a commit that references this issue on May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions