From: Ian Jackson Date: Tue, 10 Mar 2020 15:11:19 +0000 (+0000) Subject: applet: Introduce applet::tooltip_offset X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=9150448d8f5147fd668def4b2cfabd79e3ba90a2;p=chiark-tcl-applet.git applet: Introduce applet::tooltip_offset This is primarily so you can put, in ~/.config/xbatmon-simple-tray, something like this set applet::tooltip_offset {-30 -30} Signed-off-by: Ian Jackson --- diff --git a/applet.tcl b/applet.tcl index 5e300ab..87c0a60 100644 --- a/applet.tcl +++ b/applet.tcl @@ -82,6 +82,7 @@ proc become {} { # used by both menus and tooltips variable posted 0 +variable tooltip_offset {9 9} #----- menus ----- @@ -175,8 +176,9 @@ proc tooltip-set {s} { proc tooltip-show {x y} { variable tooltip_on_vis - incr x 9 - incr y 9 + variable tooltip_offset + incr x [lindex $tooltip_offset 0] + incr y [lindex $tooltip_offset 1] wm geometry .tt +$x+$y wm deiconify .tt raise .tt