diff options
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl_window.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index a1225d0f11..e9ecd795e4 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c | |||
@@ -265,8 +265,12 @@ ecore_wl_window_show(Ecore_Wl_Window *win) | |||
265 | win->shell_surface = | 265 | win->shell_surface = |
266 | wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell, | 266 | wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell, |
267 | win->surface); | 267 | win->surface); |
268 | wl_shell_surface_set_title(win->shell_surface, win->title); | 268 | if (!win->shell_surface) return; |
269 | wl_shell_surface_set_class(win->shell_surface, win->class_name); | 269 | |
270 | if (win->title) | ||
271 | wl_shell_surface_set_title(win->shell_surface, win->title); | ||
272 | if (win->class_name) | ||
273 | wl_shell_surface_set_class(win->shell_surface, win->class_name); | ||
270 | } | 274 | } |
271 | 275 | ||
272 | if (win->shell_surface) | 276 | if (win->shell_surface) |
@@ -707,7 +711,7 @@ ecore_wl_window_title_set(Ecore_Wl_Window *win, const char *title) | |||
707 | if (!win) return; | 711 | if (!win) return; |
708 | eina_stringshare_replace(&win->title, title); | 712 | eina_stringshare_replace(&win->title, title); |
709 | 713 | ||
710 | if (win->shell_surface) | 714 | if ((win->shell_surface) && (win->title)) |
711 | wl_shell_surface_set_title(win->shell_surface, win->title); | 715 | wl_shell_surface_set_title(win->shell_surface, win->title); |
712 | } | 716 | } |
713 | 717 | ||
@@ -720,7 +724,7 @@ ecore_wl_window_class_name_set(Ecore_Wl_Window *win, const char *class_name) | |||
720 | if (!win) return; | 724 | if (!win) return; |
721 | eina_stringshare_replace(&win->class_name, class_name); | 725 | eina_stringshare_replace(&win->class_name, class_name); |
722 | 726 | ||
723 | if (win->shell_surface) | 727 | if ((win->shell_surface) && (win->class_name)) |
724 | wl_shell_surface_set_class(win->shell_surface, win->class_name); | 728 | wl_shell_surface_set_class(win->shell_surface, win->class_name); |
725 | } | 729 | } |
726 | 730 | ||