Attachment "sizegrip.patch" to
ticket [2912356f]
added by
jenglish
2009-12-23 07:52:13.
diff --git a/library/sizegrip.tcl b/library/sizegrip.tcl
index 7dd4e7c..8235d19 100644
--- a/library/sizegrip.tcl
+++ b/library/sizegrip.tcl
@@ -55,7 +55,7 @@ proc ttk::sizegrip::Press {W X Y} {
# If a negative X or Y position was specified for [wm geometry],
# just bail out -- there's no way to handle this cleanly.
#
- if {[scan [wm geometry $top] "%dx%d+%d+%d" width height _x _y] != 4} {
+ if {[scan [wm geometry $top] "%dx%d+%d+%d" width height x y] != 4} {
return;
}
@@ -74,6 +74,8 @@ proc ttk::sizegrip::Press {W X Y} {
set State(pressY) $Y
set State(width) $width
set State(height) $height
+ set State(x) $x
+ set State(y) $y
set State(pressed) 1
}
@@ -90,7 +92,8 @@ proc ttk::sizegrip::Drag {W X Y} {
}
if {$w <= 0} { set w 1 }
if {$h <= 0} { set h 1 }
- wm geometry $State(toplevel) ${w}x${h}
+ set x $State(x) ; set y $State(y)
+ wm geometry $State(toplevel) ${w}x${h}+${x}+${y}
}
proc ttk::sizegrip::Release {W X Y} {