mirror of
https://github.com/dylanaraps/sowm.git
synced 2025-05-19 09:30:24 -07:00
docs: update
This commit is contained in:
parent
8351d8c0dd
commit
1adf23af8c
12
sowm.c
12
sowm.c
@ -97,21 +97,19 @@ void win_add(Window w) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
if (head == NULL) {
|
if (head == NULL) {
|
||||||
c->next = NULL;
|
|
||||||
c->prev = NULL;
|
c->prev = NULL;
|
||||||
c->win = w;
|
|
||||||
head = c;
|
head = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
for (t=head;t->next;t=t->next);
|
for (t=head;t->next;t=t->next);
|
||||||
|
|
||||||
c->next = NULL;
|
|
||||||
c->prev = t;
|
c->prev = t;
|
||||||
c->win = w;
|
|
||||||
t->next = c;
|
t->next = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c->next = NULL;
|
||||||
|
c->win = w;
|
||||||
cur = c;
|
cur = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,7 +312,8 @@ void win_del(Window w) {
|
|||||||
client *c;
|
client *c;
|
||||||
|
|
||||||
for(c=head;c;c=c->next) {
|
for(c=head;c;c=c->next) {
|
||||||
if (c->win == w) {
|
if (c->win != w) continue;
|
||||||
|
|
||||||
if (c->prev == NULL && c->next == NULL) {
|
if (c->prev == NULL && c->next == NULL) {
|
||||||
free(head);
|
free(head);
|
||||||
|
|
||||||
@ -348,7 +347,6 @@ void win_del(Window w) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void ws_save(int i) {
|
void ws_save(int i) {
|
||||||
desktops[i].mode = mode;
|
desktops[i].mode = mode;
|
||||||
@ -415,7 +413,7 @@ void wm_init() {
|
|||||||
|
|
||||||
start.subwindow = None;
|
start.subwindow = None;
|
||||||
|
|
||||||
while(!XNextEvent(dis,&ev))
|
while(1 && !XNextEvent(dis,&ev))
|
||||||
if (events[ev.type]) events[ev.type](&ev);
|
if (events[ev.type]) events[ev.type](&ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user