ignoreconfigurenotifyrequests --> ignoreconfigurerequests

This commit is contained in:
bakkeby 2020-09-14 10:08:47 +02:00
parent a7da48ca3d
commit 01464c584e

21
dwm.c
View File

@ -658,12 +658,11 @@ static int screen;
static int sw, sh; /* X display screen geometry width, height */ static int sw, sh; /* X display screen geometry width, height */
static int bh; /* bar geometry */ static int bh; /* bar geometry */
static int lrpad; /* sum of left and right padding for text */ static int lrpad; /* sum of left and right padding for text */
/* Some clients (e.g. alacritty) helpfully send configure notify requests with a new size or /* Some clients (e.g. alacritty) helpfully send configure requests with a new size or position
* position when they detect that they have been moved to another monitor. This can cause visual * when they detect that they have been moved to another monitor. This can cause visual glitches
* glitches when moving (or resizing) client windows from one monitor to another. This variable * when moving (or resizing) client windows from one monitor to another. This variable is used
* is used internally to ignore such configure notify requests while movemouse or resizemouse are * internally to ignore such configure requests while movemouse or resizemouse are being used. */
* being used. */ static int ignoreconfigurerequests = 0;
static int ignoreconfigurenotifyrequests = 0;
static int (*xerrorxlib)(Display *, XErrorEvent *); static int (*xerrorxlib)(Display *, XErrorEvent *);
static unsigned int numlockmask = 0; static unsigned int numlockmask = 0;
static void (*handler[LASTEvent]) (XEvent *) = { static void (*handler[LASTEvent]) (XEvent *) = {
@ -1269,7 +1268,7 @@ configurerequest(XEvent *e)
XConfigureRequestEvent *ev = &e->xconfigurerequest; XConfigureRequestEvent *ev = &e->xconfigurerequest;
XWindowChanges wc; XWindowChanges wc;
if (ignoreconfigurenotifyrequests) if (ignoreconfigurerequests)
return; return;
if ((c = wintoclient(ev->window))) { if ((c = wintoclient(ev->window))) {
@ -2329,7 +2328,7 @@ movemouse(const Arg *arg)
return; return;
if (!getrootptr(&x, &y)) if (!getrootptr(&x, &y))
return; return;
ignoreconfigurenotifyrequests = 1; ignoreconfigurerequests = 1;
do { do {
XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev); XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
switch(ev.type) { switch(ev.type) {
@ -2387,7 +2386,7 @@ movemouse(const Arg *arg)
#if ROUNDED_CORNERS_PATCH #if ROUNDED_CORNERS_PATCH
drawroundedcorners(c); drawroundedcorners(c);
#endif // ROUNDED_CORNERS_PATCH #endif // ROUNDED_CORNERS_PATCH
ignoreconfigurenotifyrequests = 0; ignoreconfigurerequests = 0;
} }
Client * Client *
@ -2640,7 +2639,7 @@ resizemouse(const Arg *arg)
return; return;
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1); XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
#endif // RESIZEPOINT_PATCH | RESIZECORNERS_PATCH #endif // RESIZEPOINT_PATCH | RESIZECORNERS_PATCH
ignoreconfigurenotifyrequests = 1; ignoreconfigurerequests = 1;
do { do {
XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev); XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
switch(ev.type) { switch(ev.type) {
@ -2723,7 +2722,7 @@ resizemouse(const Arg *arg)
selmon = m; selmon = m;
focus(NULL); focus(NULL);
} }
ignoreconfigurenotifyrequests = 0; ignoreconfigurerequests = 0;
} }
void void