aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2021-04-29 00:41:36 -0400
committerDerek Stevens <nilix@nilfm.cc>2021-04-29 00:41:36 -0400
commit548f2f7cbad8bb6aaf5b2522b3f8dff9511c7ae6 (patch)
treeb38dd54a45cb60689b89ab1328aff9c949cfa40c
parent2a3fb338667360987d792f062448de079116a8a9 (diff)
event: fix configure requests where a window in another desktop requests focus; client, cursor, event, grab, key, manage, menu: clang-format
-rw-r--r--client.c6
-rw-r--r--cursor.c6
-rw-r--r--event.c6
-rw-r--r--grab.c10
-rw-r--r--key.c16
-rw-r--r--manage.c22
-rw-r--r--menu.c6
7 files changed, 36 insertions, 36 deletions
diff --git a/client.c b/client.c
index b73ac41..b7e8d55 100644
--- a/client.c
+++ b/client.c
@@ -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 {
diff --git a/cursor.c b/cursor.c
index 75ff861..69d0c0f 100644
--- a/cursor.c
+++ b/cursor.c
@@ -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);
diff --git a/event.c b/event.c
index f7a2fc1..44b928e 100644
--- a/event.c
+++ b/event.c
@@ -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)
diff --git a/grab.c b/grab.c
index a17ab6f..136ab5f 100644
--- a/grab.c
+++ b/grab.c
@@ -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) {
diff --git a/key.c b/key.c
index 165ff0a..a74d6b7 100644
--- a/key.c
+++ b/key.c
@@ -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;
diff --git a/manage.c b/manage.c
index 45533fa..2f0ae24 100644
--- a/manage.c
+++ b/manage.c
@@ -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
diff --git a/menu.c b/menu.c
index 916650f..530c477 100644
--- a/menu.c
+++ b/menu.c
@@ -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