]> gitweb.factorcode.org Git - factor.git/commitdiff
ui: hand-loc and hand-click-loc should be global.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 22 Sep 2012 01:32:43 +0000 (18:32 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 22 Sep 2012 01:32:43 +0000 (18:32 -0700)
basis/ui/backend/windows/windows.factor
basis/ui/gadgets/menus/menus.factor
basis/ui/gadgets/panes/panes.factor
basis/ui/gestures/gestures.factor

index e39d421b0c61ce0defb994fc6630f992420bfa5d..4ca35bb5aeace220b21875d45d282af6935386ca 100755 (executable)
@@ -536,7 +536,7 @@ SYMBOL: nc-buttons
     >lo-hi swap window move-hand fire-motion ;
 
 :: handle-wm-mousewheel ( hWnd uMsg wParam lParam -- )
-    wParam mouse-scroll hand-loc get hWnd window send-scroll ;
+    wParam mouse-scroll hand-loc get-global hWnd window send-scroll ;
 
 : handle-wm-cancelmode ( hWnd uMsg wParam lParam -- )
     #! message sent if windows needs application to stop dragging
index 70818262c5542143fc8def2109cf3d223baca3d1..70cc0bc971ff01d3ac4fd832da9ca1d10b6b5787 100644 (file)
@@ -9,7 +9,7 @@ math math.order sorting ;
 IN: ui.gadgets.menus
 
 : show-menu ( owner menu -- )
-    [ find-world ] dip hand-loc get { 0 0 } <rect> show-glass ;
+    [ find-world ] dip hand-loc get-global { 0 0 } <rect> show-glass ;
 
 GENERIC: <menu-item> ( target hook command -- button )
 
@@ -69,4 +69,4 @@ M: ---- <menu-item>
     { ---- } glue <commands-menu> ;
 
 : show-operations-menu ( gadget target hook -- )
-    <operations-menu> show-menu ;
\ No newline at end of file
+    <operations-menu> show-menu ;
index b808eec1bf32a94b99b12d21253d60a2f71235e2..35447d71c50f3ea761eeaf4c0553d63f4c42df9d 100644 (file)
@@ -389,7 +389,7 @@ M: f sloppy-pick-up*
 
 : begin-selection ( pane -- )
     f >>selecting?
-    dup hand-loc get move-caret
+    dup hand-loc get-global move-caret
     f >>mark
     drop ;
 
@@ -397,12 +397,12 @@ M: f sloppy-pick-up*
     hand-moved? [
         [
             dup selecting?>> [
-                hand-loc get move-caret
+                hand-loc get-global move-caret
             ] [
-                dup hand-clicked get child? [
+                dup hand-clicked get-global child? [
                     t >>selecting?
                     [ hand-clicked set-global ]
-                    [ hand-click-loc get move-caret ]
+                    [ hand-click-loc get-global move-caret ]
                     [ caret>mark ]
                     tri
                 ] [ drop ] if
@@ -419,7 +419,7 @@ M: f sloppy-pick-up*
 
 : select-to-caret ( pane -- )
     t >>selecting?
-    [ dup mark>> [ dup caret>mark ] unless hand-loc get move-caret ]
+    [ dup mark>> [ dup caret>mark ] unless hand-loc get-global move-caret ]
     [ com-copy-selection ]
     [ request-focus ]
     tri ;
index 27d502cc24670255d21aa46d2e701bfb866bbad9..937debb26352bb486989b388227271bbb6aa512c 100644 (file)
@@ -170,7 +170,7 @@ SYMBOL: double-click-timeout
 300 milliseconds double-click-timeout set-global
 
 : hand-moved? ( -- ? )
-    hand-loc get hand-click-loc get = not ;
+    hand-loc get-global hand-click-loc get-global = not ;
 
 : button-gesture ( gesture -- )
     hand-clicked get-global propagate-gesture ;
@@ -257,7 +257,7 @@ SYMBOL: drag-timer
     dup hand-last-button get = ;
 
 : multi-click-position? ( -- ? )
-    hand-loc get hand-click-loc get distance 10 <= ;
+    hand-loc get-global hand-click-loc get-global distance 10 <= ;
 
 : multi-click? ( button -- ? )
     {