discomfitor pushed a commit to branch enlightenment-0.19.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=351bde444c1daa08dcb1585c9bb804f34fe24866

commit 351bde444c1daa08dcb1585c9bb804f34fe24866
Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Sep 16 10:39:34 2014 -0400

    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
---
 src/bin/e_comp.c   |  6 ++++++
 src/bin/e_comp_x.c | 12 +++++++++---
 src/bin/e_comp_x.h |  1 +
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index bbc9610..599c208 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -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);
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index a32a262..e82599d 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -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);
+}
diff --git a/src/bin/e_comp_x.h b/src/bin/e_comp_x.h
index 3afa899..d87a4ad 100644
--- a/src/bin/e_comp_x.h
+++ b/src/bin/e_comp_x.h
@@ -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

-- 


Reply via email to