Skip to content

Commit

Permalink
Merge pull request #880 from fluffysatoshi/wayland
Browse files Browse the repository at this point in the history
Avoid using EWMH under Wayland
  • Loading branch information
HenriWahl committed Dec 4, 2022
2 parents c220c97 + bcc82b6 commit 64d940b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Nagstamon/QUI/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@

# only on X11/Linux thirdparty path should be added because it contains the Xlib module
# needed to tell window manager via EWMH to keep Nagstamon window on all virtual desktops
# TODO: test if X11 or Wayland is used
if OS not in OS_NON_LINUX:
if OS not in OS_NON_LINUX and not DESKTOP_WAYLAND:
# extract thirdparty path from resources path - make submodules accessible by thirdparty modules
THIRDPARTY = os.sep.join(RESOURCES.split(os.sep)[0:-1] + ['thirdparty'])
sys.path.insert(0, THIRDPARTY)
Expand All @@ -79,7 +78,8 @@

from Nagstamon.thirdparty.ewmh import EWMH

# DBus only interesting for Linux too
# DBus only interesting for Linux too
if OS not in OS_NON_LINUX:
try:
from dbus import (Interface,
SessionBus)
Expand Down Expand Up @@ -951,7 +951,7 @@ def __init__(self):
self.hide()

# ewmh.py in thirdparty directory needed to keep floating statusbar on all desktops in Linux
if not OS in OS_NON_LINUX:
if not OS in OS_NON_LINUX and not DESKTOP_WAYLAND:
self.ewmh = EWMH()

# avoid quitting when using Qt.Tool flag and closing settings dialog
Expand Down Expand Up @@ -1220,7 +1220,7 @@ def set_mode(self):
self.show()

# X11/Linux needs some special treatment to get the statusbar floating on all virtual desktops
if OS not in OS_NON_LINUX:
if OS not in OS_NON_LINUX and not DESKTOP_WAYLAND:
# get all windows...
winid = self.winId().__int__()
self.ewmh.setWmDesktop(winid, 0xffffffff)
Expand Down Expand Up @@ -2060,7 +2060,7 @@ def raise_window_on_all_desktops(self):
if conf.windowed:
return
# X11/Linux needs some special treatment to get the statusbar floating on all virtual desktops
if OS not in OS_NON_LINUX:
if OS not in OS_NON_LINUX and not DESKTOP_WAYLAND:
# get all windows...
winid = self.winId().__int__()
self.ewmh.setWmDesktop(winid, 0xffffffff)
Expand Down

0 comments on commit 64d940b

Please sign in to comment.