diff options
author | Havoc Pennington <hp@redhat.com> | 2003-11-24 18:09:47 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2003-11-24 18:09:47 +0000 |
commit | 423b5f5f3967eda1879affd3b82aadb4d9355c8d (patch) | |
tree | d19c9e970eba9fb014605420d956e3cee669f800 /src/ui.c | |
parent | feefcdd8920720b631c7eb0d45f09f79a30b8095 (diff) | |
download | mutter-423b5f5f3967eda1879affd3b82aadb4d9355c8d.tar.gz |
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
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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) |