diff options
author | raveit65 <[email protected]> | 2021-04-10 19:56:28 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-04-23 16:10:29 +0200 |
commit | af628c2acd213ee450542c1cf8d3ded014717db4 (patch) | |
tree | 663b18ab9e406b5481f394ff9e80cc60c53769d9 /mate-panel/panel-xutils.c | |
parent | abaeb4e9be26d9c448434a6bfdd2f87a381f8d50 (diff) | |
download | mate-panel-af628c2acd213ee450542c1cf8d3ded014717db4.tar.bz2 mate-panel-af628c2acd213ee450542c1cf8d3ded014717db4.tar.xz |
struts: add panel_xutils_unset_strut
origin commit:
https://gitlab.gnome.org/GNOME/gnome-panel/-/commit/3e96a81
Diffstat (limited to 'mate-panel/panel-xutils.c')
-rw-r--r-- | mate-panel/panel-xutils.c | 24 |
1 files changed, 24 insertions, 0 deletions
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) |