ec->comp_data->shell.ping(ec->comp_data->shell.surface);
}
-EINTERN void
-e_client_shell_map(E_Client *ec)
+static void
+_e_client_shell_map(E_Client *ec)
{
EINA_SAFETY_ON_NULL_RETURN(ec);
EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
}
+
+EINTERN void
+e_client_show(E_Client *ec)
+{
+ EINA_SAFETY_ON_NULL_RETURN(ec);
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
+
+ if (ec->comp_data->mapped)
+ return;
+
+ if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map) &&
+ (!ec->ignored))
+ {
+ ELOGF("E_CLIENT", "Map.", ec);
+ _e_client_shell_map(ec);
+ }
+ else if (ec->internal || e_comp_wl_subsurface_can_show(ec) ||
+ (ec == e_comp_wl->drag_client))
+ {
+ ELOGF("E_CLIENT", "Map. internal:%d, drag:%d",
+ ec, ec->internal, (ec == e_comp_wl->drag_client));
+ ec->visible = EINA_TRUE;
+ ec->ignored = 0;
+ evas_object_show(ec->frame);
+ ec->comp_data->mapped = 1;
+ }
+}
+
+EINTERN void
+e_client_hide(E_Client *ec)
+{
+ API_ENTRY;
+
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
+
+ if (!ec->comp_data->mapped)
+ return;
+
+ if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap))
+ {
+ ELOGF("E_CLIENT", "Unmap", ec);
+
+ if (priv->hide_by_request)
+ ELOGF("COMP", "Currenlty hide_by_request state.", ec);
+
+ e_client_shell_unmap(ec);
+ }
+ else if (ec->internal || e_comp_wl_subsurface_check(ec) ||
+ (ec == e_comp_wl->drag_client))
+ {
+ ELOGF("E_CLIENT", "Unmap. internal:%d, sub:%p, drag:%d",
+ ec, ec->internal, ec->comp_data->sub.data, (ec == e_comp_wl->drag_client));
+ ec->visible = EINA_FALSE;
+ evas_object_hide(ec->frame);
+ ec->comp_data->mapped = 0;
+ }
+}
+
+EINTERN void
+e_client_hide_with_show_pending_cancel(E_Client *ec)
+{
+ API_ENTRY;
+
+ EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
+
+ if (!ec->comp_data->mapped)
+ return;
+
+ if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap))
+ {
+ ELOGF("E_CLIENT", "Unmap", ec);
+
+ if (priv->hide_by_request)
+ ELOGF("COMP", "Currenlty hide_by_request state.", ec);
+
+ if (ec->show_pending.count > 0)
+ {
+ ELOGF("E_CLIENT", "Reset show_pending!!! (count:%d, run:%d)", ec, ec->show_pending.count, ec->show_pending.running);
+ ec->show_pending.count = 0;
+ if (ec->show_pending.running)
+ {
+ // need to send visibility false;
+ ec->visibility.obscured = E_VISIBILITY_UNOBSCURED;
+ ELOGF("POL_VIS", "CLIENT VIS ON (fake). argb:%d, opaque:%2d", ec, ec->argb, ec->visibility.opaque);
+ EC_CHANGED(ec);
+ }
+ ec->show_pending.running = EINA_FALSE;
+ }
+ e_client_shell_unmap(ec);
+ }
+ else if ((ec->internal) || (e_comp_wl_subsurface_check(ec)) ||
+ (ec == e_comp_wl->drag_client))
+ {
+ ELOGF("E_CLIENT", "Unmap. internal:%d, sub:%p, drag:%d",
+ ec, ec->internal, ec->comp_data->sub.data, (ec == e_comp_wl->drag_client));
+ ec->visible = EINA_FALSE;
+ evas_object_hide(ec->frame);
+ ec->comp_data->mapped = 0;
+ }
+}
EINTERN struct wl_listener *e_client_destroy_listener_get(E_Client *ec, wl_notify_func_t notify);
+void e_client_show(E_Client *ec);
+void e_client_hide(E_Client *ec);
+void e_client_hide_with_show_pending_cancel(E_Client *ec);
+
void e_client_shell_configure_send(E_Client *ec, uint32_t edges, int32_t width, int32_t height);
void e_client_shell_configure(E_Client *ec, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height);
void e_client_shell_ping(E_Client *ec);
-void e_client_shell_map(E_Client *ec);
void e_client_shell_unmap(E_Client *ec);
#endif
/* unmap ec */
if (cdata->mapped)
{
- if (hide_by_request)
- ELOGF("COMP", "Currenlty hide_by_request state. pixmap_usable:%d", ec, pixmap_usable);
+ ELOGF("COMP", "Unmap. pixmap_usable:%d", ec, pixmap_usable);
- if ((cdata->shell.surface) &&
- (cdata->shell.unmap))
- {
- ELOGF("COMP", "Try to unmap. Call shell.unmap.", ec);
- if (ec->show_pending.count > 0)
- {
- ELOGF("E_CLIENT", "Reset show_pending!!! (count:%d, run:%d)", ec, ec->show_pending.count, ec->show_pending.running);
- ec->show_pending.count = 0;
- if (ec->show_pending.running)
- {
- // need to send visibility false;
- ec->visibility.obscured = E_VISIBILITY_UNOBSCURED;
- ELOGF("POL_VIS", "CLIENT VIS ON (fake). argb:%d, opaque:%2d", ec, ec->argb, ec->visibility.opaque);
- EC_CHANGED(ec);
- }
- ec->show_pending.running = EINA_FALSE;
- }
- e_client_shell_unmap(ec);
- }
- else if ((ec->internal) ||
- (e_comp_wl_subsurface_check(ec)) ||
- (ec == e_comp_wl->drag_client))
- {
- ELOGF("COMP", "Try to unmap. Hide window. internal:%d, sub:%p, drag:%d",
- ec, ec->internal, cdata->sub.data, (ec == e_comp_wl->drag_client));
- ec->visible = EINA_FALSE;
- evas_object_hide(ec->frame);
- cdata->mapped = 0;
- }
+ e_client_hide_with_show_pending_cancel(ec);
}
if ((cdata->sub.below_obj) &&
else
{
/* map ec */
- if (!cdata->mapped)
- {
- if ((cdata->shell.surface) &&
- (cdata->shell.map) &&
- (!ec->ignored))
- {
- ELOGF("COMP", "Try to map. Call shell.map.", ec);
- e_client_shell_map(ec);
- }
- else if ((ec->internal) ||
- (e_comp_wl_subsurface_can_show(ec)) ||
- (ec == e_comp_wl->drag_client))
- {
- ELOGF("COMP", "Try to map. Show window. internal:%d, drag:%d",
- ec, ec->internal, (ec == e_comp_wl->drag_client));
- ec->visible = EINA_TRUE;
- ec->ignored = 0;
- evas_object_show(ec->frame);
- cdata->mapped = 1;
- }
- }
+ e_client_show(ec);
if ((cdata->sub.below_obj) &&
(!evas_object_visible_get(cdata->sub.below_obj)) &&
{
if (ec->comp_data->mapped)
{
- if (hide_by_request)
- ELOGF("COMP", "Currenlty hide_by_request state2. pixmap_usable:%d", ec, pixmap_usable);
+ ELOGF("COMP", "Unmap. pixmap_usable:%d", ec, pixmap_usable);
- if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap))
- {
- ELOGF("COMP", "Try to unmap2. Call shell.unmap.", ec);
- e_client_shell_unmap(ec);
- }
- else if (ec->internal || e_comp_wl_subsurface_check(ec) ||
- (ec == e_comp_wl->drag_client))
- {
- ELOGF("COMP", "Try to unmap2. Hide window. internal:%d, sub:%p, drag:%d",
- ec, ec->internal, ec->comp_data->sub.data, (ec == e_comp_wl->drag_client));
- ec->visible = EINA_FALSE;
- evas_object_hide(ec->frame);
- ec->comp_data->mapped = 0;
- }
+ e_client_hide(ec);
}
if (ec->comp_data->sub.below_obj && evas_object_visible_get(ec->comp_data->sub.below_obj))
}
else
{
- if (!ec->comp_data->mapped)
- {
- if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map) &&
- (!ec->ignored))
- {
- ELOGF("COMP", "Try to map2. Call shell.map.", ec);
- e_client_shell_map(ec);
- }
- else if (ec->internal || e_comp_wl_subsurface_can_show(ec) ||
- (ec == e_comp_wl->drag_client))
- {
- ELOGF("COMP", "Try to map2. Show window. internal:%d, drag:%d",
- ec, ec->internal, (ec == e_comp_wl->drag_client));
- ec->visible = EINA_TRUE;
- ec->ignored = 0;
- evas_object_show(ec->frame);
- ec->comp_data->mapped = 1;
- }
- }
+ e_client_show(ec);
if (ec->comp_data->sub.below_obj && !evas_object_visible_get(ec->comp_data->sub.below_obj)
&& evas_object_visible_get(ec->frame))