diff options
author | Pablo Barciela <[email protected]> | 2017-12-04 01:01:52 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-12-16 20:04:18 +0100 |
commit | 2fea2c846689d3810def93e6e0e6eeb01c2ef718 (patch) | |
tree | 3ec5bb043842bbc5e6e9e504a4b4adc2ef22aecf /eel/eel-background.c | |
parent | c6b81f64c4c4212e414c04e584380774d6ac83ca (diff) | |
download | caja-2fea2c846689d3810def93e6e0e6eeb01c2ef718.tar.bz2 caja-2fea2c846689d3810def93e6e0e6eeb01c2ef718.tar.xz |
WidthOfScreen and HeightOfScreen implementation
This commit reverts:
https://github.com/mate-desktop/caja/commit/4c130e22b98bbc1a85747adac3b582e45d34514e
https://github.com/mate-desktop/caja/commit/ac12e6d16f4a51b3327d013781e72cfec17f3624
https://github.com/mate-desktop/caja/commit/17b3c0ca924ffcd4bd06fded98227eba626d4f0b
https://github.com/mate-desktop/caja/commit/42c8d2c3373c25d6e321be6950997c0d7ce44279
And it applies an alternative to fix the deprecated functions:
gdk_screen_get_width
gdk_screen_get_height
gdk_screen_width
gdk_screen_height
Diffstat (limited to 'eel/eel-background.c')
-rw-r--r-- | eel/eel-background.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c index 53e0a652..8de791ec 100644 --- a/eel/eel-background.c +++ b/eel/eel-background.c @@ -31,7 +31,7 @@ #include "eel-lib-self-check-functions.h" #include <gtk/gtk.h> #include <eel/eel-canvas.h> -# include <cairo-xlib.h> +#include <cairo-xlib.h> #include <gdk/gdkx.h> #include <gio/gio.h> #include <math.h> @@ -311,33 +311,9 @@ drawable_get_adjusted_size (EelBackground *self, { if (self->details->is_desktop) { -#if GTK_CHECK_VERSION (3, 22, 0) - GdkRectangle geometry; - GdkMonitor *monitor; - GdkDisplay *display; - int n = 0; - int i = 0; - int sc_width = 0; - int sc_height = 0; - - display = gtk_widget_get_display (self->details->widget); - n = gdk_display_get_n_monitors (display); - - for (i = 0; i < n; ++i) - { - monitor = gdk_display_get_monitor (display, i); - gdk_monitor_get_geometry (monitor, &geometry); - sc_width = sc_width + geometry.width; - sc_height = sc_height + geometry.height; - } - - *width = sc_width; - *height = sc_height; -#else GdkScreen *screen = gtk_widget_get_screen (self->details->widget); - *width = gdk_screen_get_width (screen); - *height = gdk_screen_get_height (screen); -#endif + *width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)); + *height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); } else { |