raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=3112e2ba1a8b812bf508b80549da3794f66d77f8

commit 3112e2ba1a8b812bf508b80549da3794f66d77f8
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Apr 20 20:06:08 2021 +0100

    e - restore iconified windows on restart to iconified
---
 src/bin/e_comp_x.c | 8 ++++++++
 src/bin/e_main.c   | 1 +
 2 files changed, 9 insertions(+)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index dcdb49e8c..4045f6722 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -3873,6 +3873,14 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, 
E_Client *ec)
                                     (Ecore_X_Window*)&ec->icccm.window_group,
                                     &is_urgent))
           {
+             unsigned int was_here = 0;
+
+             if (ecore_x_window_prop_card32_get(win,
+                                                E_ATOM_E_WAS_HERE,
+                                                &was_here, 1) != 1)
+               was_here = 0;
+             if (was_here) ec->icccm.state = ecore_x_icccm_state_get(win);
+                    ec->icccm.initial_state);
              if (ec->new_client)
                {
                   /* clients may unset iconic state when no wm is present */
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 8f3d3e19f..a4a12fbaa 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -1675,6 +1675,7 @@ _e_main_desk_restore(void)
                   // ensure windows for this desk are shown
                   E_CLIENT_REVERSE_FOREACH(ec)
                     {
+                       if (ec->iconic) continue;
                        if ((ec->desk == desk) || (ec->sticky))
                          {
                             ec->hidden = 0;

-- 


Reply via email to