mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
DRYer
This commit is contained in:
@@ -84,10 +84,14 @@ def load_all_shaders(semi_transparent=0):
|
|||||||
load_borders_program()
|
load_borders_program()
|
||||||
|
|
||||||
|
|
||||||
def init_glfw(opts, debug_keyboard=False):
|
def init_glfw_module(glfw_module, debug_keyboard=False):
|
||||||
glfw_module = 'cocoa' if is_macos else ('wayland' if is_wayland(opts) else 'x11')
|
|
||||||
if not glfw_init(glfw_path(glfw_module), debug_keyboard):
|
if not glfw_init(glfw_path(glfw_module), debug_keyboard):
|
||||||
raise SystemExit('GLFW initialization failed')
|
raise SystemExit('GLFW initialization failed')
|
||||||
|
|
||||||
|
|
||||||
|
def init_glfw(opts, debug_keyboard=False):
|
||||||
|
glfw_module = 'cocoa' if is_macos else ('wayland' if is_wayland(opts) else 'x11')
|
||||||
|
init_glfw_module(glfw_module, debug_keyboard)
|
||||||
return glfw_module
|
return glfw_module
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user