Only use window occlusion on platforms where it is supported

This commit is contained in:
Kovid Goyal
2025-02-12 12:02:46 +05:30
parent 2cf83070a0
commit 50f64d5981
14 changed files with 42 additions and 22 deletions

View File

@@ -28,6 +28,7 @@ from .constants import (
kitty_exe,
logo_png_file,
running_in_kitty,
supports_window_occlusion,
website_url,
)
from .fast_data_types import (
@@ -89,8 +90,10 @@ def load_all_shaders(semi_transparent: bool = False) -> None:
def init_glfw_module(glfw_module: str, debug_keyboard: bool = False, debug_rendering: bool = False, wayland_enable_ime: bool = True) -> None:
if not glfw_init(glfw_path(glfw_module), edge_spacing, debug_keyboard, debug_rendering, wayland_enable_ime):
ok, swo = glfw_init(glfw_path(glfw_module), edge_spacing, debug_keyboard, debug_rendering, wayland_enable_ime)
if not ok:
raise SystemExit('GLFW initialization failed')
supports_window_occlusion(swo)
def init_glfw(opts: Options, debug_keyboard: bool = False, debug_rendering: bool = False) -> str: