 
 : 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

M: world leave-event 2drop forget-rollover ;

M: world motion-event
    [ dup XMotionEvent-x swap XMotionEvent-y 2array ] dip
    move-hand fire-motion ;

M: world focus-in-event

    } at ;

M: world wheel-event
    [ [ mouse-event>scroll-direction ] [ mouse-event-loc ] bi ] dip
    send-wheel ;

M: world enter-event motion-event ;
