mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-11 02:59:40 +02:00
If the saved initial window size fails, retry creating the window with a standard size. Fixes #98
This commit is contained in:
@@ -192,7 +192,13 @@ def run_app(opts, args):
|
||||
else:
|
||||
viewport_size.width = opts.initial_window_width
|
||||
viewport_size.height = opts.initial_window_height
|
||||
window = Window(viewport_size.width, viewport_size.height, args.cls)
|
||||
try:
|
||||
window = Window(viewport_size.width, viewport_size.height, args.cls)
|
||||
except ValueError:
|
||||
safe_print('Failed to create GLFW window with initial size:', viewport_size)
|
||||
viewport_size.width = 640
|
||||
viewport_size.height = 400
|
||||
window = Window(viewport_size.width, viewport_size.height, args.cls)
|
||||
window.set_title(appname)
|
||||
window.make_context_current()
|
||||
if isosx:
|
||||
|
||||
Reference in New Issue
Block a user