summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryetist <[email protected]>2015-06-19 00:19:49 +0800
committerinfirit <[email protected]>2015-08-26 14:44:57 +0200
commit8f69742b195a7865bc0a23f660afa888aa437f86 (patch)
tree8c5b0d59a5d2f4e78814dcfe5fff53620018a55e
parent251c46b14ff1cdc3c80c7c1aa04ea1e34ed6f945 (diff)
downloadmate-panel-8f69742b195a7865bc0a23f660afa888aa437f86.tar.bz2
mate-panel-8f69742b195a7865bc0a23f660afa888aa437f86.tar.xz
Gtk3: gdk_display_get_n_screens() always return 1 from 3.10
-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;