Use a backing store, and more/resize uncollapsed clients first for flicker prevention.

This commit is contained in:
Kris Maglione 2007-03-03 02:23:22 -05:00
parent 162d53212e
commit d1428fafd0
2 changed files with 10 additions and 4 deletions

View File

@ -47,6 +47,7 @@ create_client(Window w, XWindowAttributes *wa) {
fwa.override_redirect = 1; fwa.override_redirect = 1;
fwa.background_pixmap = ParentRelative; fwa.background_pixmap = ParentRelative;
fwa.backing_store = Always;
fwa.event_mask = fwa.event_mask =
SubstructureRedirectMask SubstructureRedirectMask
| SubstructureNotifyMask | SubstructureNotifyMask
@ -67,7 +68,7 @@ create_client(Window w, XWindowAttributes *wa) {
/* depth */ DefaultDepth(blz.dpy, blz.screen), /* depth */ DefaultDepth(blz.dpy, blz.screen),
/* class */ CopyFromParent, /* class */ CopyFromParent,
/* visual */ DefaultVisual(blz.dpy, blz.screen), /* visual */ DefaultVisual(blz.dpy, blz.screen),
/* valuemask */ CWOverrideRedirect | CWEventMask | CWBackPixmap, /* valuemask */ CWOverrideRedirect | CWEventMask | CWBackPixmap | CWBackingStore,
/* attributes */&fwa /* attributes */&fwa
); );
@ -622,7 +623,7 @@ resize_client(Client *c, XRectangle *r) {
f = c->sel; f = c->sel;
resize_frame(f, r); resize_frame(f, r);
if(f->area->view == screen->sel) if(f->area->view == screen->sel)
XMoveResizeWindow(blz.dpy, c->framewin, XMoveResizeWindow(blz.dpy, c->framewin,
f->rect.x, f->rect.y, f->rect.x, f->rect.y,
f->rect.width, f->rect.height); f->rect.width, f->rect.height);

View File

@ -179,9 +179,14 @@ arrange_column(Area *a, Bool dirty) {
} }
scale_column(a); scale_column(a);
resize: resize:
if(a->view == screen->sel) if(a->view == screen->sel) {
for(f=a->frame; f; f=f->anext) for(f=a->frame; f; f=f->anext)
resize_client(f->client, &f->rect); if(!f->collapsed)
resize_client(f->client, &f->rect);
for(f=a->frame; f; f=f->anext)
if(f->collapsed)
resize_client(f->client, &f->rect);
}
flush_masked_events(EnterWindowMask); flush_masked_events(EnterWindowMask);
} }