diff options
author | Pablo Barciela <[email protected]> | 2017-12-06 01:03:11 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-12-20 20:47:45 +0100 |
commit | 8d737c695f37a5bb0ad5ded56a44777249624cea (patch) | |
tree | 818759a6696563fdee0297528099302ce8907849 /libslab/shell-window.c | |
parent | cde96bf637600cd257861b84ae39233ab800a9b9 (diff) | |
download | mate-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 'libslab/shell-window.c')
-rw-r--r-- | libslab/shell-window.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libslab/shell-window.c b/libslab/shell-window.c index 0b6df1cb..2e97a22f 100644 --- a/libslab/shell-window.c +++ b/libslab/shell-window.c @@ -21,6 +21,7 @@ #include "shell-window.h" #include <gtk/gtk.h> +#include <gdk/gdkx.h> #include "app-resizer.h" @@ -113,13 +114,8 @@ shell_window_handle_size_request (GtkWidget * widget, GtkRequisition * requisiti height = child_requisiton.height + 10; if (height > requisition->height) { - gint sc_height; - - gdk_window_get_geometry (gdk_screen_get_root_window (gdk_screen_get_default()), - NULL, NULL, NULL, &sc_height); - requisition->height = - MIN (((gfloat) sc_height * SIZING_HEIGHT_PERCENT), height); + MIN (((gfloat) HeightOfScreen (gdk_x11_screen_get_xscreen (gdk_screen_get_default ())) * SIZING_HEIGHT_PERCENT), height); } } |