Enlightenment CVS committal Author : xcomputerman Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: Ecore_X.h ecore_x_events.c Log Message: - Use XChangeWindowAttributes() instead of XSelectInput() - Add event_mask_unset to allow deselecting events =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -3 -r1.43 -r1.44 --- Ecore_X.h 11 Apr 2004 21:09:12 -0000 1.43 +++ Ecore_X.h 23 Apr 2004 22:48:20 -0000 1.44 @@ -698,6 +698,7 @@ int ecore_x_error_code_get(void); void ecore_x_event_mask_set(Ecore_X_Window w, long mask); +void ecore_x_event_mask_unset(Ecore_X_Window w, long mask); int ecore_x_selection_primary_set(Ecore_X_Window w, unsigned char *data, int size); int ecore_x_selection_primary_clear(void); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -3 -r1.26 -r1.27 --- ecore_x_events.c 23 Apr 2004 22:17:01 -0000 1.26 +++ ecore_x_events.c 23 Apr 2004 22:48:21 -0000 1.27 @@ -19,10 +19,24 @@ ecore_x_event_mask_set(Ecore_X_Window w, long mask) { XWindowAttributes attr; + XSetWindowAttributes s_attr; memset(&attr, 0, sizeof(XWindowAttributes)); XGetWindowAttributes(_ecore_x_disp, w, &attr); - XSelectInput(_ecore_x_disp, w, mask | attr.your_event_mask); + s_attr.event_mask = mask | attr.your_event_mask; + XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr); +} + +void +ecore_x_event_mask_unset(Ecore_X_Window w, long mask) +{ + XWindowAttributes attr; + XSetWindowAttributes s_attr; + + memset(&attr, 0, sizeof(XWindowAttributes)); + XGetWindowAttributes(_ecore_x_disp, w, &attr); + s_attr.event_mask = attr.your_event_mask & ~mask; + XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr); } static void ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs