[gnome-panel] struts: avoid deprecated screen functions



commit d55066a615a54db71a514ec641ad549658f131ef
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Mar 8 15:46:39 2020 +0200

    struts: avoid deprecated screen functions

 gnome-panel/panel-struts.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gnome-panel/panel-struts.c b/gnome-panel/panel-struts.c
index 2c583b9de..cdba6bc9f 100644
--- a/gnome-panel/panel-struts.c
+++ b/gnome-panel/panel-struts.c
@@ -26,6 +26,7 @@
 #include "panel-multiscreen.h"
 #include "panel-xutils.h"
 
+#include <gdk/gdkx.h>
 
 typedef struct {
         PanelToplevel    *toplevel;
@@ -251,6 +252,7 @@ void
 panel_struts_set_window_hint (PanelToplevel *toplevel)
 {
        GdkScreen  *screen;
+       Screen     *xscreen;
        GtkWidget  *widget;
        PanelStrut *strut;
        int         strut_size;
@@ -271,9 +273,10 @@ panel_struts_set_window_hint (PanelToplevel *toplevel)
        strut_size = strut->allocated_strut_size;
 
        screen = gdk_screen_get_default ();
+       xscreen = gdk_x11_screen_get_xscreen (screen);
 
-       screen_width  = gdk_screen_get_width  (screen);
-       screen_height = gdk_screen_get_height (screen);
+       screen_width = WidthOfScreen (xscreen);
+       screen_height = HeightOfScreen (xscreen);
 
        panel_struts_get_monitor_geometry (strut->monitor,
                                           &monitor_x,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]