summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-panel/xstuff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mate-panel/xstuff.c b/mate-panel/xstuff.c
index 9af5d919..898bcb6f 100644
--- a/mate-panel/xstuff.c
+++ b/mate-panel/xstuff.c
@@ -700,7 +700,11 @@ xstuff_grab_key_on_all_screens (int keycode,
int i;
display = gdk_display_get_default ();
+#if GTK_CHECK_VERSION(3, 10, 0)
+ n_screens = 1; /* gdk-3.10, The number of screens is always 1 */
+#else
n_screens = gdk_display_get_n_screens (display);
+#endif
for (i = 0; i < n_screens; i++) {
GdkWindow *root;