aboutsummaryrefslogtreecommitdiffstats
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
parentecore_wl2: Stop pretending to fully control minimized state (diff)
downloadefl-f560c76b528753ab8a478e5a6f314838eac02221.tar.gz
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 https://phab.enlightenment.org/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
} wm_rot;
Eina_Bool has_buffer : 1;
Eina_Bool updating : 1;
+ Eina_Bool deferred_minimize : 1;
};
struct _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)
xdg_toplevel_add_listener(window->xdg_toplevel,
&_xdg_toplevel_listener, window);
+ if (window->deferred_minimize)
+ xdg_toplevel_set_minimized(window->xdg_toplevel);
+ window->deferred_minimize = EINA_FALSE;
+
if (window->title)
xdg_toplevel_set_title(window->xdg_toplevel, window->title);
if (window->class)
@@ -1094,6 +1098,11 @@ ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool iconified)
iconified = !!iconified;
+ if (!window->xdg_toplevel && !window->zxdg_toplevel)
+ {
+ window->deferred_minimize = iconified;
+ return;
+ }
if (iconified)
{
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)
zxdg_toplevel_v6_add_listener(window->zxdg_toplevel,
&_zxdg_toplevel_listener, window);
+ if (window->deferred_minimize)
+ zxdg_toplevel_v6_set_minimized(window->zxdg_toplevel);
+ window->deferred_minimize = EINA_FALSE;
+
if (window->title)
zxdg_toplevel_v6_set_title(window->zxdg_toplevel, window->title);
if (window->class)