diff options
Diffstat (limited to 'libwnck/xutils.c')
-rw-r--r-- | libwnck/xutils.c | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/libwnck/xutils.c b/libwnck/xutils.c index 58873dc..08e6325 100644 --- a/libwnck/xutils.c +++ b/libwnck/xutils.c @@ -719,113 +719,6 @@ _wnck_error_trap_pop (Display *display) return gdk_x11_display_error_trap_pop (gdk_display); } -static GdkFilterReturn -filter_func (GdkXEvent *gdkxevent, - GdkEvent *event, - gpointer data) -{ - XEvent *xevent = gdkxevent; -#ifdef HAVE_STARTUP_NOTIFICATION - int i; - Display *display; -#endif /* HAVE_STARTUP_NOTIFICATION */ - - switch (xevent->type) - { - case PropertyNotify: - { - WnckScreen *screen; - - screen = wnck_screen_get_for_root (xevent->xany.window); - if (screen != NULL) - _wnck_screen_process_property_notify (screen, xevent); - else - { - WnckWindow *window; - WnckApplication *app; - - window = wnck_window_get (xevent->xany.window); - app = wnck_application_get (xevent->xany.window); - - if (app) - _wnck_application_process_property_notify (app, xevent); - - if (window) - _wnck_window_process_property_notify (window, xevent); - } - } - break; - - case ConfigureNotify: - { - WnckWindow *window; - - window = wnck_window_get (xevent->xconfigure.window); - - if (window) - _wnck_window_process_configure_notify (window, xevent); - } - break; - - case SelectionClear: - { - _wnck_desktop_layout_manager_process_event (xevent); - } - break; - - case ClientMessage: -#ifdef HAVE_STARTUP_NOTIFICATION - /* We're cheating as officially libsn requires - * us to send all events through sn_display_process_event - */ - i = 0; - display = ((XAnyEvent *) xevent)->display; - - while (i < ScreenCount (display)) - { - WnckScreen *s; - - s = _wnck_screen_get_existing (i); - if (s != NULL) - sn_display_process_event (_wnck_screen_get_sn_display (s), - xevent); - - ++i; - } -#endif /* HAVE_STARTUP_NOTIFICATION */ - break; - - default: - break; - } - - return GDK_FILTER_CONTINUE; -} - -static gboolean _wnck_event_filter_initialized = FALSE; - -void -_wnck_event_filter_init (void) -{ - - if (!_wnck_event_filter_initialized) - { - gdk_window_add_filter (NULL, filter_func, NULL); - _wnck_event_filter_initialized = TRUE; - } -} - -void -_wnck_event_filter_shutdown (void) -{ - - if (_wnck_event_filter_initialized) - { - gdk_window_remove_filter (NULL, filter_func, NULL); - _wnck_event_filter_initialized = FALSE; - } -} - int _wnck_xid_equal (gconstpointer v1, gconstpointer v2) |