Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
dwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
63f792d
)
fix pop()
author
Jason Woofenden
<jason@jasonwoof.com>
Mon, 17 Nov 2014 22:58:53 +0000
(17:58 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Mon, 17 Nov 2014 22:58:53 +0000
(17:58 -0500)
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
a04e2b6
..
8ade8d7
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-145,6
+145,7
@@
static void applyrules(Client *c);
static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact);
static void arrange(Monitor *m);
static void arrangemon(Monitor *m);
static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact);
static void arrange(Monitor *m);
static void arrangemon(Monitor *m);
+static void attach_as_master(Client *c);
static void attach(Client *c);
static void attachstack(Client *c);
static void buttonpress(XEvent *e);
static void attach(Client *c);
static void attachstack(Client *c);
static void buttonpress(XEvent *e);
@@
-410,13
+411,17
@@
arrangemon(Monitor *m) {
}
void
}
void
+attach_as_master(Client *c) {
+ c->next = c->mon->clients;
+ c->mon->clients = c;
+}
+void
attach(Client *c) {
if (c->mon->sel) {
c->next = c->mon->sel->next;
c->mon->sel->next = c;
} else {
attach(Client *c) {
if (c->mon->sel) {
c->next = c->mon->sel->next;
c->mon->sel->next = c;
} else {
- c->next = c->mon->clients;
- c->mon->clients = c;
+ attach_as_master(c);
}
}
}
}
@@
-1238,7
+1243,7
@@
nextvisible(Client *c) {
void
pop(Client *c) {
detach(c);
void
pop(Client *c) {
detach(c);
- attach(c);
+ attach_as_master(c);
focus(c);
arrange(c->mon);
}
focus(c);
arrange(c->mon);
}