diff options
-rw-r--r-- | mate-panel/panel-struts.c | 2 | ||||
-rw-r--r-- | mate-panel/panel-xutils.c | 24 | ||||
-rw-r--r-- | mate-panel/panel-xutils.h | 2 |
3 files changed, 27 insertions, 1 deletions
diff --git a/mate-panel/panel-struts.c b/mate-panel/panel-struts.c index 2035c647..dc0958f5 100644 --- a/mate-panel/panel-struts.c +++ b/mate-panel/panel-struts.c @@ -333,7 +333,7 @@ panel_struts_unset_window_hint (PanelToplevel *toplevel) if (!gtk_widget_get_realized (GTK_WIDGET (toplevel))) return; - panel_xutils_set_strut (gtk_widget_get_window (GTK_WIDGET (toplevel)), 0, 0, 0, 0); + panel_xutils_unset_strut (gtk_widget_get_window (GTK_WIDGET (toplevel))); } static inline int diff --git a/mate-panel/panel-xutils.c b/mate-panel/panel-xutils.c index 1db10800..732f85ff 100644 --- a/mate-panel/panel-xutils.c +++ b/mate-panel/panel-xutils.c @@ -112,6 +112,30 @@ panel_xutils_set_strut (GdkWindow *gdk_window, } void +panel_xutils_unset_strut (GdkWindow *gdk_window) +{ + GdkDisplay *display; + Display *xdisplay; + Window xwindow; + + display = gdk_window_get_display (gdk_window); + xdisplay = gdk_x11_display_get_xdisplay (display); + xwindow = gdk_x11_window_get_xid (gdk_window); + + if (net_wm_strut == None) + 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); + + gdk_x11_display_error_trap_push (display); + + XDeleteProperty (xdisplay, xwindow, net_wm_strut); + XDeleteProperty (xdisplay, xwindow, net_wm_strut_partial); + + gdk_x11_display_error_trap_pop_ignored (display); +} + +void panel_warp_pointer (GdkWindow *gdk_window, int x, int y) diff --git a/mate-panel/panel-xutils.h b/mate-panel/panel-xutils.h index aebc77c4..603cb4ba 100644 --- a/mate-panel/panel-xutils.h +++ b/mate-panel/panel-xutils.h @@ -49,6 +49,8 @@ void panel_xutils_set_strut (GdkWindow *gdk_window, guint32 strut_start, guint32 strut_end); +void panel_xutils_unset_strut (GdkWindow *gdk_window); + void panel_warp_pointer (GdkWindow *gdk_window, int x, int y); |