summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-panel/panel-struts.c4
-rw-r--r--mate-panel/panel-xutils.c33
-rw-r--r--mate-panel/panel-xutils.h4
3 files changed, 35 insertions, 6 deletions
diff --git a/mate-panel/panel-struts.c b/mate-panel/panel-struts.c
index cb45f69d..0b5e1645 100644
--- a/mate-panel/panel-struts.c
+++ b/mate-panel/panel-struts.c
@@ -323,7 +323,9 @@ panel_struts_set_window_hint (PanelToplevel *toplevel)
strut->orientation,
strut_size,
strut->allocated_strut_start * scale,
- strut->allocated_strut_end * scale);
+ strut->allocated_strut_end * scale,
+ &strut->allocated_geometry,
+ scale);
}
void
diff --git a/mate-panel/panel-xutils.c b/mate-panel/panel-xutils.c
index 4d8b32a2..eb887e71 100644
--- a/mate-panel/panel-xutils.c
+++ b/mate-panel/panel-xutils.c
@@ -39,6 +39,7 @@
static Atom net_wm_strut = None;
static Atom net_wm_strut_partial = None;
+static Atom gnome_wm_strut_area = None;
enum {
STRUT_LEFT = 0,
@@ -55,16 +56,27 @@ enum {
STRUT_BOTTOM_END = 11
};
+enum {
+ STRUT_AREA_X = 0,
+ STRUT_AREA_Y,
+ STRUT_AREA_WIDTH,
+ STRUT_AREA_HEIGHT,
+ STRUT_AREA_LAST
+};
+
void
panel_xutils_set_strut (GdkWindow *gdk_window,
PanelOrientation orientation,
guint32 strut,
guint32 strut_start,
- guint32 strut_end)
+ guint32 strut_end,
+ GdkRectangle *rect,
+ int scale)
{
- Display *xdisplay;
- Window window;
- gulong struts [12] = { 0, };
+ Display *xdisplay;
+ Window window;
+ gulong struts [12] = { 0, };
+ gulong area [STRUT_AREA_LAST];
GdkDisplay *display;
g_return_if_fail (GDK_IS_WINDOW (gdk_window));
@@ -77,6 +89,8 @@ panel_xutils_set_strut (GdkWindow *gdk_window,
net_wm_strut = XInternAtom (xdisplay, "_NET_WM_STRUT", False);
if (net_wm_strut_partial == None)
net_wm_strut_partial = XInternAtom (xdisplay, "_NET_WM_STRUT_PARTIAL", False);
+ if (gnome_wm_strut_area == None)
+ gnome_wm_strut_area = XInternAtom (xdisplay, "_GNOME_WM_STRUT_AREA", False);
switch (orientation) {
case PANEL_ORIENTATION_LEFT:
@@ -101,6 +115,11 @@ panel_xutils_set_strut (GdkWindow *gdk_window,
break;
}
+ area [STRUT_AREA_X] = rect->x * scale;
+ area [STRUT_AREA_Y] = rect->y * scale;
+ area [STRUT_AREA_WIDTH] = rect->width * scale;
+ area [STRUT_AREA_HEIGHT] = rect->height * scale;
+
display = gdk_window_get_display (gdk_window);
gdk_x11_display_error_trap_push (display);
XChangeProperty (xdisplay, window, net_wm_strut,
@@ -109,6 +128,9 @@ panel_xutils_set_strut (GdkWindow *gdk_window,
XChangeProperty (xdisplay, window, net_wm_strut_partial,
XA_CARDINAL, 32, PropModeReplace,
(guchar *) &struts, 12);
+ XChangeProperty (xdisplay, window, gnome_wm_strut_area,
+ XA_CARDINAL, 32, PropModeReplace,
+ (guchar *) &area, 4);
gdk_x11_display_error_trap_pop_ignored (display);
}
@@ -127,11 +149,14 @@ panel_xutils_unset_strut (GdkWindow *gdk_window)
net_wm_strut = XInternAtom (xdisplay, "_NET_WM_STRUT", False);
if (net_wm_strut_partial == None)
net_wm_strut_partial = XInternAtom (xdisplay, "_NET_WM_STRUT_PARTIAL", False);
+ if (gnome_wm_strut_area == None)
+ gnome_wm_strut_area = XInternAtom (xdisplay, "_GNOME_WM_STRUT_AREA", False);
gdk_x11_display_error_trap_push (display);
XDeleteProperty (xdisplay, xwindow, net_wm_strut);
XDeleteProperty (xdisplay, xwindow, net_wm_strut_partial);
+ XDeleteProperty (xdisplay, xwindow, gnome_wm_strut_area);
gdk_x11_display_error_trap_pop_ignored (display);
}
diff --git a/mate-panel/panel-xutils.h b/mate-panel/panel-xutils.h
index 8310c052..988153d3 100644
--- a/mate-panel/panel-xutils.h
+++ b/mate-panel/panel-xutils.h
@@ -48,7 +48,9 @@ void panel_xutils_set_strut (GdkWindow *gdk_window,
PanelOrientation orientation,
guint32 strut,
guint32 strut_start,
- guint32 strut_end);
+ guint32 strut_end,
+ GdkRectangle *rect,
+ int scale);
void panel_xutils_unset_strut (GdkWindow *gdk_window);