Allow running under Wayland on GNOME by default

This commit is contained in:
Kovid Goyal 2021-04-08 07:52:28 +05:30
parent a79d024c09
commit cf3a088a53
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 21 deletions

View File

@ -155,7 +155,7 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
before being maximized
- GNOME/Wayland: Improve window decorations the titlebar now shows the window
title (:iss:`3284`)
title. Allow running under Wayland on GNOME by default. (:iss:`3284`)
- Add an option, :opt:`detect_urls` to control whether kitty will detect URLs
when the mouse moves over them (:pull:`3118`)

View File

@ -146,26 +146,7 @@ def detect_if_wayland_ok() -> bool:
wayland = glfw_path('wayland')
if not os.path.exists(wayland):
return False
# GNOME does not support xdg-decorations
# https://gitlab.gnome.org/GNOME/mutter/issues/217
import ctypes
lib = ctypes.CDLL(wayland)
check = lib.glfwWaylandCheckForServerSideDecorations
check.restype = ctypes.c_char_p
check.argtypes = ()
try:
ans = bytes(check())
except Exception:
return False
if ans == b'NO':
print(
'Your Wayland compositor does not support server side window decorations,'
' disabling Wayland. You can force Wayland support using the'
' linux_display_server option in kitty.conf'
' See https://drewdevault.com/2018/01/27/Sway-and-client-side-decorations.html'
' for more information.',
file=sys.stderr)
return ans == b'YES'
return True
def is_wayland(opts: Optional[Options] = None) -> bool: