From 9150448d8f5147fd668def4b2cfabd79e3ba90a2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 10 Mar 2020 15:11:19 +0000 Subject: [PATCH] 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 --- applet.tcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.30.2