manually break out of nocomp

in the event that there was only one window open and it was closed, this would permanently break the compositor

fix T1665
devs/devilhorns/e_comp_wl
Mike Blumenkrantz 9 years ago
parent 4e3b05b11f
commit 681b1f4312
  1. 6
      src/bin/e_comp.c
  2. 12
      src/bin/e_comp_x.c
  3. 1
      src/bin/e_comp_x.h

@ -262,6 +262,7 @@ static void
_e_comp_cb_nocomp_end(E_Comp *c)
{
E_Client *ec;
Eina_Bool need_manual = EINA_FALSE;
if (!c->nocomp) return;
@ -271,9 +272,14 @@ _e_comp_cb_nocomp_end(E_Comp *c)
E_CLIENT_FOREACH(c, ec)
{
e_client_redirected_set(ec, 1);
need_manual |= ec->redirected;
if (ec->visible && (!ec->input_only))
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
}
#ifndef HAVE_WAYLAND_ONLY
if (!need_manual)
e_comp_x_nocomp_end(c);
#endif
e_comp_render_queue(c);
e_comp_shape_queue_block(c, 0);
ecore_event_add(E_EVENT_COMPOSITOR_ENABLE, NULL, NULL, NULL);

@ -4106,9 +4106,7 @@ _e_comp_x_hook_client_redirect(void *d EINA_UNUSED, E_Client *ec)
else if (ec->comp->nocomp)
{
/* first window */
ec->comp->nocomp = 0;
ecore_x_window_show(ec->comp->win);
ecore_x_composite_redirect_subwindows(ec->comp->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
e_comp_x_nocomp_end(ec->comp);
ecore_x_window_reparent(_e_comp_x_client_window_get(ec), ec->comp->man->root, ec->client.x, ec->client.y);
_e_comp_x_client_stack(ec);
}
@ -5264,3 +5262,11 @@ e_comp_x_shutdown(void)
ecore_x_events_allow_all();
ecore_x_shutdown();
}
EINTERN void
e_comp_x_nocomp_end(E_Comp *comp)
{
comp->nocomp = 0;
ecore_x_window_show(comp->win);
ecore_x_composite_redirect_subwindows(comp->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
}

@ -111,5 +111,6 @@ EINTERN Eina_Bool e_comp_x_init(void);
EINTERN void e_comp_x_shutdown(void);
EAPI void e_alert_composite_win(Ecore_X_Window root, Ecore_X_Window win);
EINTERN void e_comp_x_nocomp_end(E_Comp *comp);
# endif
#endif

Loading…
Cancel
Save