Linux: Fix window icon not set on X11 for the first OS window

Fix #961
This commit is contained in:
Kovid Goyal 2018-09-12 18:29:06 +05:30
parent ec1f219850
commit d583c533c2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 3 deletions

View File

@ -51,6 +51,8 @@ Changelog
- macOS: Fix resizing semi-transparent windows causing the windows to be - macOS: Fix resizing semi-transparent windows causing the windows to be
invisible during the resize (:iss:`941`) invisible during the resize (:iss:`941`)
- Linux: Fix window icon not set on X11 for the first OS window (:iss:`961`)
0.12.1 [2018-09-08] 0.12.1 [2018-09-08]
------------------------------ ------------------------------

View File

@ -125,6 +125,9 @@ def _run_app(opts, args):
# on dual GPU machines: https://github.com/kovidgoyal/kitty/issues/794 # on dual GPU machines: https://github.com/kovidgoyal/kitty/issues/794
set_custom_ibeam_cursor() set_custom_ibeam_cursor()
load_all_shaders.cursor_text_color = opts.cursor_text_color load_all_shaders.cursor_text_color = opts.cursor_text_color
if not is_wayland and not is_macos: # no window icons on wayland
with open(logo_data_file, 'rb') as f:
set_default_window_icon(f.read(), 256, 256)
with cached_values_for(run_app.cached_values_name) as cached_values: with cached_values_for(run_app.cached_values_name) as cached_values:
with startup_notification_handler(extra_callback=run_app.first_window_callback) as pre_show_callback: with startup_notification_handler(extra_callback=run_app.first_window_callback) as pre_show_callback:
window_id = create_os_window( window_id = create_os_window(
@ -132,9 +135,6 @@ def _run_app(opts, args):
pre_show_callback, pre_show_callback,
appname, args.name or args.cls or appname, appname, args.name or args.cls or appname,
args.cls or appname, load_all_shaders) args.cls or appname, load_all_shaders)
if not is_wayland and not is_macos: # no window icons on wayland
with open(logo_data_file, 'rb') as f:
set_default_window_icon(f.read(), 256, 256)
boss = Boss(window_id, opts, args, cached_values, new_os_window_trigger) boss = Boss(window_id, opts, args, cached_values, new_os_window_trigger)
boss.start() boss.start()
try: try: