diff options
author | Pablo Barciela <[email protected]> | 2017-12-07 01:37:08 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-12-17 12:22:49 +0100 |
commit | 10b38211e032738593dfe71176289c275956b476 (patch) | |
tree | 26b8b3026ca845e790439449f720c5611747f9ec /mate-panel/panel-addto.c | |
parent | 54a0b4dcb0b2462eea51cdbcbe8306f25e8e4cea (diff) | |
download | mate-panel-10b38211e032738593dfe71176289c275956b476.tar.bz2 mate-panel-10b38211e032738593dfe71176289c275956b476.tar.xz |
WidthOfScreen and HeightOfScreen implementation
This commit reverts:
https://github.com/mate-desktop/mate-panel/commit/7b2bc7d9f98c6ba8c2c31bdf9605faadb42a7e0e
And it applies an alternative to fix the deprecated functions:
gdk_screen_get_width
gdk_screen_get_height
Diffstat (limited to 'mate-panel/panel-addto.c')
-rw-r--r-- | mate-panel/panel-addto.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mate-panel/panel-addto.c b/mate-panel/panel-addto.c index 2e2ff712..e6cae0eb 100644 --- a/mate-panel/panel-addto.c +++ b/mate-panel/panel-addto.c @@ -27,6 +27,7 @@ #include <glib/gi18n.h> #include <gio/gio.h> +#include <gdk/gdkx.h> #include <matemenu-tree.h> @@ -1373,10 +1374,7 @@ panel_addto_present (GtkMenuItem *item, panel_addto_dialog_quark); screen = gtk_window_get_screen (GTK_WINDOW (toplevel)); - - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - NULL, &screen_height); - + screen_height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); height = MIN (MAX_ADDTOPANEL_HEIGHT, 3 * (screen_height / 4)); if (!dialog) { |