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>
This commit is contained in:
Pat Thoyts 2011-07-11 13:55:38 +01:00
Родитель c5c45e1a2d
Коммит 768e300a50
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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