event: fix configure requests where a window in another desktop requests focus; client, cursor, event, grab, key, manage, menu: clang-format

This commit is contained in:
Iris Lightshard 2021-04-29 00:41:36 -04:00
parent 2a3fb33866
commit 548f2f7cba
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398
7 changed files with 36 additions and 36 deletions

View file

@ -303,9 +303,9 @@ void shuffle(int up) {
if (zoom) {
quickreshape(
c,
-BORDER,
-BORDER,
ra.width + 2 * BORDER,
-BORDER,
-BORDER,
ra.width + 2 * BORDER,
ra.height + 2 * BORDER);
}
} else {

View file

@ -141,8 +141,7 @@ static char grey_bits[] = {0x01, 0x04};
static XColor bl, wh;
Cursor getcursor(Cursordata* c, ScreenInfo* s)
{
Cursor getcursor(Cursordata* c, ScreenInfo* s) {
Pixmap f, m;
f = XCreatePixmapFromBitmapData(
@ -166,8 +165,7 @@ Cursor getcursor(Cursordata* c, ScreenInfo* s)
return XCreatePixmapCursor(dpy, f, m, &bl, &wh, c->hot[0], c->hot[1]);
}
void initcurs(ScreenInfo* s)
{
void initcurs(ScreenInfo* s) {
XColor dummy;
XAllocNamedColor(dpy, DefaultColormap(dpy, s->num), "black", &bl, &dummy);

View file

@ -159,6 +159,8 @@ void configurereq(XConfigureRequestEvent* e) {
XConfigureWindow(dpy, c->parent, e->value_mask, &wc);
if (e->value_mask & CWStackMode) {
if (c->virt > 0 && c->virt != virt)
switch_to(c->virt);
top(c);
active(c);
}
@ -292,14 +294,14 @@ void newwindow(XCreateWindowEvent* e) {
void destroy(Window w) {
int i;
Client* c;
// int v;
// int v;
curtime = CurrentTime;
c = getclient(w, 0);
if (c == 0)
return;
// v = c->virt;
// v = c->virt;
if (numvirtuals > 1)
for (i = 0; i < numvirtuals; i++)
if (currents[i] == c)

10
grab.c
View file

@ -581,7 +581,7 @@ int sweepdrag(
getmouse(&cx, &cy, c->screen);
else
getmouse(&c->x, &c->y, c->screen);
//XGrabServer(dpy);
// XGrabServer(dpy);
if (bl != BorderUnknown) {
notmoved = recalc(c, cx, cy, bl, notmoved);
}
@ -593,10 +593,10 @@ int sweepdrag(
if (rx != cx || ry != cy || ++idle > 300) {
drawbound(c, 0);
if (rx == cx && ry == cy) {
//XUngrabServer(dpy);
// XUngrabServer(dpy);
XFlush(dpy);
//misleep(500);
//XGrabServer(dpy);
// misleep(500);
// XGrabServer(dpy);
idle = 0;
}
if (e0 || bl != BorderUnknown)
@ -617,7 +617,7 @@ int sweepdrag(
case ButtonRelease:
drawbound(c, 0);
ungrab(e);
//XUngrabServer(dpy);
// XUngrabServer(dpy);
if (e->button != but && c->init)
goto bad;
if (c->dx < 0) {

16
key.c
View file

@ -461,11 +461,11 @@ void keypress(XKeyEvent* e) {
zoom = !zoom;
if (zoom) {
quickreshape(
current,
-BORDER,
-BORDER,
ra.width + 2 * BORDER,
ra.height + 2 * BORDER);
current,
-BORDER,
-BORDER,
ra.width + 2 * BORDER,
ra.height + 2 * BORDER);
}
}
#endif
@ -508,7 +508,7 @@ void keypress(XKeyEvent* e) {
ra.height / 2 - 1.5 * GAPSZ);
#endif
/* quarter snap */
/* quarter snap */
#ifdef SNAPTOPLEFT_KEY
else if (e->keycode == qcode && (e->state & SHORTCUTMOD) == (MODBITS))
quickreshape(
@ -546,7 +546,7 @@ void keypress(XKeyEvent* e) {
ra.height / 2 - 1.5 * GAPSZ);
#endif
/* center snap */
/* center snap */
#ifdef SNAPCENTER_KEY
else if (e->keycode == ccode && (e->state & SHORTCUTMOD) == (MODBITS)) {
if ((e->state & ShiftMask) == (1 << 0)) {
@ -573,7 +573,7 @@ void keypress(XKeyEvent* e) {
stickystack(0);
#endif
/* launch */
/* launch */
#ifdef LAUNCH_KEY
else if (e->keycode == slcode && (e->state & SHORTCUTMOD) == (MODBITS)) {
kbLaunch = 1;

View file

@ -224,9 +224,9 @@ int manage(Client* c, int mapped) {
if (zoom) {
quickreshape(
c,
-BORDER,
-BORDER,
ra.width + 2 * BORDER,
-BORDER,
-BORDER,
ra.width + 2 * BORDER,
ra.height + 2 * BORDER);
}
@ -560,15 +560,15 @@ void getproto(Client* c) {
#ifdef ALWAYSDRAW
int shouldalwaysdraw(Client* c) {
static char* alwaysdraw[] = ALWAYSDRAW;
char** a = alwaysdraw;
while (*a) {
if (c && c->class && strstr(c->class, *a)) {
return 1;
}
++a;
char** a = alwaysdraw;
while (*a) {
if (c && c->class && strstr(c->class, *a)) {
return 1;
}
return 0;
++a;
}
return 0;
}
#endif

6
menu.c
View file

@ -182,7 +182,7 @@ void button(XButtonEvent* e) {
case Delete:
shift = 0;
c = selectwin(1, &shift, s);
delete(c, shift);
delete (c, shift);
break;
case Hide:
hide(selectwin(1, 0, s));
@ -294,10 +294,10 @@ void move(Client* c, int but) {
}
void delete (Client* c, int shift) {
//int v;
// int v;
if (c == 0)
return;
//v = c->virt;
// v = c->virt;
if ((c->proto & Pdelete) && !shift)
sendcmessage(c->window, wm_protocols, wm_delete, 0, 0);
else