mirror of
https://github.com/brl/mutter.git
synced 2025-08-04 23:54:40 +00:00
add an event_serial argument and use it when the pointer is already
2003-11-24 Havoc Pennington <hp@redhat.com> * src/display.c (meta_display_begin_grab_op): add an event_serial argument and use it when the pointer is already grabbed automatically on the button press. May fix bug #126871
This commit is contained in:

committed by
Havoc Pennington

parent
feefcdd892
commit
423b5f5f39
16
src/ui.c
16
src/ui.c
@@ -69,6 +69,7 @@ struct _EventFunc
|
||||
{
|
||||
MetaEventFunc func;
|
||||
gpointer data;
|
||||
int last_event_serial;
|
||||
};
|
||||
|
||||
static GdkFilterReturn
|
||||
@@ -83,7 +84,10 @@ filter_func (GdkXEvent *xevent,
|
||||
if ((* ef->func) (xevent, ef->data))
|
||||
return GDK_FILTER_REMOVE;
|
||||
else
|
||||
return GDK_FILTER_CONTINUE;
|
||||
{
|
||||
ef->last_event_serial = ((XEvent*)xevent)->xany.serial;
|
||||
return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
}
|
||||
|
||||
static EventFunc *ef = NULL;
|
||||
@@ -116,6 +120,16 @@ meta_ui_remove_event_func (Display *xdisplay,
|
||||
ef = NULL;
|
||||
}
|
||||
|
||||
int
|
||||
meta_ui_get_last_event_serial (Display *xdisplay)
|
||||
{
|
||||
g_assert (ef != NULL);
|
||||
|
||||
/* This is technically broken since it's not per-display */
|
||||
|
||||
return ef->last_event_serial;
|
||||
}
|
||||
|
||||
MetaUI*
|
||||
meta_ui_new (Display *xdisplay,
|
||||
Screen *screen)
|
||||
|
Reference in New Issue
Block a user