mirror of
https://github.com/0intro/wmii
synced 2025-02-12 20:34:39 +03:00
Remove some cruft, arrange areas when adding clients, and make sure we don't map mapped clients and vice versa
This commit is contained in:
parent
3cb772c951
commit
d197845630
1
area.c
1
area.c
@ -155,6 +155,7 @@ attach_to_area(Area *a, Frame *f, Bool send) {
|
||||
else /* floating */
|
||||
place_client(a, c);
|
||||
|
||||
arrange_column(a, False);
|
||||
focus_client(f->client, False);
|
||||
|
||||
update_client_grab(f->client);
|
||||
|
20
client.c
20
client.c
@ -220,22 +220,26 @@ set_client_state(Client * c, int state)
|
||||
|
||||
void
|
||||
map_client(Client *c) {
|
||||
XSelectInput(blz.dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
|
||||
XMapWindow(blz.dpy, c->win);
|
||||
XSelectInput(blz.dpy, c->win, CLIENT_MASK);
|
||||
if(!c->mapped) {
|
||||
XSelectInput(blz.dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
|
||||
XMapWindow(blz.dpy, c->win);
|
||||
XSelectInput(blz.dpy, c->win, CLIENT_MASK);
|
||||
}
|
||||
set_client_state(c, NormalState);
|
||||
c->mapped = 1;
|
||||
}
|
||||
|
||||
void
|
||||
unmap_client(Client *c, int state) {
|
||||
XSelectInput(blz.dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
|
||||
XUnmapWindow(blz.dpy, c->win);
|
||||
XSelectInput(blz.dpy, c->win, CLIENT_MASK);
|
||||
if(c->mapped) {
|
||||
XSelectInput(blz.dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
|
||||
XUnmapWindow(blz.dpy, c->win);
|
||||
XSelectInput(blz.dpy, c->win, CLIENT_MASK);
|
||||
/* Always set this, since we don't care anymore once it's been destroyed */
|
||||
c->unmapped++;
|
||||
}
|
||||
set_client_state(c, state);
|
||||
c->mapped = 0;
|
||||
/* Always set this, since we don't care anymore once it's been destroyed */
|
||||
c->unmapped++;
|
||||
}
|
||||
|
||||
void
|
||||
|
6
view.c
6
view.c
@ -153,7 +153,6 @@ void
|
||||
attach_to_view(View *v, Frame *f) {
|
||||
Area *a;
|
||||
Client *c = f->client;
|
||||
unsigned int i;
|
||||
|
||||
c->revert = nil;
|
||||
a = v->sel;
|
||||
@ -163,11 +162,6 @@ attach_to_view(View *v, Frame *f) {
|
||||
else if(starting && v->sel->floating)
|
||||
v->sel = v->area->next;
|
||||
attach_to_area(v->sel, f, False);
|
||||
if(a != v->sel) {
|
||||
for(a=v->area, i = 0; a && a != v->sel; a=a->next, i++);
|
||||
if(i) write_event("ColumnFocus %d\n", i);
|
||||
else write_event("FocusFloating\n");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user