kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=72328b12abdaf318a9ee10c0b4be21175c682154

commit 72328b12abdaf318a9ee10c0b4be21175c682154
Author: Kim Woelders <[email protected]>
Date:   Sat Jan 24 15:11:29 2015 +0100

    CM: Reorder start/stop details.
---
 src/ecompmgr.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/ecompmgr.c b/src/ecompmgr.c
index cdf1669..fec31e8 100644
--- a/src/ecompmgr.c
+++ b/src/ecompmgr.c
@@ -2159,8 +2159,6 @@ ECompMgrStart(void)
    Conf_compmgr.override_redirect.opacity =
       OpacityFix(Conf_compmgr.override_redirect.opacity, 100);
 
-   ECompMgrRootBufferCreate(WinGetW(VROOT), WinGetH(VROOT));
-
    Mode_compmgr.root = WinGetXwin(VROOT);
 #if USE_COMPOSITE_OVERLAY_WINDOW
    if (Conf_compmgr.use_cow && !Mode.wm.window)
@@ -2185,12 +2183,19 @@ ECompMgrStart(void)
      }
 #endif
 
+   Mode_compmgr.got_damage = 0;
+
+   ECompMgrRootBufferCreate(WinGetW(VROOT), WinGetH(VROOT));
+
    pa.subwindow_mode = IncludeInferiors;
    pictfmt = XRenderFindVisualFormat(disp, WinGetVisual(VROOT));
    rootPicture =
       XRenderCreatePicture(disp, Mode_compmgr.root, pictfmt, CPSubwindowMode,
                           &pa);
 
+   Mode_compmgr.rgn_tmp = ERegionCreate();
+   Mode_compmgr.rgn_tmp2 = ERegionCreate();
+
    ECompMgrShadowsInit(Conf_compmgr.shadows.mode, 0);
 
    EGrabServer();
@@ -2215,11 +2220,6 @@ ECompMgrStart(void)
        break;
      }
 
-   Mode_compmgr.got_damage = 0;
-
-   Mode_compmgr.rgn_tmp = ERegionCreate();
-   Mode_compmgr.rgn_tmp2 = ERegionCreate();
-
    EventCallbackRegister(VROOT, ECompMgrHandleRootEvent, NULL);
 
    wm_cm_sel = SelectionAcquire("_NET_WM_CM_S", NULL, NULL);
@@ -2258,12 +2258,6 @@ ECompMgrStop(void)
    SelectionRelease(wm_cm_sel);
    wm_cm_sel = NULL;
 
-   PICTURE_DESTROY(rootPicture);
-
-   ECompMgrRootBufferDestroy();
-
-   ECompMgrShadowsInit(ECM_SHADOWS_OFF, 0);
-
    lst1 = EobjListStackGet(&num);
    if (num > 0)
      {
@@ -2284,8 +2278,12 @@ ECompMgrStop(void)
 
    Mode_compmgr.got_damage = 0;
    REGION_DESTROY(Mode_compmgr.damage);
+
+   ECompMgrShadowsInit(ECM_SHADOWS_OFF, 0);
    REGION_DESTROY(Mode_compmgr.rgn_tmp);
    REGION_DESTROY(Mode_compmgr.rgn_tmp2);
+   PICTURE_DESTROY(rootPicture);
+   ECompMgrRootBufferDestroy();
 
    if (Mode_compmgr.mode == ECM_MODE_ROOT)
       XCompositeUnredirectSubwindows(disp, WinGetXwin(VROOT),

-- 


Reply via email to