[hackers] [wmii] Fixed flickering when switching in max mode

From: Kris Maglione <jg_AT_suckless.org>
Date: Sun Feb 11 08:40:49 2007

changeset: 1842:c03bc4c31a09
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sun Feb 11 02:36:05 2007 -0500
summary: Fixed flickering when switching in max mode

diff -r 0ba78a35a7ec -r c03bc4c31a09 area.c
--- a/area.c Sun Feb 11 01:09:00 2007 -0500
+++ b/area.c Sun Feb 11 02:36:05 2007 -0500
@@ -407,8 +407,6 @@ focus_frame:
 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);
diff -r 0ba78a35a7ec -r c03bc4c31a09 client.c
--- a/client.c Sun Feb 11 01:09:00 2007 -0500
+++ b/client.c Sun Feb 11 02:36:05 2007 -0500
@@ -45,6 +45,7 @@ create_client(Window w, XWindowAttribute
         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);
diff -r 0ba78a35a7ec -r c03bc4c31a09 column.c
--- a/column.c Sun Feb 11 01:09:00 2007 -0500
+++ b/column.c Sun Feb 11 02:36:05 2007 -0500
@@ -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:
diff -r 0ba78a35a7ec -r c03bc4c31a09 frame.c
--- a/frame.c Sun Feb 11 01:09:00 2007 -0500
+++ b/frame.c Sun Feb 11 02:36:05 2007 -0500
@@ -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;
Received on Sun Feb 11 2007 - 08:40:49 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:10 UTC