diff options
| author | Pat Thoyts <patthoyts@users.sourceforge.net> | 2011-07-11 13:55:38 +0100 |
|---|---|---|
| committer | Pat Thoyts <patthoyts@users.sourceforge.net> | 2011-07-11 13:55:38 +0100 |
| commit | 768e300a508d0e9e685929082a99c885ff384ffc (patch) | |
| tree | eab82486260ddb3eeadfcd231fc238197c7b47ab | |
| parent | c5c45e1a2ddc28101ad19615ef6f9e0e08822206 (diff) | |
| download | git-768e300a508d0e9e685929082a99c885ff384ffc.tar.xz | |
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>
| -rw-r--r-- | lib/blame.tcl | 4 | ||||
| -rw-r--r-- | lib/choose_rev.tcl | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl index 61e358f960..1f2977d5bb 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -1298,9 +1298,9 @@ method _position_tooltip {} { set pos_y [expr {[winfo pointery .] + 10}] set g "${req_w}x${req_h}" - if {$pos_x >= 0} {append g +} + if {[tk windowingsystem] eq "win32" || $pos_x >= 0} {append g +} append g $pos_x - if {$pos_y >= 0} {append g +} + if {[tk windowingsystem] eq "win32" || $pos_y >= 0} {append g +} append g $pos_y wm geometry $tooltip_wm $g diff --git a/lib/choose_rev.tcl b/lib/choose_rev.tcl index c12d5e1698..54c7957a66 100644 --- a/lib/choose_rev.tcl +++ b/lib/choose_rev.tcl @@ -610,9 +610,9 @@ method _position_tooltip {} { set pos_y [expr {[winfo pointery .] + 10}] set g "${req_w}x${req_h}" - if {$pos_x >= 0} {append g +} + if {[tk windowingsystem] eq "win32" || $pos_x >= 0} {append g +} append g $pos_x - if {$pos_y >= 0} {append g +} + if {[tk windowingsystem] eq "win32" || $pos_y >= 0} {append g +} append g $pos_y wm geometry $tooltip_wm $g |
