summaryrefslogtreecommitdiff
path: root/typing-break/drw-utils.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2017-12-06 01:03:11 +0100
committerraveit65 <[email protected]>2017-12-20 20:47:45 +0100
commit8d737c695f37a5bb0ad5ded56a44777249624cea (patch)
tree818759a6696563fdee0297528099302ce8907849 /typing-break/drw-utils.c
parentcde96bf637600cd257861b84ae39233ab800a9b9 (diff)
downloadmate-control-center-8d737c695f37a5bb0ad5ded56a44777249624cea.tar.bz2
mate-control-center-8d737c695f37a5bb0ad5ded56a44777249624cea.tar.xz
WidthOfScreen and HeightOfScreen implementation
This commit reverts: https://github.com/mate-desktop/mate-control-center/commit/fe782c673262e861334bb48265abf5075ff02680 https://github.com/mate-desktop/mate-control-center/commit/061f3780a3af6224a804d239f9b9dfc5c81873f6 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 'typing-break/drw-utils.c')
-rw-r--r--typing-break/drw-utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/typing-break/drw-utils.c b/typing-break/drw-utils.c
index 53a6493f..8ba53edd 100644
--- a/typing-break/drw-utils.c
+++ b/typing-break/drw-utils.c
@@ -20,6 +20,7 @@
#include <config.h>
#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include "drw-utils.h"
@@ -124,9 +125,8 @@ set_pixmap_background (GtkWidget *window)
gtk_widget_realize (window);
screen = gtk_widget_get_screen (window);
-
- gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL,
- &width, &height);
+ width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen));
+ height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen));
tmp_pixbuf = gdk_pixbuf_get_from_window (gdk_screen_get_root_window (screen),
0,