mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
Only use Wayland if loading the glfw-wayland.so DLL succeeds
This commit is contained in:
parent
a2d76a6c34
commit
322b91b51f
1 changed files with 5 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue