mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-29 11:18:50 +02:00
Only use Wayland if loading the glfw-wayland.so DLL succeeds
This commit is contained in:
+5
-1
@@ -203,7 +203,11 @@ def detect_if_wayland_ok() -> bool:
|
||||
wayland = glfw_path('wayland')
|
||||
if not os.path.exists(wayland):
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user