Tk Source Code

View Ticket
Login
2024-05-24
22:37 Closed ticket [7255ef9aa6]: problems with tk systray balloon on X11 plus 8 other changes artifact: aeeb096f31 user: jan.nijtmans
15:18
Fix [7255ef9aa6]: problems with [tk systray] balloon on X11 check-in: 10893e4cf2 user: jan.nijtmans tags: trunk, main
15:16
Fix [7255ef9aa6]: problems with [tk systray] balloon on X11 check-in: 0e538d6fa7 user: jan.nijtmans tags: core-8-branch
2024-05-23
17:20 Add attachment systray.diff to ticket [7255ef9aa6] artifact: 9d797be4de user: emiliano
17:18 New ticket [7255ef9aa6] problems with tk systray balloon on X11. artifact: b63f1dd8c5 user: emiliano

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: