diff options
author | monsta <[email protected]> | 2016-11-20 22:24:08 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-11-20 22:24:08 +0300 |
commit | de1227d4355f56017270f3a7541b8be21fd955af (patch) | |
tree | 37ad9b1c13c571ed51da2c5649e33cb9a2a9e7fe /plugins/media-keys/msd-media-keys-manager.c | |
parent | c0e9048f916f4141292ca3b107735496e698cac5 (diff) | |
download | mate-settings-daemon-de1227d4355f56017270f3a7541b8be21fd955af.tar.bz2 mate-settings-daemon-de1227d4355f56017270f3a7541b8be21fd955af.tar.xz |
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require libmatekbd and libmate-desktop >= 1.17
Diffstat (limited to 'plugins/media-keys/msd-media-keys-manager.c')
-rw-r--r-- | plugins/media-keys/msd-media-keys-manager.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c index 7526a89..32d5d34 100644 --- a/plugins/media-keys/msd-media-keys-manager.c +++ b/plugins/media-keys/msd-media-keys-manager.c @@ -395,11 +395,9 @@ dialog_show (MsdMediaKeysManager *manager) int screen_h; int x; int y; -#if GTK_CHECK_VERSION (3, 0, 0) GdkDisplay *display; GdkDeviceManager *device_manager; GdkDevice *pointer; -#endif int pointer_x; int pointer_y; GtkRequisition win_req; @@ -420,11 +418,7 @@ dialog_show (MsdMediaKeysManager *manager) * know its true size, yet, so we need to jump through hoops */ gtk_window_get_default_size (GTK_WINDOW (manager->priv->dialog), &orig_w, &orig_h); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_get_preferred_size (manager->priv->dialog, NULL, &win_req); -#else - gtk_widget_size_request (manager->priv->dialog, &win_req); -#endif if (win_req.width > orig_w) { orig_w = win_req.width; @@ -434,7 +428,6 @@ dialog_show (MsdMediaKeysManager *manager) } pointer_screen = NULL; -#if GTK_CHECK_VERSION (3, 0, 0) display = gdk_screen_get_display (manager->priv->current_screen); device_manager = gdk_display_get_device_manager (display); pointer = gdk_device_manager_get_client_pointer (device_manager); @@ -443,13 +436,7 @@ dialog_show (MsdMediaKeysManager *manager) &pointer_screen, &pointer_x, &pointer_y); -#else - gdk_display_get_pointer (gdk_screen_get_display (manager->priv->current_screen), - &pointer_screen, - &pointer_x, - &pointer_y, - NULL); -#endif + if (pointer_screen != manager->priv->current_screen) { /* The pointer isn't on the current screen, so just * assume the default monitor @@ -1224,11 +1211,8 @@ msd_media_keys_manager_stop (MsdMediaKeysManager *manager) if (need_flush) gdk_flush (); -#if GTK_CHECK_VERSION (3, 0, 0) + gdk_error_trap_pop_ignored (); -#else - gdk_error_trap_pop (); -#endif g_slist_free (priv->screens); priv->screens = NULL; |