[hackers] [wmii] Fix synthetic configure notify bug. Closes issue #193. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Sun, 6 Jun 2010 22:07:00 +0000 (UTC)

changeset: 2711:d31bd61a1aa2
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Sun Jun 06 18:06:44 2010 -0400
files: cmd/wmii/client.c cmd/wmii/dat.h cmd/wmii/ewmh.c cmd/wmii/message.c
description:
Fix synthetic configure notify bug. Closes issue #193.

diff -r 41325c2ff8ec -r d31bd61a1aa2 cmd/wmii/client.c
--- a/cmd/wmii/client.c Sun Jun 06 06:06:14 2010 -0400
+++ b/cmd/wmii/client.c Sun Jun 06 18:06:44 2010 -0400
@@ -518,6 +518,7 @@
         if(v != selview)
                 view_focus(screen, v);
         frame_focus(c->sel);
+ view_restack(c->sel->view);
 }
 
 void
@@ -552,7 +553,6 @@
 
 void
 client_resize(Client *c, Rectangle r) {
- bool client_resized, frame_resized;
         Frame *f;
 
         f = c->sel;
@@ -577,12 +577,10 @@
                 client_unmap(c, IconicState);
         }else {
                 client_map(c);
- if((frame_resized = !eqrect(c->framewin->r, f->r)))
- reshapewin(c->framewin, f->r);
- if((client_resized = !eqrect(c->w.r, f->crect)))
- reshapewin(&c->w, f->crect);
+ reshapewin(c->framewin, f->r);
+ reshapewin(&c->w, f->crect);
                 map_frame(c);
- if(client_resized || frame_resized)
+ if(!eqrect(c->r, c->configr))
                         client_configure(c);
                 ewmh_framesize(c);
         }
@@ -603,6 +601,7 @@
 client_configure(Client *c) {
         Rectangle r;
 
+ c->configr = c->r;
         r = rectsubpt(c->r, Pt(c->border, c->border));
 
         sendevent(&c->w, false, StructureNotifyMask,
diff -r 41325c2ff8ec -r d31bd61a1aa2 cmd/wmii/dat.h
--- a/cmd/wmii/dat.h Sun Jun 06 06:06:14 2010 -0400
+++ b/cmd/wmii/dat.h Sun Jun 06 18:06:44 2010 -0400
@@ -25,8 +25,8 @@
 
 enum {
         PingTime = 10000,
- PingPeriod = 2000,
- PingPartition = 20,
+ PingPeriod = 4000,
+ PingPartition = 10,
 };
 
 enum IncMode {
@@ -162,6 +162,7 @@
         Strut* strut;
         Cursor cursor;
         Rectangle r;
+ Rectangle configr;
         char** retags;
         char name[256];
         char tags[256];
diff -r 41325c2ff8ec -r d31bd61a1aa2 cmd/wmii/ewmh.c
--- a/cmd/wmii/ewmh.c Sun Jun 06 06:06:14 2010 -0400
+++ b/cmd/wmii/ewmh.c Sun Jun 06 18:06:44 2010 -0400
@@ -217,7 +217,7 @@
                         return false;
 
                 Dprint(DEwmh, "\tsource: %ld\n", l[0]);
- Dprint(DEwmh, "\twindow: 0x%lx\n", e->window);
+ Dprint(DEwmh, "\twindow: %#ulx\n", e->window);
                 Dprint(DEwmh, "\tclient: %C\n", c);
                 if(l[0] == SourceClient && abs(event_xtime - l[1]) > 5000)
                         return false;
@@ -229,7 +229,7 @@
                 if(e->format != 32)
                         return false;
                 Dprint(DEwmh, "\tsource: %ld\n", l[0]);
- Dprint(DEwmh, "\twindow: 0x%lx\n", e->window);
+ Dprint(DEwmh, "\twindow: %#ulx\n", e->window);
                 client_kill(c, true);
                 return false;
         }
diff -r 41325c2ff8ec -r d31bd61a1aa2 cmd/wmii/message.c
--- a/cmd/wmii/message.c Sun Jun 06 06:06:14 2010 -0400
+++ b/cmd/wmii/message.c Sun Jun 06 18:06:44 2010 -0400
@@ -389,7 +389,7 @@
                 bufprint("fullscreen %d\n", c->fullscreen);
         else
                 bufprint("fullscreen off\n");
- bufprint("group 0x%ulx\n", c->group ? c->group->leader : 0);
+ bufprint("group %#ulx\n", c->group ? c->group->leader : 0);
         bufprint("tags %s\n", c->tags);
         bufprint("urgent %s\n", TOGGLE(c->urgent));
         return buffer;
Received on Sun Jun 06 2010 - 22:07:00 UTC

This archive was generated by hypermail 2.2.0 : Sun Jun 06 2010 - 22:12:04 UTC