From b0524db8275ac463e141bed28c2993cd66d0bec0 Mon Sep 17 00:00:00 2001 From: "wayo.cavazos" Date: Thu, 23 Feb 2006 23:28:30 +0000 Subject: [PATCH] Minor fixes in contrib/x11 --- contrib/x11/x.factor | 8 +++++--- contrib/x11/xlib.factor | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/contrib/x11/x.factor b/contrib/x11/x.factor index f1c78f2f2b..9e63f83281 100644 --- a/contrib/x11/x.factor +++ b/contrib/x11/x.factor @@ -230,7 +230,8 @@ dup length 1 - [ swap 2nth draw-line ] each-with ; : sync-dpy ( discard -- ) >r dpy get r> XSync ; -: next-event ( -- event ) dpy get "XEvent" dup >r XNextEvent drop r> ; +: next-event ( -- event ) +dpy get "XEvent" dup >r XNextEvent drop r> ; : mask-event ( mask -- event ) >r dpy get r> "XEvent" dup >r XMaskEvent drop r> ; @@ -283,7 +284,6 @@ dup length 1 - [ swap 2nth draw-line ] each-with ; : destroy-window+ [ destroy-window ] with-win ; : map-window+ [ map-window ] with-win ; : unmap-window+ [ unmap-window ] with-win ; -: valid-window?+ [ valid-window? ] with-win ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -335,7 +335,9 @@ dup length 1 - [ swap 2nth draw-line ] each-with ; drop drop ; : valid-window? ( -- ? ) - dpy get win get "XWindowAttributes" XGetWindowAttributes 0 = not ; +dpy get win get "XWindowAttributes" XGetWindowAttributes 0 = not ; + +: valid-window?+ [ valid-window? ] with-win ; : mouse-sensor ( -- { root-x root-y } ) dpy get win get 0 0 0 0 2dup >r >r diff --git a/contrib/x11/xlib.factor b/contrib/x11/xlib.factor index d8b91adef4..0033cab2d6 100644 --- a/contrib/x11/xlib.factor +++ b/contrib/x11/xlib.factor @@ -967,11 +967,11 @@ END-STRUCT BEGIN-STRUCT: XErrorEvent FIELD: int type FIELD: Display* display + FIELD: XID resourceid FIELD: ulong serial FIELD: uchar error_code FIELD: uchar request_code FIELD: uchar minor_code - FIELD: XID resourceid END-STRUCT ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -1091,6 +1091,10 @@ FUNCTION: int XPending ( Display* display ) ; FUNCTION: Status XSendEvent ( Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send ) ; +! 11.8 - Handling Protocol Errors + +FUNCTION: int XSetErrorHandler ( void* handler ) ; + ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! 12 - Input Device Functions ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!