mirror of
https://github.com/0intro/wmii
synced 2025-01-21 01:22:07 +03:00
Fixed flickering when switching in max mode
This commit is contained in:
parent
ef4aef2f28
commit
a36cc9e64b
2
area.c
2
area.c
@ -407,8 +407,6 @@ select_area(Area *a, char *arg) {
|
||||
focus_frame:
|
||||
frame_to_top(p);
|
||||
focus_frame(p, False);
|
||||
if(!p->area->floating)
|
||||
arrange_column(p->area, False);
|
||||
if(v == screen->sel)
|
||||
restack_view(v);
|
||||
flush_masked_events(EnterWindowMask);
|
||||
|
5
client.c
5
client.c
@ -45,6 +45,7 @@ create_client(Window w, XWindowAttributes *wa) {
|
||||
fwa.event_mask =
|
||||
SubstructureRedirectMask | SubstructureNotifyMask | ExposureMask
|
||||
| PointerMotionMask | KeyPressMask | ButtonPressMask | ButtonReleaseMask;
|
||||
fwa.backing_store = Always;
|
||||
c->framewin = XCreateWindow(blz.dpy, blz.root, c->rect.x, c->rect.y,
|
||||
c->rect.width + 2 * def.border,
|
||||
c->rect.height + def.border + labelh(&def.font), 0,
|
||||
@ -524,8 +525,6 @@ resize_client(Client *c, XRectangle *r) {
|
||||
|
||||
c->rect.x = def.border;
|
||||
c->rect.y = labelh(&def.font);
|
||||
c->rect.width = f->rect.width - 2 * def.border;
|
||||
c->rect.height = f->rect.height - def.border - labelh(&def.font);
|
||||
|
||||
if(f->area->sel != f)
|
||||
switch(f->area->mode) {
|
||||
@ -544,6 +543,8 @@ resize_client(Client *c, XRectangle *r) {
|
||||
}
|
||||
else {
|
||||
ShowWindow:
|
||||
c->rect.width = f->rect.width - 2 * def.border;
|
||||
c->rect.height = f->rect.height - def.border - labelh(&def.font);
|
||||
XMoveResizeWindow(blz.dpy, c->win, c->rect.x, c->rect.y,
|
||||
c->rect.width, c->rect.height);
|
||||
map_client(c);
|
||||
|
4
column.c
4
column.c
@ -175,8 +175,8 @@ Fallthrough:
|
||||
case Colmax:
|
||||
for(f=a->frame; f; f=f->anext) {
|
||||
f->rect = a->rect;
|
||||
if(f != a->sel) f->rect.x = screen->rect.width * 2;
|
||||
match_sizehints(f->client, &f->rect, f->area->floating, NORTH|EAST);
|
||||
if(f == a->sel)
|
||||
match_sizehints(f->client, &f->rect, f->area->floating, NORTH|EAST);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
6
frame.c
6
frame.c
@ -162,7 +162,8 @@ focus_frame(Frame *f, Bool restack) {
|
||||
old_in_a = a->sel;
|
||||
|
||||
a->sel = f;
|
||||
if(!a->floating && (a->mode == Colstack))
|
||||
if(!a->floating && ((a->mode == Colstack)
|
||||
|| (a->mode == Colmax)))
|
||||
arrange_column(a, False);
|
||||
|
||||
if(a != old_a)
|
||||
@ -216,7 +217,6 @@ draw_frame(Frame *f) {
|
||||
f->tile.border = def.border;
|
||||
f->tile.rect = f->rect;
|
||||
f->tile.rect.x = f->tile.rect.y = 0;
|
||||
draw_border(&f->tile);
|
||||
}
|
||||
f->grabbox.rect = f->tile.rect;
|
||||
f->grabbox.rect.height = labelh(&def.font);
|
||||
@ -226,9 +226,9 @@ draw_frame(Frame *f) {
|
||||
f->titlebar.rect.width = f->rect.width - f->titlebar.rect.x;
|
||||
f->titlebar.border = 0;
|
||||
draw_tile(&f->tile);
|
||||
draw_label(&f->titlebar, f->client->name);
|
||||
f->grabbox.border = 3;
|
||||
draw_tile(&f->grabbox);
|
||||
draw_label(&f->titlebar, f->client->name);
|
||||
/* XXX: Hack */
|
||||
f->titlebar.rect.x = 0;
|
||||
f->titlebar.rect.width += f->grabbox.rect.width;
|
||||
|
Loading…
Reference in New Issue
Block a user