Tk Source Code

View Ticket
Login
Ticket UUID: 7255ef9aa6117a53fd4311ca6ebf24365d8a18dd
Title: problems with [tk systray] balloon on X11
Type: Bug Version: 8.7
Submitter: emiliano Created on: 2024-05-23 17:18:44
Subsystem: 99. Other Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2024-05-24 22:37:31
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2024-05-24 22:37:31
Description:
On X11, [tk systray] provides a pure Tcl implementation of balloon window (tooltip) for the systray icon, which has two problems:

* On library/systray.tcl, line 40 ( https://core.tcl-lang.org/tk/file?ci=trunk&name=library/systray.tcl&ln=40 ) it calls [catch {destroy $top}]; this call fails because it calls ::tk::systray::destroy on line 397 ( https://core.tcl-lang.org/tk/file?ci=trunk&name=library/systray.tcl&ln=397 ) instead of the intended ::destroy and, since the former proc takes no arguments, the [catch] makes this fail silently. As result, turning the mouse wheel over the systray icon generates a "window name "_balloon" already exists in parent" error.

* On the same file, line 48 ( https://core.tcl-lang.org/tk/file?ci=trunk&name=library/systray.tcl&ln=48 ) the code calls [update idletasks] to force geometry calculation; this however also maps the window on screen since its not withdrawn and it becomes visible on the top left corner for an instant before being repositioned on line 88. This result in an annoying visible window jump.

Attached patch solves both issues.
User Comments: jan.nijtmans added on 2024-05-24 22:37:31:

Fixed now in all branches.

Thanks for the report and the patch!


Attachments: