]> gitweb.factorcode.org Git - factor.git/commitdiff
Use bi instead of dup/swap in a couple of places
authorU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Tue, 2 Dec 2008 00:20:32 +0000 (18:20 -0600)
committerU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Tue, 2 Dec 2008 00:20:32 +0000 (18:20 -0600)
basis/ui/x11/x11.factor [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index b5c71bc..b65236d
@@ -117,7 +117,7 @@ M: world button-up-event
     } at ;
 
 M: world wheel-event
-    [ dup mouse-event>scroll-direction swap mouse-event-loc ] dip
+    [ [ mouse-event>scroll-direction ] [ mouse-event-loc ] bi ] dip
     send-wheel ;
 
 M: world enter-event motion-event ;
@@ -125,7 +125,7 @@ M: world enter-event motion-event ;
 M: world leave-event 2drop forget-rollover ;
 
 M: world motion-event
-    [ dup XMotionEvent-x swap XMotionEvent-y 2array ] dip
+    [ [ XMotionEvent-x ] [ XMotionEvent-y ] bi 2array ] dip
     move-hand fire-motion ;
 
 M: world focus-in-event
@@ -146,10 +146,10 @@ M: world selection-notify-event
 
 : clipboard-for-atom ( atom -- clipboard )
     {
-        { [ dup XA_PRIMARY = ] [ drop selection get ] }
-        { [ dup XA_CLIPBOARD = ] [ drop clipboard get ] }
+        { XA_PRIMARY [ selection get ] }
+        { XA_CLIPBOARD [ clipboard get ] }
         [ drop <clipboard> ]
-    } cond ;
+    } case ;
 
 : encode-clipboard ( string type -- bytes )
     XSelectionRequestEvent-target