Merge branch 'master' of git://factorcode.org/git/factor

db4
Doug Coleman 2009-08-31 11:34:39 -05:00
commit 736f78dfb5
2 changed files with 18 additions and 17 deletions

View File

@ -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 )

View 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 ;