From a06489951191b50d165a323056b0fa5dd6bbcfa3 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 10 Mar 2017 15:57:15 -0500 Subject: [PATCH] move x11 iconic window init from e_hints -> comp_x initial fetch this reflects the order in which the client passes through these functions and fixes handling of iconic clients on startup --- src/bin/e_comp_x.c | 8 +++++++- src/bin/e_hints.c | 8 -------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index aaa82b30f..03df29a78 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -3590,7 +3590,13 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) &is_urgent)) { if (ec->new_client) - ec->icccm.initial_state = ec->icccm.state; + { + /* clients may unset iconic state when no wm is present */ + if (ec->netwm.state.hidden && (ec->icccm.state == ECORE_X_WINDOW_STATE_HINT_NORMAL)) + ec->icccm.initial_state = ECORE_X_WINDOW_STATE_HINT_ICONIC; + else + ec->icccm.initial_state = ec->icccm.state; + } if (state != ec->icccm.state) { if (ec->icccm.state == ECORE_X_WINDOW_STATE_HINT_WITHDRAWN) diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index 3ca5f21a0..358bb95ea 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -411,14 +411,6 @@ e_hints_window_init(E_Client *ec) if (ec->remember) rem = ec->remember; - if (ec->icccm.initial_state == ECORE_X_WINDOW_STATE_HINT_NONE) - { - if (ec->netwm.state.hidden) - ec->icccm.state = ECORE_X_WINDOW_STATE_HINT_ICONIC; - else - ec->icccm.state = ECORE_X_WINDOW_STATE_HINT_NORMAL; - } - if ((rem) && (rem->apply & E_REMEMBER_APPLY_LAYER)) { ec->layer = rem->prop.layer;