diff options
Diffstat (limited to 'src/gs-manager.c')
-rw-r--r-- | src/gs-manager.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/gs-manager.c b/src/gs-manager.c index 2c7490b..0f346ee 100644 --- a/src/gs-manager.c +++ b/src/gs-manager.c @@ -1103,9 +1103,7 @@ find_window_at_pointer (GSManager *manager) { GdkDisplay *display; GdkScreen *screen; -#if GTK_CHECK_VERSION (3, 0, 0) GdkDevice *device; -#endif int monitor; int x, y; GSWindow *window; @@ -1114,16 +1112,12 @@ find_window_at_pointer (GSManager *manager) display = gdk_display_get_default (); -#if GTK_CHECK_VERSION (3, 0, 0) #if GTK_CHECK_VERSION (3, 20, 0) device = gdk_seat_get_pointer (gdk_display_get_default_seat (display)); #else device = gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (display)); #endif gdk_device_get_position (device, &screen, &x, &y); -#else - gdk_display_get_pointer (display, &screen, &x, &y, NULL); -#endif monitor = gdk_screen_get_monitor_at_point (screen, x, y); screen_num = gdk_screen_get_number (screen); @@ -1176,24 +1170,18 @@ manager_maybe_grab_window (GSManager *manager, { GdkDisplay *display; GdkScreen *screen; -#if GTK_CHECK_VERSION (3, 0, 0) GdkDevice *device; -#endif int monitor; int x, y; gboolean grabbed; display = gdk_display_get_default (); -#if GTK_CHECK_VERSION (3, 0, 0) #if GTK_CHECK_VERSION (3, 20, 0) device = gdk_seat_get_pointer (gdk_display_get_default_seat (display)); #else device = gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (display)); #endif gdk_device_get_position (device, &screen, &x, &y); -#else - gdk_display_get_pointer (display, &screen, &x, &y, NULL); -#endif monitor = gdk_screen_get_monitor_at_point (screen, x, y); gdk_flush (); @@ -1277,11 +1265,7 @@ static void apply_background_to_window (GSManager *manager, GSWindow *window) { -#if GTK_CHECK_VERSION (3, 0, 0) cairo_surface_t *surface; -#else - GdkPixmap *pixmap; -#endif GdkScreen *screen; int width; int height; @@ -1289,18 +1273,13 @@ apply_background_to_window (GSManager *manager, if (manager->priv->bg == NULL) { gs_debug ("No background available"); -#if GTK_CHECK_VERSION (3, 0, 0) gs_window_set_background_surface (window, NULL); -#else - gs_window_set_background_pixmap (window, NULL); -#endif } screen = gs_window_get_screen (window); width = gdk_screen_get_width (screen); height = gdk_screen_get_height (screen); gs_debug ("Creating background w:%d h:%d", width, height); -#if GTK_CHECK_VERSION (3, 0, 0) surface = mate_bg_create_surface (manager->priv->bg, gs_window_get_gdk_window (window), width, @@ -1308,15 +1287,6 @@ apply_background_to_window (GSManager *manager, FALSE); gs_window_set_background_surface (window, surface); cairo_surface_destroy (surface); -#else - pixmap = mate_bg_create_pixmap (manager->priv->bg, - gs_window_get_gdk_window (window), - width, - height, - FALSE); - gs_window_set_background_pixmap (window, pixmap); - g_object_unref (pixmap); -#endif } static void @@ -1666,10 +1636,6 @@ gs_manager_destroy_windows (GSManager *manager) { GdkDisplay *display; GSList *l; -#if !GTK_CHECK_VERSION (3, 10, 0) - int n_screens; - int i; -#endif g_return_if_fail (manager != NULL); g_return_if_fail (GS_IS_MANAGER (manager)); @@ -1681,20 +1647,9 @@ gs_manager_destroy_windows (GSManager *manager) display = gdk_display_get_default (); -#if GTK_CHECK_VERSION (3, 10, 0) g_signal_handlers_disconnect_by_func (gdk_display_get_default_screen (display), on_screen_monitors_changed, manager); -#else - n_screens = gdk_display_get_n_screens (display); - - for (i = 0; i < n_screens; i++) - { - g_signal_handlers_disconnect_by_func (gdk_display_get_screen (display, i), - on_screen_monitors_changed, - manager); - } -#endif for (l = manager->priv->windows; l; l = l->next) { @@ -1777,10 +1732,6 @@ static void gs_manager_create_windows (GSManager *manager) { GdkDisplay *display; -#if !GTK_CHECK_VERSION (3, 10, 0) - int n_screens; - int i; -#endif g_return_if_fail (manager != NULL); g_return_if_fail (GS_IS_MANAGER (manager)); @@ -1788,7 +1739,6 @@ gs_manager_create_windows (GSManager *manager) g_assert (manager->priv->windows == NULL); display = gdk_display_get_default (); -#if GTK_CHECK_VERSION (3, 10, 0) g_signal_connect (gdk_display_get_default_screen (display), "monitors-changed", G_CALLBACK (on_screen_monitors_changed), @@ -1796,20 +1746,6 @@ gs_manager_create_windows (GSManager *manager) gs_manager_create_windows_for_screen (manager, gdk_display_get_default_screen (display)); -#else - n_screens = gdk_display_get_n_screens (display); - - for (i = 0; i < n_screens; i++) - { - g_signal_connect (gdk_display_get_screen (display, i), - "monitors-changed", - G_CALLBACK (on_screen_monitors_changed), - manager); - - gs_manager_create_windows_for_screen (manager, - gdk_display_get_screen (display, i)); - } -#endif } GSManager * |