e_desk_area and e_desk manage the activate_done of e_client instead of e_zone.
Change-Id: Ibcb6bafd5003234eb3333558b59a1d6e9350f713
// client listeners
struct wl_listener client_destroy;
+ struct wl_listener client_activate_done;
};
struct _E_Desk_Smart_Data
_e_desk_smart_client_del(desk->smart_obj, ec);
_e_desk_client_data_del(desk, ec);
+ wl_list_remove(&desk_client->client_activate_done.link);
wl_list_remove(&desk_client->client_destroy.link);
E_FREE(desk_client);
_e_desk_private_client_del(desk_client);
}
+
+static void
+_desk_cb_client_activate_done(struct wl_listener *listener, void *data)
+{
+ E_Desk_Private_Client *desk_client;
+ E_Desk *desk;
+ E_Client *ec;
+
+ desk_client = wl_container_of(listener, desk_client, client_activate_done);
+ desk = desk_client->desk;
+ ec = desk_client->ec;
+
+ ELOGF("DESK", "CLIENT ACTIVATE DONE. desk:%p", ec, desk);
+
+ if ((!ec->iconic) && (!ec->sticky))
+ {
+ e_desk_show(desk);
+ }
+
+ if (!e_client_desk_iconify_skip_get(ec))
+ {
+ e_desk_visible_client_iconified_list_remove_all(desk);
+ }
+}
#endif
EINTERN void
// e_client listeners
desk_client->client_destroy.notify = _desk_cb_client_destroy;
e_client_destroy_listener_add(ec, &desk_client->client_destroy);
+ desk_client->client_activate_done.notify = _desk_cb_client_activate_done;
+ e_client_activate_done_listener_add(ec, &desk_client->client_activate_done);
#endif
_e_desk_client_set(desk, ec);
struct wl_listener client_unstick;
struct wl_listener client_maximize;
struct wl_listener client_unmaximize;
+ struct wl_listener client_activate_done;
// comp_object listeners
struct wl_listener comp_object_raise;
wl_list_remove(&eda_client->comp_object_lower.link);
wl_list_remove(&eda_client->comp_object_raise.link);
+ wl_list_remove(&eda_client->client_activate_done.link);
wl_list_remove(&eda_client->client_unmaximize.link);
wl_list_remove(&eda_client->client_maximize.link);
wl_list_remove(&eda_client->client_unstick.link);
}
static void
+_desk_area_cb_client_activate_done(struct wl_listener *listener, void *data)
+{
+ E_Desk_Area_Private_Client *eda_client;
+ E_Desk_Area *eda;
+ E_Client *ec;
+
+ eda_client = wl_container_of(listener, eda_client, client_activate_done);
+ eda = eda_client->eda;
+ ec = eda_client->ec;
+
+ ELOGF("EDA", "CLIENT ACTIVATE DONE. eda:%p", ec, eda);
+
+ if (!ec->lock_user_stacking)
+ e_client_raise(ec);
+
+ if (ec->shaded || ec->shading)
+ e_client_unshade(ec, ec->shade_dir);
+}
+
+static void
_desk_area_cb_comp_object_lower(struct wl_listener *listener, void *data)
{
E_Desk_Area_Private_Client *eda_client;
e_client_maximize_listener_add(ec, &eda_client->client_maximize);
eda_client->client_unmaximize.notify = _desk_area_cb_client_unmaximize;
e_client_unmaximize_listener_add(ec, &eda_client->client_unmaximize);
+ eda_client->client_activate_done.notify = _desk_area_cb_client_activate_done;
+ e_client_activate_done_listener_add(ec, &eda_client->client_activate_done);
// e_comp_object listeners
eda_client->comp_object_lower.notify = _desk_area_cb_comp_object_lower;
struct wl_listener client_unstick;
struct wl_listener client_maximize;
struct wl_listener client_unmaximize;
-#endif
struct wl_listener client_activate_done;
-#ifdef REFACTOR_DESK_AREA
-#else
struct wl_listener client_fullscreen;
struct wl_listener client_unfullscreen;
#endif
#else
wl_list_remove(&zone_client->client_unfullscreen.link);
wl_list_remove(&zone_client->client_fullscreen.link);
-#endif
wl_list_remove(&zone_client->client_activate_done.link);
-#ifdef REFACTOR_DESK_AREA
-#else
wl_list_remove(&zone_client->client_unmaximize.link);
wl_list_remove(&zone_client->client_maximize.link);
wl_list_remove(&zone_client->client_unstick.link);
}
}
}
-#endif
static void
_zone_cb_client_activate_done(struct wl_listener *listener, void *data)
}
}
-#ifdef REFACTOR_DESK_AREA
-#else
static void
_zone_cb_client_fullscreen(struct wl_listener *listener, void *data)
{
zone_client->client_unmaximize.notify = _zone_cb_client_unmaximize;
e_client_unmaximize_listener_add(ec, &zone_client->client_unmaximize);
-#endif
zone_client->client_activate_done.notify = _zone_cb_client_activate_done;
e_client_activate_done_listener_add(ec, &zone_client->client_activate_done);
-#ifdef REFACTOR_DESK_AREA
-#else
zone_client->client_fullscreen.notify = _zone_cb_client_fullscreen;
e_client_fullscreen_listener_add(ec, &zone_client->client_fullscreen);