Stuff for checking if various XSync's are really needed.
SVN revision: 33741
This commit is contained in:
parent
5ab71de162
commit
c9b1c47dfe
1
src/E.h
1
src/E.h
|
@ -428,6 +428,7 @@ typedef struct
|
|||
int mask_alpha_threshold;
|
||||
char enable_startup_id;
|
||||
char use_render_for_scaling;
|
||||
unsigned int no_sync_mask;
|
||||
} testing;
|
||||
|
||||
char autosave;
|
||||
|
|
|
@ -1291,7 +1291,7 @@ DeskRaise(unsigned int desk)
|
|||
|
||||
ModulesSignal(ESIGNAL_DESK_SWITCH_DONE, NULL);
|
||||
|
||||
ESync();
|
||||
ESync(ESYNC_DESKS);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1327,7 +1327,7 @@ DeskLower(unsigned int desk)
|
|||
HintsSetCurrentDesktop();
|
||||
|
||||
EUngrabServer();
|
||||
ESync();
|
||||
ESync(ESYNC_DESKS);
|
||||
}
|
||||
|
||||
#if 0 /* Unused */
|
||||
|
|
|
@ -2523,7 +2523,7 @@ ECompMgrStart(void)
|
|||
#endif
|
||||
_ECM_SET_CLIP_CHANGED();
|
||||
EUngrabServer();
|
||||
ESync();
|
||||
ESync(0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2587,7 +2587,7 @@ ECompMgrStop(void)
|
|||
DesksBackgroundRefresh(NULL, DESK_BG_RECONFIGURE_ALL);
|
||||
#endif
|
||||
EUngrabServer();
|
||||
ESync();
|
||||
ESync(0);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -658,9 +658,11 @@ void
|
|||
EobjsRepaint(void)
|
||||
{
|
||||
#if USE_COMPOSITE
|
||||
ECompMgrRepaint();
|
||||
if (ECompMgrIsActive())
|
||||
ECompMgrRepaint();
|
||||
else
|
||||
#endif
|
||||
ESync();
|
||||
ESync(0);
|
||||
}
|
||||
|
||||
#if USE_COMPOSITE
|
||||
|
|
|
@ -1053,7 +1053,7 @@ EwinWithdraw(EWin * ewin, Win to)
|
|||
}
|
||||
ICCCM_Withdraw(ewin);
|
||||
|
||||
ESync();
|
||||
ESync(0);
|
||||
EUngrabServer();
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ ExtInitWinMain(void)
|
|||
XSelectInput(disp, win, StructureNotifyMask);
|
||||
|
||||
EUngrabServer();
|
||||
ESync();
|
||||
ESync(0);
|
||||
|
||||
{
|
||||
Window w2, ww;
|
||||
|
@ -133,7 +133,7 @@ ExtInitWinMain(void)
|
|||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 50000;
|
||||
select(0, NULL, NULL, NULL, &tv);
|
||||
ESync();
|
||||
ESync(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ ExtInitWinCreate(void)
|
|||
Eprintf("ExtInitWinCreate\n");
|
||||
|
||||
a = XInternAtom(disp, "ENLIGHTENMENT_RESTART_SCREEN", False);
|
||||
ESync();
|
||||
ESync(0);
|
||||
|
||||
if (fork())
|
||||
{
|
||||
|
|
|
@ -628,9 +628,9 @@ FocusHandleClick(EWin * ewin, Win win)
|
|||
EwinGetContainerXwin(ewin));
|
||||
if (win == EwinGetContainerWin(ewin))
|
||||
{
|
||||
ESync();
|
||||
ESync(ESYNC_FOCUS);
|
||||
XAllowEvents(disp, ReplayPointer, CurrentTime);
|
||||
ESync();
|
||||
ESync(ESYNC_FOCUS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ IB_Animate_A(char iconify, EWin * ewin, EWin * ibox)
|
|||
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 @@ IB_Animate_B(char iconify, EWin * ewin, EWin * ibox)
|
|||
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);
|
||||
|
|
|
@ -279,7 +279,7 @@ main(int argc, char **argv)
|
|||
|
||||
/* 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++)
|
||||
|
|
|
@ -372,7 +372,7 @@ MenuShow(Menu * m, char noshow)
|
|||
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);
|
||||
|
|
|
@ -158,7 +158,7 @@ ETimedLoopInit(int k1, int k2, int speed)
|
|||
etl_fac = (k2 - k1) * (double)speed / 1000.;
|
||||
|
||||
gettimeofday(&etl_tv_start, NULL);
|
||||
ESync();
|
||||
ESync(ESYNC_TLOOP);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -200,6 +200,7 @@ static const CfgItem MiscCfgItems[] = {
|
|||
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),
|
||||
|
|
|
@ -186,7 +186,7 @@ ActionMoveEnd(EWin * ewin)
|
|||
|
||||
Efree(gwins);
|
||||
|
||||
ESync();
|
||||
ESync(ESYNC_MOVRES);
|
||||
|
||||
done:
|
||||
Mode.mode = MODE_NONE;
|
||||
|
@ -458,7 +458,7 @@ ActionResizeEnd(EWin * ewin)
|
|||
ewin->shape_w, ewin->shape_h);
|
||||
}
|
||||
|
||||
ESync();
|
||||
ESync(ESYNC_MOVRES);
|
||||
|
||||
done:
|
||||
if (Mode_mr.grab_server)
|
||||
|
|
|
@ -109,7 +109,7 @@ EDestroyPixImg(PixImg * pi)
|
|||
{
|
||||
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 @@ EBlendPixImg(Win win, PixImg * s1, PixImg * s2, PixImg * dst, int x, int y,
|
|||
if ((w <= 0) || (h <= 0))
|
||||
return;
|
||||
|
||||
ESync();
|
||||
ESync(0);
|
||||
|
||||
switch (dst->xim->bits_per_pixel)
|
||||
{
|
||||
|
|
|
@ -518,7 +518,7 @@ doSMExit(int mode, const char *params)
|
|||
EwinsSetFree();
|
||||
XSelectInput(disp, VRoot.xwin, 0);
|
||||
ExtInitWinKill();
|
||||
ESync();
|
||||
ESync(0);
|
||||
|
||||
/* Forget about cleaning up if no disp */
|
||||
ModulesSignal(ESIGNAL_EXIT, NULL);
|
||||
|
|
|
@ -158,7 +158,7 @@ SetupX(const char *dstr)
|
|||
mask =
|
||||
StructureNotifyMask | SubstructureNotifyMask | SubstructureRedirectMask;
|
||||
ESelectInput(VRoot.win, mask);
|
||||
ESync();
|
||||
ESync(0);
|
||||
if (!Mode.wm.xselect)
|
||||
{
|
||||
AlertX(_("Another Window Manager is already running"),
|
||||
|
|
|
@ -188,7 +188,7 @@ SlideoutShow(Slideout * s, EWin * ewin, Win win)
|
|||
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 @@ SlideoutShow(Slideout * s, EWin * ewin, Win win)
|
|||
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 @@ SlideoutShow(Slideout * s, EWin * ewin, Win win)
|
|||
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 @@ SlideoutShow(Slideout * s, EWin * ewin, Win win)
|
|||
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);
|
||||
|
|
|
@ -166,6 +166,6 @@ StartupWindowsOpen(void)
|
|||
return;
|
||||
|
||||
Mode.place.enable_features--;
|
||||
ESync();
|
||||
ESync(ESYNC_STARTUP);
|
||||
AnimatorAdd(doStartupWindowsOpen, NULL);
|
||||
}
|
||||
|
|
4
src/x.c
4
src/x.c
|
@ -1784,8 +1784,10 @@ EFlush(void)
|
|||
}
|
||||
|
||||
void
|
||||
ESync(void)
|
||||
ESync(unsigned int mask)
|
||||
{
|
||||
if (mask & Conf.testing.no_sync_mask)
|
||||
return;
|
||||
XSync(disp, False);
|
||||
}
|
||||
|
||||
|
|
12
src/xwin.h
12
src/xwin.h
|
@ -32,7 +32,17 @@ void EGrabServer(void);
|
|||
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);
|
||||
|
|
|
@ -219,7 +219,7 @@ Zoom(EWin * ewin)
|
|||
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(EWin * ewin)
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue