mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 14:04:52 +02:00
Only use Wayland if loading the glfw-wayland.so DLL succeeds
This commit is contained in:
@@ -203,7 +203,11 @@ 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
|
||||||
return True
|
import ctypes
|
||||||
|
with suppress(Exception):
|
||||||
|
setattr(detect_if_wayland_ok, 'keep_module_loaded', ctypes.CDLL(wayland))
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def is_wayland(opts: Optional['Options'] = None) -> bool:
|
def is_wayland(opts: Optional['Options'] = None) -> bool:
|
||||||
|
|||||||
Reference in New Issue
Block a user