diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gs-grab-x11.c | 46 | ||||
-rw-r--r-- | src/gs-lock-plug.c | 40 | ||||
-rw-r--r-- | src/gs-manager.c | 79 | ||||
-rw-r--r-- | src/gs-window-x11.c | 73 | ||||
-rw-r--r-- | src/gs-window.h | 11 | ||||
-rw-r--r-- | src/mate-screensaver-preferences.c | 4 | ||||
-rw-r--r-- | src/test-window.c | 10 |
7 files changed, 1 insertions, 262 deletions
diff --git a/src/gs-grab-x11.c b/src/gs-grab-x11.c index d174716..18066a4 100644 --- a/src/gs-grab-x11.c +++ b/src/gs-grab-x11.c @@ -72,10 +72,8 @@ grab_string (int status) return "GrabNotViewable"; case GDK_GRAB_FROZEN: return "GrabFrozen"; -#if GTK_CHECK_VERSION (3, 16, 0) case GDK_GRAB_FAILED: return "GrabFailed"; -#endif default: { static char foo [255]; @@ -152,7 +150,6 @@ xorg_lock_smasher_set_active (GSGrab *grab, } #endif /* HAVE_XF86MISCSETGRABKEYSSTATE */ -#if GTK_CHECK_VERSION (3, 20, 0) static void prepare_window_grab_cb (GdkSeat *seat, GdkWindow *window, @@ -160,7 +157,6 @@ prepare_window_grab_cb (GdkSeat *seat, { gdk_window_show_unraised (window); } -#endif static int gs_grab_get (GSGrab *grab, @@ -170,10 +166,8 @@ gs_grab_get (GSGrab *grab, gboolean hide_cursor) { GdkGrabStatus status; -#if GTK_CHECK_VERSION (3, 20, 0) GdkSeat *seat; GdkSeatCapabilities caps; -#endif GdkCursor *cursor; g_return_val_if_fail (window != NULL, FALSE); @@ -183,7 +177,6 @@ gs_grab_get (GSGrab *grab, gs_debug ("Grabbing devices for window=%X", (guint32) GDK_WINDOW_XID (window)); -#if GTK_CHECK_VERSION (3, 20, 0) seat = gdk_display_get_default_seat (display); if (!no_pointer_grab) caps = GDK_SEAT_CAPABILITY_ALL; @@ -210,31 +203,6 @@ gs_grab_get (GSGrab *grab, (hide_cursor ? cursor : NULL), NULL, NULL, NULL); } -#else - status = gdk_keyboard_grab (window, FALSE, GDK_CURRENT_TIME); - - if (status == GDK_GRAB_SUCCESS && !no_pointer_grab) - { - GdkGrabStatus pstatus; - - pstatus = gdk_pointer_grab (window, TRUE, 0, NULL, - (hide_cursor ? cursor : NULL), - GDK_CURRENT_TIME); - - if (pstatus != GDK_GRAB_SUCCESS) - { - gdk_keyboard_ungrab (GDK_CURRENT_TIME); - if (status == GDK_GRAB_SUCCESS) - { - status = pstatus; - } - } - } - else - { - gdk_pointer_ungrab (GDK_CURRENT_TIME); - } -#endif if (status == GDK_GRAB_SUCCESS) { @@ -273,25 +241,15 @@ gs_grab_reset (GSGrab *grab) void gs_grab_release (GSGrab *grab, gboolean flush) { -#if GTK_CHECK_VERSION (3, 20, 0) GdkDisplay *display; GdkSeat *seat; display = gdk_display_get_default (); seat = gdk_display_get_default_seat (display); -#endif gs_debug ("Ungrabbing devices"); -#if GTK_CHECK_VERSION (3, 20, 0) gdk_seat_ungrab (seat); -#else - if (gdk_pointer_is_grabbed ()) - { - gdk_pointer_ungrab (GDK_CURRENT_TIME); - } - gdk_keyboard_ungrab (GDK_CURRENT_TIME); -#endif gs_grab_reset (grab); @@ -453,11 +411,7 @@ gs_grab_grab_root (GSGrab *grab, gs_debug ("Grabbing the root window"); display = gdk_display_get_default (); -#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, NULL, NULL); root = gdk_screen_get_root_window (screen); diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c index 5bea72a..e4692e4 100644 --- a/src/gs-lock-plug.c +++ b/src/gs-lock-plug.c @@ -79,10 +79,6 @@ static void gs_lock_plug_finalize (GObject *object); #define GS_LOCK_PLUG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_LOCK_PLUG, GSLockPlugPrivate)) -#if !GTK_CHECK_VERSION (3, 20, 0) -#define gtk_widget_set_focus_on_click(a, b) gtk_button_set_focus_on_click(GTK_BUTTON(a), b) -#endif - struct GSLockPlugPrivate { GtkWidget *vbox; @@ -1459,20 +1455,14 @@ logout_button_clicked (GtkButton *button, void gs_lock_plug_set_busy (GSLockPlug *plug) { -#if GTK_CHECK_VERSION (3, 16, 0) GdkDisplay *display; -#endif GdkCursor *cursor; GtkWidget *top_level; top_level = gtk_widget_get_toplevel (GTK_WIDGET (plug)); -#if GTK_CHECK_VERSION (3, 16, 0) display = gtk_widget_get_display (GTK_WIDGET (plug)); cursor = gdk_cursor_new_for_display (display, GDK_WATCH); -#else - cursor = gdk_cursor_new (GDK_WATCH); -#endif gdk_window_set_cursor (gtk_widget_get_window (top_level), cursor); g_object_unref (cursor); @@ -1481,20 +1471,14 @@ gs_lock_plug_set_busy (GSLockPlug *plug) void gs_lock_plug_set_ready (GSLockPlug *plug) { -#if GTK_CHECK_VERSION (3, 16, 0) GdkDisplay *display; -#endif GdkCursor *cursor; GtkWidget *top_level; top_level = gtk_widget_get_toplevel (GTK_WIDGET (plug)); -#if GTK_CHECK_VERSION (3, 16, 0) display = gtk_widget_get_display (GTK_WIDGET (plug)); cursor = gdk_cursor_new_for_display (display, GDK_LEFT_PTR); -#else - cursor = gdk_cursor_new (GDK_LEFT_PTR); -#endif gdk_window_set_cursor (gtk_widget_get_window (top_level), cursor); g_object_unref (cursor); } @@ -1856,24 +1840,16 @@ create_page_one (GSLockPlug *plug) str = g_strdup ("<span size=\"xx-large\" weight=\"ultrabold\">%s</span>"); plug->priv->auth_time_label = gtk_label_new (str); g_free (str); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (plug->priv->auth_time_label), 0.5); gtk_label_set_yalign (GTK_LABEL (plug->priv->auth_time_label), 0.5); -#else - gtk_misc_set_alignment (GTK_MISC (plug->priv->auth_time_label), 0.5, 0.5); -#endif gtk_label_set_use_markup (GTK_LABEL (plug->priv->auth_time_label), TRUE); gtk_box_pack_start (GTK_BOX (vbox2), plug->priv->auth_time_label, FALSE, FALSE, 0); str = g_strdup ("<span size=\"large\">%s</span>"); plug->priv->auth_date_label = gtk_label_new (str); g_free (str); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (plug->priv->auth_date_label), 0.5); gtk_label_set_yalign (GTK_LABEL (plug->priv->auth_date_label), 0.5); -#else - gtk_misc_set_alignment (GTK_MISC (plug->priv->auth_date_label), 0.5, 0.5); -#endif gtk_label_set_use_markup (GTK_LABEL (plug->priv->auth_date_label), TRUE); gtk_box_pack_start (GTK_BOX (vbox2), plug->priv->auth_date_label, FALSE, FALSE, 0); @@ -1889,12 +1865,8 @@ create_page_one (GSLockPlug *plug) plug->priv->auth_realname_label = gtk_label_new (str); g_free (str); expand_string_for_label (plug->priv->auth_realname_label); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (plug->priv->auth_realname_label), 0.5); gtk_label_set_yalign (GTK_LABEL (plug->priv->auth_realname_label), 0.5); -#else - gtk_misc_set_alignment (GTK_MISC (plug->priv->auth_realname_label), 0.5, 0.5); -#endif gtk_label_set_use_markup (GTK_LABEL (plug->priv->auth_realname_label), TRUE); gtk_box_pack_start (GTK_BOX (vbox2), plug->priv->auth_realname_label, FALSE, FALSE, 0); @@ -1903,12 +1875,8 @@ create_page_one (GSLockPlug *plug) plug->priv->auth_username_label = gtk_label_new (str); g_free (str); expand_string_for_label (plug->priv->auth_username_label); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (plug->priv->auth_realname_label), 0.5); gtk_label_set_yalign (GTK_LABEL (plug->priv->auth_realname_label), 0.5); -#else - gtk_misc_set_alignment (GTK_MISC (plug->priv->auth_username_label), 0.5, 0.5); -#endif gtk_label_set_use_markup (GTK_LABEL (plug->priv->auth_username_label), TRUE); gtk_box_pack_start (GTK_BOX (vbox2), plug->priv->auth_username_label, FALSE, FALSE, 0); @@ -1919,12 +1887,8 @@ create_page_one (GSLockPlug *plug) gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0); plug->priv->auth_prompt_label = gtk_label_new_with_mnemonic (_("_Password:")); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (plug->priv->auth_prompt_label), 0.0); gtk_label_set_yalign (GTK_LABEL (plug->priv->auth_prompt_label), 0.5); -#else - gtk_misc_set_alignment (GTK_MISC (plug->priv->auth_prompt_label), 0.0, 0.5); -#endif gtk_box_pack_start (GTK_BOX (hbox), plug->priv->auth_prompt_label, FALSE, FALSE, 0); plug->priv->auth_prompt_entry = gtk_entry_new (); @@ -1934,12 +1898,8 @@ create_page_one (GSLockPlug *plug) plug->priv->auth_prompt_entry); plug->priv->auth_capslock_label = gtk_label_new (""); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (plug->priv->auth_capslock_label), 0.5); gtk_label_set_yalign (GTK_LABEL (plug->priv->auth_capslock_label), 0.5); -#else - gtk_misc_set_alignment (GTK_MISC (plug->priv->auth_capslock_label), 0.5, 0.5); -#endif gtk_box_pack_start (GTK_BOX (vbox2), plug->priv->auth_capslock_label, FALSE, FALSE, 0); /* Status text */ diff --git a/src/gs-manager.c b/src/gs-manager.c index 36bb752..fe2e4fe 100644 --- a/src/gs-manager.c +++ b/src/gs-manager.c @@ -1103,30 +1103,16 @@ find_window_at_pointer (GSManager *manager) { GdkDisplay *display; GdkDevice *device; -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor; -#else - GdkScreen *screen; - int monitor; -#endif int x, y; GSWindow *window; GSList *l; display = gdk_display_get_default (); -#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 -#if GTK_CHECK_VERSION (3, 22, 0) gdk_device_get_position (device, NULL, &x, &y); monitor = gdk_display_get_monitor_at_point (display, x, y); -#else - gdk_device_get_position (device, &screen, &x, &y); - monitor = gdk_screen_get_monitor_at_point (screen, x, y); -#endif /* Find the gs-window that is on that monitor */ window = NULL; @@ -1179,28 +1165,14 @@ manager_maybe_grab_window (GSManager *manager, { GdkDisplay *display; GdkDevice *device; -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor; -#else - GdkScreen *screen; - int monitor; -#endif int x, y; gboolean grabbed; display = gdk_display_get_default (); -#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 -#if GTK_CHECK_VERSION (3, 22, 0) gdk_device_get_position (device, NULL, &x, &y); monitor = gdk_display_get_monitor_at_point (display, x, y); -#else - gdk_device_get_position (device, &screen, &x, &y); - monitor = gdk_screen_get_monitor_at_point (screen, x, y); -#endif gdk_flush (); grabbed = FALSE; @@ -1223,7 +1195,6 @@ window_grab_broken_cb (GSWindow *window, GdkEventGrabBroken *event, GSManager *manager) { -#if GTK_CHECK_VERSION (3, 20, 0) GdkDisplay *display; GdkSeat *seat; GdkDevice *device; @@ -1231,27 +1202,19 @@ window_grab_broken_cb (GSWindow *window, display = gdk_window_get_display (gs_window_get_gdk_window (window)); seat = gdk_display_get_default_seat (display); -#endif if (event->keyboard) { gs_debug ("KEYBOARD GRAB BROKEN!"); -#if GTK_CHECK_VERSION (3, 20, 0) device = gdk_seat_get_pointer (seat); if (!gdk_display_device_is_grabbed (display, device)) gs_grab_reset (manager->priv->grab); -#else - if (!gdk_pointer_is_grabbed ()) - gs_grab_reset (manager->priv->grab); -#endif } else { gs_debug ("POINTER GRAB BROKEN!"); -#if GTK_CHECK_VERSION (3, 20, 0) device = gdk_seat_get_keyboard (seat); if (!gdk_display_device_is_grabbed (display, device)) gs_grab_reset (manager->priv->grab); -#endif } } @@ -1567,26 +1530,14 @@ connect_window_signals (GSManager *manager, static void gs_manager_create_window_for_monitor (GSManager *manager, -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor) -#else - GdkDisplay *display, - int monitor) -#endif { GSWindow *window; -#if GTK_CHECK_VERSION (3, 22, 0) GdkDisplay *display; -#endif GdkRectangle rect; -#if GTK_CHECK_VERSION (3, 22, 0) display = gdk_monitor_get_display (monitor); gdk_monitor_get_geometry (monitor, &rect); -#else - gdk_screen_get_monitor_geometry (gdk_display_get_default_screen (display), - monitor, &rect); -#endif gs_debug ("Creating a window for the monitor [%d,%d] (%dx%d)", monitor, rect.x, rect.y, rect.width, rect.height); @@ -1622,11 +1573,7 @@ on_screen_monitors_changed (GdkScreen *screen, int i; display = gdk_screen_get_display (screen); -#if GTK_CHECK_VERSION (3, 22, 0) n_monitors = gdk_display_get_n_monitors (display); -#else - n_monitors = gdk_screen_get_n_monitors (screen); -#endif n_windows = g_slist_length (manager->priv->windows); gs_debug ("Monitors changed for display %s: num=%d", @@ -1649,13 +1596,8 @@ on_screen_monitors_changed (GdkScreen *screen, /* add more windows */ for (i = n_windows; i < n_monitors; i++) { -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *mon = gdk_display_get_monitor (display, i); gs_manager_create_window_for_monitor (manager, mon); -#else - gs_manager_create_window_for_monitor (manager, - display, i); -#endif } /* And put unlock dialog up where ever it's supposed to be @@ -1672,22 +1614,13 @@ on_screen_monitors_changed (GdkScreen *screen, while (l != NULL) { GdkDisplay *this_display; -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *this_monitor; -#else - int this_monitor; -#endif GSList *next = l->next; this_display = gs_window_get_display (GS_WINDOW (l->data)); this_monitor = gs_window_get_monitor (GS_WINDOW (l->data)); -#if GTK_CHECK_VERSION (3, 22, 0) if (this_display == display && !GDK_IS_MONITOR (this_monitor)) -#else - if (this_display == display && - this_monitor >= n_monitors) -#endif { manager_maybe_stop_job_for_window (manager, GS_WINDOW (l->data)); g_hash_table_remove (manager->priv->jobs, l->data); @@ -1784,9 +1717,6 @@ static void gs_manager_create_windows_for_display (GSManager *manager, GdkDisplay *display) { -#if !GTK_CHECK_VERSION (3, 22, 0) - GdkScreen *screen; -#endif int n_monitors; int i; @@ -1797,24 +1727,15 @@ gs_manager_create_windows_for_display (GSManager *manager, g_object_ref (manager); g_object_ref (display); -#if GTK_CHECK_VERSION (3, 22, 0) n_monitors = gdk_display_get_n_monitors (display); -#else - screen = gdk_display_get_default_screen (display); - n_monitors = gdk_screen_get_n_monitors (screen); -#endif gs_debug ("Creating %d windows for display %s", n_monitors, gdk_display_get_name (display)); for (i = 0; i < n_monitors; i++) { -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *mon = gdk_display_get_monitor (display, i); gs_manager_create_window_for_monitor (manager, mon); -#else - gs_manager_create_window_for_monitor (manager, display, i); -#endif } g_object_unref (display); diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c index 114d372..c15c15a 100644 --- a/src/gs-window-x11.c +++ b/src/gs-window-x11.c @@ -62,11 +62,7 @@ enum struct GSWindowPrivate { -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor; -#else - int monitor; -#endif GdkRectangle geometry; guint obscured : 1; @@ -152,20 +148,13 @@ static void set_invisible_cursor (GdkWindow *window, gboolean invisible) { -#if GTK_CHECK_VERSION (3, 16, 0) GdkDisplay *display; -#endif GdkCursor *cursor = NULL; if (invisible) { - -#if GTK_CHECK_VERSION (3, 16, 0) display = gdk_window_get_display (window); cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR); -#else - cursor = gdk_cursor_new (GDK_BLANK_CURSOR); -#endif } gdk_window_set_cursor (window, cursor); @@ -303,56 +292,35 @@ static cairo_region_t * get_outside_region (GSWindow *window) { GdkDisplay *display; -#if GTK_CHECK_VERSION (3, 22, 0) int i; int num_monitors; -#else - GdkScreen *screen; - int mon; -#endif cairo_region_t *region; display = gtk_widget_get_display (GTK_WIDGET (window)); -#if !GTK_CHECK_VERSION (3, 22, 0) - screen = gdk_display_get_default_screen (display); -#endif region = cairo_region_create (); -#if GTK_CHECK_VERSION (3, 22, 0) num_monitors = gdk_display_get_n_monitors (display); for (i = 0; i < num_monitors; i++) -#else - for (mon = 0; mon < window->priv->monitor; mon++) -#endif { -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *mon = gdk_display_get_monitor (display, i); if (mon != window->priv->monitor) { -#endif GdkRectangle geometry; cairo_rectangle_int_t rectangle; -#if GTK_CHECK_VERSION (3, 22, 0) gdk_monitor_get_geometry (mon, &geometry); -#else - gdk_screen_get_monitor_geometry (screen, mon, - &geometry); -#endif rectangle.x = geometry.x; rectangle.y = geometry.y; rectangle.width = geometry.width; rectangle.height = geometry.height; cairo_region_union_rectangle (region, &rectangle); -#if GTK_CHECK_VERSION (3, 22, 0) } else { break; } -#endif } return region; @@ -367,13 +335,7 @@ update_geometry (GSWindow *window) outside_region = get_outside_region (window); -#if GTK_CHECK_VERSION (3, 22, 0) gdk_monitor_get_geometry (window->priv->monitor, &geometry); -#else - gdk_screen_get_monitor_geometry (gtk_widget_get_screen (GTK_WIDGET (window)), - window->priv->monitor, - &geometry); -#endif gs_debug ("got geometry for monitor: x=%d y=%d w=%d h=%d", geometry.x, geometry.y, @@ -1949,11 +1911,7 @@ gs_window_set_status_message (GSWindow *window, void gs_window_set_monitor (GSWindow *window, -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor) -#else - int monitor) -#endif { g_return_if_fail (GS_IS_WINDOW (window)); @@ -1969,18 +1927,10 @@ gs_window_set_monitor (GSWindow *window, g_object_notify (G_OBJECT (window), "monitor"); } -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor * -#else -int -#endif gs_window_get_monitor (GSWindow *window) { -#if GTK_CHECK_VERSION (3, 22, 0) g_return_val_if_fail (GS_IS_WINDOW (window), NULL); -#else - g_return_val_if_fail (GS_IS_WINDOW (window), -1); -#endif return window->priv->monitor; } @@ -2019,11 +1969,7 @@ gs_window_set_property (GObject *object, gs_window_set_logout_timeout (self, g_value_get_long (value)); break; case PROP_MONITOR: -#if GTK_CHECK_VERSION (3, 22, 0) gs_window_set_monitor (self, g_value_get_pointer (value)); -#else - gs_window_set_monitor (self, g_value_get_int (value)); -#endif break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -2065,11 +2011,7 @@ gs_window_get_property (GObject *object, g_value_set_long (value, self->priv->logout_timeout); break; case PROP_MONITOR: -#if GTK_CHECK_VERSION (3, 22, 0) g_value_set_pointer (value, (gpointer) self->priv->monitor); -#else - g_value_set_int (value, self->priv->monitor); -#endif break; case PROP_OBSCURED: g_value_set_boolean (value, self->priv->obscured); @@ -2470,21 +2412,10 @@ gs_window_class_init (GSWindowClass *klass) g_object_class_install_property (object_class, PROP_MONITOR, -#if GTK_CHECK_VERSION (3, 22, 0) g_param_spec_pointer ("monitor", "Gdk monitor", "The monitor (in terms of Gdk) which the window is on", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); -#else - g_param_spec_int ("monitor", - "RandR monitor", - "The monitor (in terms of RandR) which the window is on", - 0, - G_MAXINT, - 0, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); -#endif - } static void @@ -2617,11 +2548,7 @@ gs_window_finalize (GObject *object) GSWindow * gs_window_new (GdkDisplay *display, -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor, -#else - int monitor, -#endif gboolean lock_enabled) { GObject *result; diff --git a/src/gs-window.h b/src/gs-window.h index 7878a94..903beae 100644 --- a/src/gs-window.h +++ b/src/gs-window.h @@ -60,15 +60,10 @@ gboolean gs_window_is_obscured (GSWindow *window); gboolean gs_window_is_dialog_up (GSWindow *window); GdkDisplay * gs_window_get_display (GSWindow *window); -#if GTK_CHECK_VERSION (3, 22, 0) + void gs_window_set_monitor (GSWindow *window, GdkMonitor *monitor); GdkMonitor * gs_window_get_monitor (GSWindow *window); -#else -void gs_window_set_monitor (GSWindow *window, - int monitor); -int gs_window_get_monitor (GSWindow *window); -#endif void gs_window_set_background_surface (GSWindow *window, cairo_surface_t *surface); @@ -97,11 +92,7 @@ void gs_window_request_unlock (GSWindow *window); void gs_window_cancel_unlock_request (GSWindow *window); GSWindow * gs_window_new (GdkDisplay *display, -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor, -#else - int monitor, -#endif gboolean lock_enabled); void gs_window_show (GSWindow *window); void gs_window_destroy (GSWindow *window); diff --git a/src/mate-screensaver-preferences.c b/src/mate-screensaver-preferences.c index 5ef351a..f767f5c 100644 --- a/src/mate-screensaver-preferences.c +++ b/src/mate-screensaver-preferences.c @@ -387,14 +387,10 @@ help_display (void) GError *error; error = NULL; -#if GTK_CHECK_VERSION (3, 22, 0) gtk_show_uri_on_window (NULL, "help:mate-user-guide/prefs-screensaver", GDK_CURRENT_TIME, &error); -#else - gtk_show_uri (NULL, "help:mate-user-guide/prefs-screensaver", GDK_CURRENT_TIME, &error); -#endif if (error != NULL) { diff --git a/src/test-window.c b/src/test-window.c index 1a5fd42..92166d1 100644 --- a/src/test-window.c +++ b/src/test-window.c @@ -123,22 +123,12 @@ test_window (void) gboolean lock_active; gboolean user_switch_enabled; GdkDisplay *display; -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor; -#else - GdkScreen *screen; - int monitor; -#endif lock_active = TRUE; user_switch_enabled = TRUE; display = gdk_display_get_default (); -#if GTK_CHECK_VERSION (3, 22, 0) monitor = gdk_display_get_primary_monitor (display); -#else - screen = gdk_display_get_default_screen (display); - monitor = gdk_screen_get_primary_monitor (screen); -#endif window = gs_window_new (display, monitor, lock_active); |