summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-04-11 11:39:36 -0500
committerDerek Foreman <derekf@osg.samsung.com>2018-04-11 11:48:27 -0500
commitf560c76b528753ab8a478e5a6f314838eac02221 (patch)
tree3de8c794cfe984b67d662eda5e4a0d342af95354
parent5a2c5479bf462882150597c465fbecf53c703bf1 (diff)
ecore_wl2: Properly handle minimize request before shell surface exists
If we're asked to iconify a window before it's visible we need to track this and apply the state as soon as we create the shell surface. fix T6834
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h1
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c9
-rw-r--r--src/lib/ecore_wl2/window_v6.x4
3 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index e47c3ffaae..cbeca119f6 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -264,6 +264,7 @@ struct _Ecore_Wl2_Window
264 } wm_rot; 264 } wm_rot;
265 Eina_Bool has_buffer : 1; 265 Eina_Bool has_buffer : 1;
266 Eina_Bool updating : 1; 266 Eina_Bool updating : 1;
267 Eina_Bool deferred_minimize : 1;
267}; 268};
268 269
269struct _Ecore_Wl2_Output 270struct _Ecore_Wl2_Output
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index ac57ba2f84..4398ffd824 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -365,6 +365,10 @@ _window_shell_surface_create(Ecore_Wl2_Window *window)
365 xdg_toplevel_add_listener(window->xdg_toplevel, 365 xdg_toplevel_add_listener(window->xdg_toplevel,
366 &_xdg_toplevel_listener, window); 366 &_xdg_toplevel_listener, window);
367 367
368 if (window->deferred_minimize)
369 xdg_toplevel_set_minimized(window->xdg_toplevel);
370 window->deferred_minimize = EINA_FALSE;
371
368 if (window->title) 372 if (window->title)
369 xdg_toplevel_set_title(window->xdg_toplevel, window->title); 373 xdg_toplevel_set_title(window->xdg_toplevel, window->title);
370 if (window->class) 374 if (window->class)
@@ -1094,6 +1098,11 @@ ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool iconified)
1094 1098
1095 iconified = !!iconified; 1099 iconified = !!iconified;
1096 1100
1101 if (!window->xdg_toplevel && !window->zxdg_toplevel)
1102 {
1103 window->deferred_minimize = iconified;
1104 return;
1105 }
1097 1106
1098 if (iconified) 1107 if (iconified)
1099 { 1108 {
diff --git a/src/lib/ecore_wl2/window_v6.x b/src/lib/ecore_wl2/window_v6.x
index 28ff1b40c4..4d8ece5ae6 100644
--- a/src/lib/ecore_wl2/window_v6.x
+++ b/src/lib/ecore_wl2/window_v6.x
@@ -161,6 +161,10 @@ _window_v6_shell_surface_create(Ecore_Wl2_Window *window)
161 zxdg_toplevel_v6_add_listener(window->zxdg_toplevel, 161 zxdg_toplevel_v6_add_listener(window->zxdg_toplevel,
162 &_zxdg_toplevel_listener, window); 162 &_zxdg_toplevel_listener, window);
163 163
164 if (window->deferred_minimize)
165 zxdg_toplevel_v6_set_minimized(window->zxdg_toplevel);
166 window->deferred_minimize = EINA_FALSE;
167
164 if (window->title) 168 if (window->title)
165 zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title); 169 zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title);
166 if (window->class) 170 if (window->class)