mirror of https://github.com/0intro/wmii
Fix some Xinerama bugs
This commit is contained in:
parent
318f180173
commit
f7567601a7
|
@ -124,7 +124,9 @@ spawn3l(int fd[3], const char *file, ...) {
|
|||
argv[i] = va_arg(ap, char*);
|
||||
va_end(ap);
|
||||
|
||||
return spawn3(fd, file, argv);
|
||||
i = spawn3(fd, file, argv);
|
||||
free(argv);
|
||||
return i;
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
|
@ -174,6 +176,7 @@ _backtrace(int pid, char *btarg) {
|
|||
unlink(gdbcmd);
|
||||
|
||||
done:
|
||||
free(gdbcmd);
|
||||
kill(pid, SIGKILL);
|
||||
waitpid(pid, &status, 0);
|
||||
}
|
||||
|
|
|
@ -13,13 +13,15 @@ area_selclient(Area *a) {
|
|||
return nil;
|
||||
}
|
||||
|
||||
uint
|
||||
int
|
||||
area_idx(Area *a) {
|
||||
View *v;
|
||||
Area *ap;
|
||||
uint i;
|
||||
|
||||
v = a->view;
|
||||
if(a->floating)
|
||||
return -1;
|
||||
i = 1;
|
||||
for(ap=v->areas[a->screen]; a != ap; ap=ap->next)
|
||||
i++;
|
||||
|
@ -120,6 +122,8 @@ area_create(View *v, Area *pos, int scrn, uint width) {
|
|||
if(v->sel == nil && !a->floating)
|
||||
area_focus(a);
|
||||
|
||||
print("%s: screen: %d a: %p mode: %x floating: %d v->floating: %p v->areas: %p\n", v->name, a->screen, a, a->mode, a->floating, v->floating, v->areas);
|
||||
|
||||
if(!a->floating)
|
||||
event("CreateColumn %ud\n", i);
|
||||
return a;
|
||||
|
@ -151,11 +155,13 @@ area_destroy(Area *a) {
|
|||
/* Can only destroy the floating area when destroying a
|
||||
* view---after destroying all columns.
|
||||
*/
|
||||
assert(!a->floating || a->prev || a->next);
|
||||
assert(!a->floating || !v->areas[0]);
|
||||
if(a->prev)
|
||||
a->prev->next = a->next;
|
||||
else
|
||||
else if(!a->floating)
|
||||
v->areas[a->screen] = a->next;
|
||||
else
|
||||
v->floating = nil;
|
||||
if(a->next)
|
||||
a->next->prev = a->prev;
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ group_remove(Client *c) {
|
|||
if(*gp == g) break;
|
||||
assert(*gp == g);
|
||||
gp[0] = gp[0]->next;
|
||||
free(g);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -554,6 +554,7 @@ column_arrange(Area *a, bool dirty) {
|
|||
f->collapsed = (f != a->sel);
|
||||
break;
|
||||
default:
|
||||
print("Dieing: %s: screen: %d a: %p mode: %x floating: %d\n", v->name, a->screen, a, a->mode, a->floating);
|
||||
die("not reached");
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ Area* area_create(View*, Area *pos, int scrn, uint w);
|
|||
void area_destroy(Area*);
|
||||
void area_detach(Frame*);
|
||||
void area_focus(Area*);
|
||||
uint area_idx(Area*);
|
||||
int area_idx(Area*);
|
||||
void area_moveto(Area*, Frame*);
|
||||
char* area_name(Area*);
|
||||
Client* area_selclient(Area*);
|
||||
|
|
|
@ -241,6 +241,7 @@ view_update(View *v) {
|
|||
frames_update_sel(v);
|
||||
view_arrange(v);
|
||||
|
||||
fscrn = false;
|
||||
foreach_frame(v, s, a, f)
|
||||
if(f->client->fullscreen) {
|
||||
f->collapsed = false;
|
||||
|
@ -485,7 +486,7 @@ view_arrange(View *v) {
|
|||
/* This is wrong... */
|
||||
a->r.min.y = v->r.min.y;
|
||||
a->r.max.y = v->r.max.y;
|
||||
print("a->r: %R %R %R\n", a->r, v->r, screen->r);
|
||||
/* print("a->r: %R %R %R\n", a->r, v->r, screen->r); */
|
||||
column_arrange(a, false);
|
||||
}
|
||||
if(v == screen->sel)
|
||||
|
|
Loading…
Reference in New Issue