summaryrefslogtreecommitdiff
path: root/qutebrowser/utils/qtutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/utils/qtutils.py')
-rw-r--r--qutebrowser/utils/qtutils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/qutebrowser/utils/qtutils.py b/qutebrowser/utils/qtutils.py
index ebcd6578f..5e36a90d2 100644
--- a/qutebrowser/utils/qtutils.py
+++ b/qutebrowser/utils/qtutils.py
@@ -123,6 +123,11 @@ def is_single_process() -> bool:
return '--single-process' in args
+def is_wayland() -> bool:
+ """Check if we are running on Wayland."""
+ return objects.qapp.platformName() in ["wayland", "wayland-egl"]
+
+
def check_overflow(arg: int, ctype: str, fatal: bool = True) -> int:
"""Check if the given argument is in bounds for the given type.