Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h desktops.c ecompmgr.c eobj.c ewins.c extinitwin.c focus.c iconify.c main.c menus.c misc.c mod-misc.c moveresize.c piximg.c session.c setup.c slideout.c startup.c x.c xwin.h zoom.c Log Message: Stuff for checking if various XSync's are really needed. =================================================================== RCS file: /cvs/e/e16/e/src/E.h,v retrieving revision 1.603 retrieving revision 1.604 diff -u -3 -r1.603 -r1.604 --- E.h 10 Feb 2008 20:21:52 -0000 1.603 +++ E.h 13 Feb 2008 21:31:28 -0000 1.604 @@ -428,6 +428,7 @@ int mask_alpha_threshold; char enable_startup_id; char use_render_for_scaling; + unsigned int no_sync_mask; } testing; char autosave; =================================================================== RCS file: /cvs/e/e16/e/src/desktops.c,v retrieving revision 1.278 retrieving revision 1.279 diff -u -3 -r1.278 -r1.279 --- desktops.c 13 Feb 2008 20:51:00 -0000 1.278 +++ desktops.c 13 Feb 2008 21:31:28 -0000 1.279 @@ -1291,7 +1291,7 @@ ModulesSignal(ESIGNAL_DESK_SWITCH_DONE, NULL); - ESync(); + ESync(ESYNC_DESKS); } static void @@ -1327,7 +1327,7 @@ HintsSetCurrentDesktop(); EUngrabServer(); - ESync(); + ESync(ESYNC_DESKS); } #if 0 /* Unused */ =================================================================== RCS file: /cvs/e/e16/e/src/ecompmgr.c,v retrieving revision 1.168 retrieving revision 1.169 diff -u -3 -r1.168 -r1.169 --- ecompmgr.c 10 Feb 2008 20:21:53 -0000 1.168 +++ ecompmgr.c 13 Feb 2008 21:31:28 -0000 1.169 @@ -2523,7 +2523,7 @@ #endif _ECM_SET_CLIP_CHANGED(); EUngrabServer(); - ESync(); + ESync(0); } static void @@ -2587,7 +2587,7 @@ DesksBackgroundRefresh(NULL, DESK_BG_RECONFIGURE_ALL); #endif EUngrabServer(); - ESync(); + ESync(0); } void =================================================================== RCS file: /cvs/e/e16/e/src/eobj.c,v retrieving revision 1.98 retrieving revision 1.99 diff -u -3 -r1.98 -r1.99 --- eobj.c 13 Feb 2008 20:51:00 -0000 1.98 +++ eobj.c 13 Feb 2008 21:31:28 -0000 1.99 @@ -658,9 +658,11 @@ EobjsRepaint(void) { #if USE_COMPOSITE - ECompMgrRepaint(); + if (ECompMgrIsActive()) + ECompMgrRepaint(); + else #endif - ESync(); + ESync(0); } #if USE_COMPOSITE =================================================================== RCS file: /cvs/e/e16/e/src/ewins.c,v retrieving revision 1.218 retrieving revision 1.219 diff -u -3 -r1.218 -r1.219 --- ewins.c 13 Feb 2008 20:51:00 -0000 1.218 +++ ewins.c 13 Feb 2008 21:31:28 -0000 1.219 @@ -1053,7 +1053,7 @@ } ICCCM_Withdraw(ewin); - ESync(); + ESync(0); EUngrabServer(); } =================================================================== RCS file: /cvs/e/e16/e/src/extinitwin.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- extinitwin.c 15 Dec 2007 16:29:22 -0000 1.23 +++ extinitwin.c 13 Feb 2008 21:31:28 -0000 1.24 @@ -73,7 +73,7 @@ XSelectInput(disp, win, StructureNotifyMask); EUngrabServer(); - ESync(); + ESync(0); { Window w2, ww; @@ -133,7 +133,7 @@ tv.tv_sec = 0; tv.tv_usec = 50000; select(0, NULL, NULL, NULL, &tv); - ESync(); + ESync(0); } } @@ -156,7 +156,7 @@ Eprintf("ExtInitWinCreate\n"); a = XInternAtom(disp, "ENLIGHTENMENT_RESTART_SCREEN", False); - ESync(); + ESync(0); if (fork()) { =================================================================== RCS file: /cvs/e/e16/e/src/focus.c,v retrieving revision 1.171 retrieving revision 1.172 diff -u -3 -r1.171 -r1.172 --- focus.c 19 Jan 2008 13:44:54 -0000 1.171 +++ focus.c 13 Feb 2008 21:31:28 -0000 1.172 @@ -628,9 +628,9 @@ EwinGetContainerXwin(ewin)); if (win == EwinGetContainerWin(ewin)) { - ESync(); + ESync(ESYNC_FOCUS); XAllowEvents(disp, ReplayPointer, CurrentTime); - ESync(); + ESync(ESYNC_FOCUS); } } =================================================================== RCS file: /cvs/e/e16/e/src/iconify.c,v retrieving revision 1.226 retrieving revision 1.227 diff -u -3 -r1.226 -r1.227 --- iconify.c 21 Dec 2007 22:04:54 -0000 1.226 +++ iconify.c 13 Feb 2008 21:31:28 -0000 1.227 @@ -139,7 +139,7 @@ XDrawLine(disp, root, gc, x3, y3, x4, y4); XDrawLine(disp, root, gc, x4, y4, x1, y1); - ESync(); + ESync(ESYNC_ICONIFY); IB_Animate_Sleep(t0, a); XDrawLine(disp, root, gc, x1, y1, x2, y2); @@ -216,7 +216,7 @@ h = (int)(fh + a * (th - fh)); XDrawRectangle(disp, root, gc, x, y, w, h); - ESync(); + ESync(ESYNC_ICONIFY); IB_Animate_Sleep(t0, a); XDrawRectangle(disp, root, gc, x, y, w, h); =================================================================== RCS file: /cvs/e/e16/e/src/main.c,v retrieving revision 1.163 retrieving revision 1.164 diff -u -3 -r1.163 -r1.164 --- main.c 4 Feb 2008 16:39:25 -0000 1.163 +++ main.c 13 Feb 2008 21:31:29 -0000 1.164 @@ -279,7 +279,7 @@ /* let's make sure we set this up and go to our desk anyways */ DeskGoto(DesksGetCurrent()); - ESync(); + ESync(ESYNC_MAIN); #ifdef SIGCONT for (i = 0; i < Mode.wm.child_count; i++) =================================================================== RCS file: /cvs/e/e16/e/src/menus.c,v retrieving revision 1.296 retrieving revision 1.297 diff -u -3 -r1.296 -r1.297 --- menus.c 3 Feb 2008 16:52:38 -0000 1.296 +++ menus.c 13 Feb 2008 21:31:29 -0000 1.297 @@ -372,7 +372,7 @@ Eprintf("Mode_menus.context_ewin set %s\n", EwinGetTitle(Mode_menus.context_ewin)); #endif - ESync(); + ESync(ESYNC_MENUS); Mode_menus.first = m; MenuShowMasker(m); TooltipsEnable(0); =================================================================== RCS file: /cvs/e/e16/e/src/misc.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -3 -r1.81 -r1.82 --- misc.c 27 Jan 2008 18:37:19 -0000 1.81 +++ misc.c 13 Feb 2008 21:31:29 -0000 1.82 @@ -158,7 +158,7 @@ etl_fac = (k2 - k1) * (double)speed / 1000.; gettimeofday(&etl_tv_start, NULL); - ESync(); + ESync(ESYNC_TLOOP); } int =================================================================== RCS file: /cvs/e/e16/e/src/mod-misc.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -3 -r1.64 -r1.65 --- mod-misc.c 10 Feb 2008 20:21:53 -0000 1.64 +++ mod-misc.c 13 Feb 2008 21:31:29 -0000 1.65 @@ -200,6 +200,7 @@ CFG_ITEM_INT(Conf, testing.mask_alpha_threshold, 8), CFG_ITEM_BOOL(Conf, testing.enable_startup_id, 1), CFG_ITEM_BOOL(Conf, testing.use_render_for_scaling, 0), + CFG_ITEM_HEX(Conf, testing.no_sync_mask, 0), CFG_ITEM_BOOL(Conf, autosave, 1), CFG_ITEM_BOOL(Conf, memory_paranoia, 1), =================================================================== RCS file: /cvs/e/e16/e/src/moveresize.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -3 -r1.85 -r1.86 --- moveresize.c 24 Dec 2007 00:04:55 -0000 1.85 +++ moveresize.c 13 Feb 2008 21:31:29 -0000 1.86 @@ -186,7 +186,7 @@ Efree(gwins); - ESync(); + ESync(ESYNC_MOVRES); done: Mode.mode = MODE_NONE; @@ -458,7 +458,7 @@ ewin->shape_w, ewin->shape_h); } - ESync(); + ESync(ESYNC_MOVRES); done: if (Mode_mr.grab_server) =================================================================== RCS file: /cvs/e/e16/e/src/piximg.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- piximg.c 7 Nov 2007 21:40:30 -0000 1.3 +++ piximg.c 13 Feb 2008 21:31:29 -0000 1.4 @@ -109,7 +109,7 @@ { if (!pi) return; - ESync(); + ESync(0); XShmDetach(disp, pi->shminfo); shmdt(pi->shminfo->shmaddr); shmctl(pi->shminfo->shmid, IPC_RMID, 0); @@ -222,7 +222,7 @@ if ((w <= 0) || (h <= 0)) return; - ESync(); + ESync(0); switch (dst->xim->bits_per_pixel) { =================================================================== RCS file: /cvs/e/e16/e/src/session.c,v retrieving revision 1.148 retrieving revision 1.149 diff -u -3 -r1.148 -r1.149 --- session.c 30 Dec 2007 20:55:20 -0000 1.148 +++ session.c 13 Feb 2008 21:31:29 -0000 1.149 @@ -518,7 +518,7 @@ EwinsSetFree(); XSelectInput(disp, VRoot.xwin, 0); ExtInitWinKill(); - ESync(); + ESync(0); /* Forget about cleaning up if no disp */ ModulesSignal(ESIGNAL_EXIT, NULL); =================================================================== RCS file: /cvs/e/e16/e/src/setup.c,v retrieving revision 1.186 retrieving revision 1.187 diff -u -3 -r1.186 -r1.187 --- setup.c 2 Dec 2007 11:15:57 -0000 1.186 +++ setup.c 13 Feb 2008 21:31:29 -0000 1.187 @@ -158,7 +158,7 @@ mask = StructureNotifyMask | SubstructureNotifyMask | SubstructureRedirectMask; ESelectInput(VRoot.win, mask); - ESync(); + ESync(0); if (!Mode.wm.xselect) { AlertX(_("Another Window Manager is already running"), =================================================================== RCS file: /cvs/e/e16/e/src/slideout.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -3 -r1.61 -r1.62 --- slideout.c 5 Sep 2007 19:12:56 -0000 1.61 +++ slideout.c 13 Feb 2008 21:31:29 -0000 1.62 @@ -188,7 +188,7 @@ for (i = 0; i < s->num_objs; i++) EChangeWindowAttributes(EobjGetWin(s->objs[i]), CWWinGravity, &att); EoMoveResize(s, xx, yy, 1, 1); - ESync(); + ESync(ESYNC_SLIDEOUT); EoMap(s, 2); EobjSlideSizeTo(EoObj(s), xx + sw, yy, xx, yy, 1, sh, sw, sh, Conf.place.slidespeedmap); @@ -200,7 +200,7 @@ for (i = 0; i < s->num_objs; i++) EChangeWindowAttributes(EobjGetWin(s->objs[i]), CWWinGravity, &att); EoMoveResize(s, xx, yy, 1, 1); - ESync(); + ESync(ESYNC_SLIDEOUT); EoMap(s, 2); EobjSlideSizeTo(EoObj(s), xx, yy, xx, yy, 1, sh, sw, sh, Conf.place.slidespeedmap); @@ -212,7 +212,7 @@ for (i = 0; i < s->num_objs; i++) EChangeWindowAttributes(EobjGetWin(s->objs[i]), CWWinGravity, &att); EoMoveResize(s, xx, yy, 1, 1); - ESync(); + ESync(ESYNC_SLIDEOUT); EoMap(s, 2); EobjSlideSizeTo(EoObj(s), xx, yy + sh, xx, yy, sw, 1, sw, sh, Conf.place.slidespeedmap); @@ -224,7 +224,7 @@ for (i = 0; i < s->num_objs; i++) EChangeWindowAttributes(EobjGetWin(s->objs[i]), CWWinGravity, &att); EoMoveResize(s, xx, yy, 1, 1); - ESync(); + ESync(ESYNC_SLIDEOUT); EoMap(s, 2); EobjSlideSizeTo(EoObj(s), xx, yy, xx, yy, sw, 1, sw, sh, Conf.place.slidespeedmap); =================================================================== RCS file: /cvs/e/e16/e/src/startup.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -3 -r1.77 -r1.78 --- startup.c 10 Sep 2007 20:26:53 -0000 1.77 +++ startup.c 13 Feb 2008 21:31:29 -0000 1.78 @@ -166,6 +166,6 @@ return; Mode.place.enable_features--; - ESync(); + ESync(ESYNC_STARTUP); AnimatorAdd(doStartupWindowsOpen, NULL); } =================================================================== RCS file: /cvs/e/e16/e/src/x.c,v retrieving revision 1.168 retrieving revision 1.169 diff -u -3 -r1.168 -r1.169 --- x.c 3 Feb 2008 16:52:38 -0000 1.168 +++ x.c 13 Feb 2008 21:31:29 -0000 1.169 @@ -1784,8 +1784,10 @@ } void -ESync(void) +ESync(unsigned int mask) { + if (mask & Conf.testing.no_sync_mask) + return; XSync(disp, False); } =================================================================== RCS file: /cvs/e/e16/e/src/xwin.h,v retrieving revision 1.37 retrieving revision 1.38 diff -u -3 -r1.37 -r1.38 --- xwin.h 3 Feb 2008 16:52:38 -0000 1.37 +++ xwin.h 13 Feb 2008 21:31:29 -0000 1.38 @@ -32,7 +32,17 @@ void EUngrabServer(void); int EServerIsGrabbed(void); void EFlush(void); -void ESync(void); + +#define ESYNC_MAIN 0x0001 +#define ESYNC_DESKS 0x0002 +#define ESYNC_MENUS 0x0004 +#define ESYNC_MOVRES 0x0008 +#define ESYNC_FOCUS 0x0010 +#define ESYNC_ICONIFY 0x0020 +#define ESYNC_TLOOP 0x0040 +#define ESYNC_SLIDEOUT 0x0080 +#define ESYNC_STARTUP 0x0100 +void ESync(unsigned int mask); #if USE_COMPOSITE int EVisualIsARGB(Visual * vis); =================================================================== RCS file: /cvs/e/e16/e/src/zoom.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -3 -r1.42 -r1.43 --- zoom.c 19 Jan 2008 13:44:54 -0000 1.42 +++ zoom.c 13 Feb 2008 21:31:29 -0000 1.43 @@ -219,7 +219,7 @@ EDestroyWindow(zoom_mask_4); SwitchRes(0, 0, 0, 0, 0); EwinWarpTo(ewin); - ESync(); + ESync(0); zoom_last_ewin = NULL; } return; @@ -262,7 +262,7 @@ zoom_mask_2 = ZoomMask(0, 0, mode->hdisplay, y1); zoom_mask_3 = ZoomMask(x1 + ewin->client.w, 0, x2, mode->vdisplay); zoom_mask_4 = ZoomMask(0, y1 + ewin->client.h, mode->hdisplay, y2); - ESync(); + ESync(0); } } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs