1111from Xlib .xobject .drawable import Window as XWindow
1212
1313from ._main import Box
14- from . ewmhlib import EwmhWindow
14+ from ewmhlib import EwmhWindow
1515
1616
1717def _getHandle (handle : Union [int , XWindow ]) -> Optional [EwmhWindow ]:
@@ -33,7 +33,7 @@ def _getWindowBox(handle: EwmhWindow) -> Box:
3333 w = geom .width
3434 h = geom .height
3535 # Thanks to roym899 (https://github.com/roym899) for his HELP!!!!
36- if os .environ .get ('XDG_SESSION_TYPE ' , "" ).lower () == "gnome" :
36+ if "gnome" in os .environ .get ('XDG_CURRENT_DESKTOP ' , "" ).lower ():
3737 # Most apps in GNOME do not set _NET_EXTENTS, but _GTK_EXTENTS,
3838 # which is the additional space AROUND the window.
3939 _gtk_extents = handle ._getGtkFrameExtents ()
@@ -54,7 +54,7 @@ def _moveResizeWindow(handle: EwmhWindow, newBox: Box):
5454 newTop = max (0 , newBox .top )
5555 newWidth = newBox .width
5656 newHeight = newBox .height
57- if os .environ .get ('XDG_SESSION_TYPE ' , "" ).lower () == "gnome" :
57+ if "gnome" in os .environ .get ('XDG_CURRENT_DESKTOP ' , "" ).lower ():
5858 # Most apps in GNOME do not set _NET_EXTENTS, but _GTK_EXTENTS,
5959 # which is the additional space AROUND the window.
6060 _gtk_extents = handle ._getGtkFrameExtents ()
0 commit comments