Ticket UUID: | 132dd3d350e0aafffa63a18187adec193fc2d536 | |||
Title: | Aqua: TIP 655 causes overrideredirect toplevel moved offscreen to be blank | |||
Type: | Bug | Version: | trunk | |
Submitter: | chrstphrchvz | Created on: | 2023-05-05 17:03:22 | |
Subsystem: | 66. Aqua Window Operations | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | Important | |
Status: | Open | Last Modified: | 2023-07-23 19:15:56 | |
Resolution: | None | Closed By: | nobody | |
Closed on: | ||||
Description: |
The completions feature in IDLE relies on a listbox in an overrideredirect toplevel appearing in front of a shell or editor window. Immediately after that toplevel is created (i.e. without calling update), it is temporarily hidden by being moved to +10000+10000 (although I would think there is a better way to hide it, if doing so is still necessary); it is moved into place onscreen only after receiving a <Configure> event. Something in the TIP 655 implementation ([2e788489230d]) causes drawRect: to never be entered for the toplevel, leaving it blank (having only a default background color from AppKit). Tcl script exhibiting this issue: package require Tk toplevel .t -background green wm geometry .t +10000+10000 wm overrideredirect .t 1 after 1000 {wm geometry .t +300+300} Assuming there is only a single display with width w and height h (measured in logical rather than physical pixels), this issue occurs as long as x and y in the early wm geometry +x+y call are not within [-w,w) or [-h,h) respectively. For example, if the display is 1920x1080, then specifying a position above or to the left of -1920-1080 or below or to the right of +1919+1079 will trigger the issue. I observe this on macOS 12.6.5 Monterey Intel; I have not tried this on other macOS versions. | |||
User Comments: |
fvogel added on 2023-07-23 19:15:56:
Also happens on macOS 13.4.1 Ventura Intel. chrstphrchvz added on 2023-05-19 00:48:16: I notified Python about this issue, and they have removed the wm geometry +10000+10000 call from IDLE: https://github.com/python/cpython/pull/104591 chrstphrchvz added on 2023-05-05 20:20:37: In TkMacOSXMakeRealWindowExist(), doing [window setFrame:geometry display:YES] and then window.styleMask |= NSWindowStyleMaskDocModalWindow seems important to this issue. |
