Allow running under Wayland on GNOME by default
This commit is contained in:
parent
a79d024c09
commit
cf3a088a53
@ -155,7 +155,7 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
before being maximized
|
before being maximized
|
||||||
|
|
||||||
- GNOME/Wayland: Improve window decorations the titlebar now shows the window
|
- 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
|
- Add an option, :opt:`detect_urls` to control whether kitty will detect URLs
|
||||||
when the mouse moves over them (:pull:`3118`)
|
when the mouse moves over them (:pull:`3118`)
|
||||||
|
|||||||
@ -146,26 +146,7 @@ def detect_if_wayland_ok() -> bool:
|
|||||||
wayland = glfw_path('wayland')
|
wayland = glfw_path('wayland')
|
||||||
if not os.path.exists(wayland):
|
if not os.path.exists(wayland):
|
||||||
return False
|
return False
|
||||||
# GNOME does not support xdg-decorations
|
return True
|
||||||
# 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'
|
|
||||||
|
|
||||||
|
|
||||||
def is_wayland(opts: Optional[Options] = None) -> bool:
|
def is_wayland(opts: Optional[Options] = None) -> bool:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user