[hackers] [wmii] Fix MWM hint regression. Closes issue #167. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Sat, 23 Jan 2010 21:56:59 +0000 (UTC)

changeset: 2595:0ff28da1138c
user: Kris Maglione <kris_AT_suckless.org>
date: Fri Jan 22 19:31:26 2010 -0500
files: cmd/wmii/client.c cmd/wmii/div.c cmd/wmii/frame.c config.mk
description:
Fix MWM hint regression. Closes issue #167.

diff -r 414ad13f662e -r 0ff28da1138c cmd/wmii/client.c
--- a/cmd/wmii/client.c Sat Nov 28 11:58:57 2009 +0000
+++ b/cmd/wmii/client.c Fri Jan 22 19:31:26 2010 -0500
@@ -750,8 +750,8 @@
         }
         free(ret);
 
- if(c->sel) {
- c->sel->floatr = c->r;
+ if(c->sel && false) {
+ c->sel->floatr = client_grav(c, r);
                 if(c->sel->area->floating) {
                         client_resize(c, c->sel->floatr);
                         frame_draw(c->sel);
diff -r 414ad13f662e -r 0ff28da1138c cmd/wmii/div.c
--- a/cmd/wmii/div.c Sat Nov 28 11:58:57 2009 +0000
+++ b/cmd/wmii/div.c Fri Jan 22 19:31:26 2010 -0500
@@ -72,7 +72,7 @@
 
         w = Dx(img->r)/2;
         n = 0;
- pt[n++] = Pt(w , 0);
+ pt[n++] = Pt(w, 0);
         pt[n++] = Pt(0, 0);
         pt[n++] = Pt(w - 1, w - 1);
 
diff -r 414ad13f662e -r 0ff28da1138c cmd/wmii/frame.c
--- a/cmd/wmii/frame.c Sat Nov 28 11:58:57 2009 +0000
+++ b/cmd/wmii/frame.c Fri Jan 22 19:31:26 2010 -0500
@@ -283,10 +283,8 @@
         h.min.x += d.x;
         h.min.y += d.y;
         /* Guard against overflow. */
- if(h.max.x + d.x > h.max.x)
- h.max.x += d.x;
- if(h.max.y + d.y > h.max.y)
- h.max.y += d.y;
+ h.max.x = max(h.max.x + d.x, h.max.x);
+ h.max.y = max(h.max.y + d.y, h.max.y);
 
         h.base.x += d.x;
         h.base.y += d.y;
diff -r 414ad13f662e -r 0ff28da1138c config.mk
--- a/config.mk Sat Nov 28 11:58:57 2009 +0000
+++ b/config.mk Fri Jan 22 19:31:26 2010 -0500
@@ -19,6 +19,7 @@
 include $(ROOT)/mk/gcc.mk
 CFLAGS += $(DEBUGCFLAGS) -O0
 LDFLAGS += -g
+
 SOLDFLAGS += $(LDFLAGS)
 SHARED = -shared -Wl,-soname=$(SONAME)
 STATIC = -static
@@ -29,17 +30,17 @@
 # Archiver
 AR = ar crs
 
+X11PACKAGES = xft
+INCX11 = $$(pkg-config --cflags $(X11PACKAGES))
+LIBICONV = # Leave blank if your libc includes iconv (glibc does)
+LIBIXP = $(LIBDIR)/libixp.a
+
 # Your make shell. By default, the first found of /bin/dash, /bin/ksh,
 # /bin/sh. Except with bsdmake, which assumes /bin/sh is sane. bash and zsh
 # are painfully slow, and should be avoided.
 #BINSH = /bin/ash
 
-X11PACKAGES = xft
-INCX11 = $$(pkg-config --cflags $(X11PACKAGES))
-LIBICONV = # Leave blank if your libc includes iconv (glibc does)
-LIBIXP = $(LIBDIR)/libixp.a
-
-# Operating System Configurations
+## Operating System Configurations
 
 # KenCC
 # Note: wmii *must* always compile under KenCC. It's vital for
Received on Sat Jan 23 2010 - 21:56:59 UTC

This archive was generated by hypermail 2.2.0 : Sat Jan 23 2010 - 22:00:14 UTC