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 /applets/fish/fish.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 'applets/fish/fish.c')
-rw-r--r-- | applets/fish/fish.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/applets/fish/fish.c b/applets/fish/fish.c index 56def60c..dd18c508 100644 --- a/applets/fish/fish.c +++ b/applets/fish/fish.c @@ -37,6 +37,7 @@ #include <glib/gi18n.h> #include <glib-object.h> #include <gtk/gtk.h> +#include <gdk/gdkx.h> #include <gdk/gdkkeysyms.h> #include <gio/gio.h> @@ -856,8 +857,8 @@ static void display_fortune_dialog(FishApplet* fish) screen = gtk_widget_get_screen (GTK_WIDGET (fish)); - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - &screen_width, &screen_height); + screen_width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)); + screen_height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); gtk_window_set_default_size (GTK_WINDOW (fish->fortune_dialog), MIN (600, screen_width * 0.9), |