summaryrefslogtreecommitdiff
path: root/plugins/keyboard
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-05-18 02:01:51 +0200
committerinfirit <[email protected]>2014-05-18 02:01:51 +0200
commite51fa1d6096b061a89e2d234b2c13ddb578ff518 (patch)
treeadc330c23f64b059ee97b5c5e45acb3be66005ae /plugins/keyboard
parent520041451fd356d679da39f83d17585777643a85 (diff)
downloadmate-settings-daemon-e51fa1d6096b061a89e2d234b2c13ddb578ff518.tar.bz2
mate-settings-daemon-e51fa1d6096b061a89e2d234b2c13ddb578ff518.tar.xz
gdk_window_*_filter are in gdk2
Diffstat (limited to 'plugins/keyboard')
-rw-r--r--plugins/keyboard/delayed-dialog.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/plugins/keyboard/delayed-dialog.c b/plugins/keyboard/delayed-dialog.c
index dcddef7..0027c04 100644
--- a/plugins/keyboard/delayed-dialog.c
+++ b/plugins/keyboard/delayed-dialog.c
@@ -46,9 +46,6 @@ msd_delayed_show_dialog (GtkWidget *dialog)
GdkDisplay *display = gtk_widget_get_display (dialog);
Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
GdkScreen *screen = gtk_widget_get_screen (dialog);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- GdkAtom manager_atom;
-#endif
char selection_name[10];
Atom selection_atom;
@@ -66,13 +63,7 @@ msd_delayed_show_dialog (GtkWidget *dialog)
dialogs = g_slist_prepend (dialogs, dialog);
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_window_add_filter (NULL, message_filter, NULL);
-#else
- manager_atom = gdk_atom_intern ("MANAGER", FALSE);
- gdk_display_add_client_message_filter (display, manager_atom,
- message_filter, NULL);
-#endif
g_timeout_add (5000, delayed_show_timeout, NULL);
}
@@ -95,17 +86,11 @@ delayed_show_timeout (gpointer data)
static GdkFilterReturn
message_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
XClientMessageEvent *evt;
char *selection_name;
-#else
- XClientMessageEvent *evt = (XClientMessageEvent *)xevent;
- char *selection_name = XGetAtomName (evt->display, evt->data.l[1]);
-#endif
int screen;
GSList *l, *next;
-#if GTK_CHECK_VERSION (3, 0, 0)
if (((XEvent *)xevent)->type != ClientMessage)
return GDK_FILTER_CONTINUE;
@@ -115,10 +100,6 @@ message_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
return GDK_FILTER_CONTINUE;
selection_name = XGetAtomName (evt->display, evt->data.l[1]);
-#else
- if (!dialogs)
- return GDK_FILTER_CONTINUE;
-#endif
if (strncmp (selection_name, "WM_S", 4) != 0) {
XFree (selection_name);
@@ -138,16 +119,10 @@ message_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
}
if (!dialogs) {
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_window_remove_filter (NULL, message_filter, NULL);
-#else
- /* FIXME: There's no gdk_display_remove_client_message_filter */
-#endif
}
-#if GTK_CHECK_VERSION (3, 0, 0)
XFree (selection_name);
-#endif
return GDK_FILTER_CONTINUE;
}