Piotr Caban piotr@codeweavers.com writes:
@@ -499,6 +499,7 @@ extern Atom systray_atom DECLSPEC_HIDDEN; typedef BOOL (*x11drv_event_handler)( HWND hwnd, XEvent *event );
extern void X11DRV_register_event_handler( int type, x11drv_event_handler handler, const char *name ) DECLSPEC_HIDDEN; +extern void X11DRV_register_XFixesSelectionNotify( int type ) DECLSPEC_HIDDEN;
Is there a reason you can't use X11DRV_register_event_handler?
On 05/24/17 14:15, Alexandre Julliard wrote:
Piotr Caban piotr@codeweavers.com writes:
@@ -499,6 +499,7 @@ extern Atom systray_atom DECLSPEC_HIDDEN; typedef BOOL (*x11drv_event_handler)( HWND hwnd, XEvent *event );
extern void X11DRV_register_event_handler( int type, x11drv_event_handler handler, const char *name ) DECLSPEC_HIDDEN; +extern void X11DRV_register_XFixesSelectionNotify( int type ) DECLSPEC_HIDDEN;
Is there a reason you can't use X11DRV_register_event_handler?
I didn't find any guarantee that returned event type will be small enough to fit into the handlers table. In my testing event_base returned by XFixesQueryExtension was equal to 83.
I can change the patch to use X11DRV_register_event_handler. I don't know if it's correct.
Thanks, Piotr
Piotr Caban piotr@codeweavers.com writes:
On 05/24/17 14:15, Alexandre Julliard wrote:
Piotr Caban piotr@codeweavers.com writes:
@@ -499,6 +499,7 @@ extern Atom systray_atom DECLSPEC_HIDDEN; typedef BOOL (*x11drv_event_handler)( HWND hwnd, XEvent *event ); extern void X11DRV_register_event_handler( int type, x11drv_event_handler handler, const char *name ) DECLSPEC_HIDDEN; +extern void X11DRV_register_XFixesSelectionNotify( int type ) DECLSPEC_HIDDEN;
Is there a reason you can't use X11DRV_register_event_handler?
I didn't find any guarantee that returned event type will be small enough to fit into the handlers table. In my testing event_base returned by XFixesQueryExtension was equal to 83.
It will fit, 128 is an X protocol limit.