some windows may report null for their titles, catch that case when assigning tooltips

This commit is contained in:
Tom Beckmann 2021-12-24 11:48:33 +01:00 committed by José Expósito
parent 33cd59742f
commit 26ebdae58a

View File

@ -603,7 +603,7 @@ namespace Gala {
close_button.opacity = show ? 255 : 0;
window_title.opacity = close_button.opacity;
window_title.set_text (window.get_title (), false);
window_title.set_text (window.get_title () ?? "", false);
window_title.set_max_width (dest_width - (TITLE_MAX_WIDTH_MARGIN * scale_factor));
set_window_title_position (dest_width, dest_height);