]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' of git://factorcode.org/git/factor
authorSlava Pestov <slava@factorcode.org>
Mon, 31 Aug 2009 04:24:46 +0000 (00:24 -0400)
committerSlava Pestov <slava@factorcode.org>
Mon, 31 Aug 2009 04:24:46 +0000 (00:24 -0400)
basis/ui/backend/x11/x11.factor
basis/x11/events/events.factor

index fcaf0e2a702d6523061aad1906b058cd3714d3f8..978fed6bf8906db9c6e16f9ea80132bc0e685b20 100755 (executable)
@@ -49,7 +49,8 @@ PIXEL-FORMAT-ATTRIBUTE-TABLE: glx-visual { $ GLX_USE_GL $ GLX_RGBA } H{
 
 M: x11-ui-backend (make-pixel-format)
     [ drop dpy get scr get ] dip
-    >glx-visual-int-array glXChooseVisual ;
+    >glx-visual-int-array glXChooseVisual
+    XVisualInfo memory>struct ;
 
 M: x11-ui-backend (free-pixel-format)
     handle>> XFree ;
@@ -223,7 +224,7 @@ M: world client-event
     ] [ wait-for-display wait-event ] if ;
 
 M: x11-ui-backend do-events
-    wait-event dup window>> window dup
+    wait-event dup XAnyEvent>> window>> window dup
     [ handle-event ] [ 2drop ] if ;
 
 : x-clipboard@ ( gadget clipboard -- prop win )
index a24f6a45aad65b3b4dd0eb3484ef766b5ce86fd2..febbbfa13505b4ab4fbc27714153c2082ff2cea9 100644 (file)
@@ -51,21 +51,21 @@ GENERIC: client-event ( event window -- )
     over wheel? [ 2drop ] [ button-up-event ] if ;
 
 : handle-event ( event window -- )
-    over type>> {
-        { Expose [ XExposeEvent>> expose-event ] }
-        { ConfigureNotify [ XConfigureEvent>> configure-event ] }
-        { ButtonPress [ XButtonEvent>> button-down-event$ ] }
-        { ButtonRelease [ XButtonEvent>> button-up-event$ ] }
-        { EnterNotify [ XCrossingEvent>> enter-event ] }
-        { LeaveNotify [ XCrossingEvent>> leave-event ] }
-        { MotionNotify [ XMotionEvent>> motion-event ] }
-        { KeyPress [ XKeyEvent>> key-down-event ] }
-        { KeyRelease [ XKeyEvent>> key-up-event ] }
-        { FocusIn [ XFocusChangeEvent>> focus-in-event ] }
-        { FocusOut [ XFocusChangeEvent>> focus-out-event ] }
-        { SelectionNotify [ XSelectionEvent>> selection-notify-event ] }
-        { SelectionRequest [ XSelectionRequestEvent>> selection-request-event ] }
-        { ClientMessage [ XClientMessageEvent>> client-event ] }
+    swap dup XAnyEvent>> type>> {
+        { Expose [ XExposeEvent>> swap expose-event ] }
+        { ConfigureNotify [ XConfigureEvent>> swap configure-event ] }
+        { ButtonPress [ XButtonEvent>> swap button-down-event$ ] }
+        { ButtonRelease [ XButtonEvent>> swap button-up-event$ ] }
+        { EnterNotify [ XCrossingEvent>> swap enter-event ] }
+        { LeaveNotify [ XCrossingEvent>> swap leave-event ] }
+        { MotionNotify [ XMotionEvent>> swap motion-event ] }
+        { KeyPress [ XKeyEvent>> swap key-down-event ] }
+        { KeyRelease [ XKeyEvent>> swap key-up-event ] }
+        { FocusIn [ XFocusChangeEvent>> swap focus-in-event ] }
+        { FocusOut [ XFocusChangeEvent>> swap focus-out-event ] }
+        { SelectionNotify [ XSelectionEvent>> swap selection-notify-event ] }
+        { SelectionRequest [ XSelectionRequestEvent>> swap selection-request-event ] }
+        { ClientMessage [ XClientMessageEvent>> swap client-event ] }
         [ 3drop ]
     } case ;