Fix tooltip display with multiple monitors on windows.
On Windows the position of a window may be negative on a monitor to the left of the primary display. A plus sign is used as the separator between the width and height and the positional parts of the geometry so always include the plus sign even for negative positions on this platform. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Pat Thoyts committed
Jul 11, 2011 at 13:55 UTC
768e300a508d0e9e685929082a99c885ff384ffc
2 files changed
+4
-4
lib/blame.tcl
+2
-2
@@ -1298,9 +1298,9 @@ method _position_tooltip {} {
1298
set pos_y [expr {[winfo pointery .] + 10}]
1299
1300
set g "${req_w}x${req_h}"
1301
- if {$pos_x >= 0} {append g +}
1301
+ if {[tk windowingsystem] eq "win32" || $pos_x >= 0} {append g +}
1302
append g $pos_x
1303
- if {$pos_y >= 0} {append g +}
1303
+ if {[tk windowingsystem] eq "win32" || $pos_y >= 0} {append g +}
1304
append g $pos_y
1305
1306
wm geometry $tooltip_wm $g
lib/choose_rev.tcl
+2
-2
@@ -610,9 +610,9 @@ method _position_tooltip {} {
610
set pos_y [expr {[winfo pointery .] + 10}]
611
612
set g "${req_w}x${req_h}"
613
- if {$pos_x >= 0} {append g +}
613
+ if {[tk windowingsystem] eq "win32" || $pos_x >= 0} {append g +}
614
append g $pos_x
615
- if {$pos_y >= 0} {append g +}
615
+ if {[tk windowingsystem] eq "win32" || $pos_y >= 0} {append g +}
616
append g $pos_y
617
618
wm geometry $tooltip_wm $g