--- Begin Message ---
Package: release.debian.org
Severity: normal
User: [email protected]
Usertags: unblock
Please unblock package wmii
unblock wmii/3.9.2+debian-4
Begin forwarded message:
Date: Mon, 16 Jul 2012 21:45:33 +0200
From: Andrew Shadura <[email protected]>
To: [email protected]
Subject: wmii freeze exception
Hello,
There's a nasty bug in wmii, #628575. It's already fixed upstream, and
it's already packaged by me, but that version is certainly unsuitable
for current release so given short enough timeframe I didn't bother
trying to upload it to unstable via my sponsor. However, I've
backported the patch for this particular bug, so users of 3.9.2 can
have it fixed.
Basically, the fix is to add some NULL pointer checks, plus some
changes in boundaries calculations. It's been tested quite extensively:
I've been using patched wmii every day for a whole year without any
troubles. A debdiff is attached, a .dsc can be found here:
http://mentors.debian.net/debian/pool/main/w/wmii/wmii_3.9.2+debian-4.dsc
Please review it an tell me if it fits to be uploaded to unstable with a
freeze exception for wheezy/testing.
P.S. Please Cc me as I'm not subscribed to this list.
--
WBR, Andrew
--
WBR, Andrew
diff -Nru wmii-3.9.2+debian/debian/changelog wmii-3.9.2+debian/debian/changelog
--- wmii-3.9.2+debian/debian/changelog 2011-07-06 10:05:26.000000000 +0200
+++ wmii-3.9.2+debian/debian/changelog 2012-07-16 13:23:38.000000000 +0200
@@ -1,3 +1,11 @@
+wmii (3.9.2+debian-4) unstable; urgency=low
+
+ * QA upload.
+ * Fix crashes when additional displays are added (backported patch from
+ upstream, closes: #628575).
+
+ -- Andrew O. Shadura <[email protected]> Mon, 16 Jul 2012 13:22:40 +0200
+
wmii (3.9.2+debian-3) unstable; urgency=low
* QA upload.
diff -Nru wmii-3.9.2+debian/debian/patches/05-fix-xrandr-crash.patch wmii-3.9.2+debian/debian/patches/05-fix-xrandr-crash.patch
--- wmii-3.9.2+debian/debian/patches/05-fix-xrandr-crash.patch 1970-01-01 01:00:00.000000000 +0100
+++ wmii-3.9.2+debian/debian/patches/05-fix-xrandr-crash.patch 2012-07-16 13:11:36.000000000 +0200
@@ -0,0 +1,128 @@
+Description: Fix crash when adding a second display
+Author: Kris Maglione <[email protected]>
+Author: Andrew O. Shadoura <[email protected]>
+Bug-Debian: http://bugs.debian.org/628575
+
+--- a/cmd/wmii/fns.h
++++ b/cmd/wmii/fns.h
+@@ -22,21 +22,27 @@
+ /* Grotesque, but worth it. */
+
+ #define foreach_area(v, s, a) \
+- with(int, __alive) \
+- with(Area*, __anext) \
+- for(s=0; _cond(s <= nscreens, 0); _cont(s++)) \
+- for((a)=(s < nscreens ? (v)->areas[s] : v->floating), __anext=(a)->next; _cond(a, 1); _cont(((a)=__anext) && (__anext=(a)->next)))
++ with(int, __alive) \
++ with(Area*, __anext) \
++ for(s=0; _cond(s <= nscreens, 0); _cont(s++)) \
++ for((a)=(s < nscreens ? (v)->areas[s] : v->floating), __anext=((a)?(a)->next:NULL); \
++ _cond(a, 1); \
++ _cont(((a)=__anext) && (__anext=(a)->next)))
+
+ #define foreach_column(v, s, a) \
+- with(int, __alive) \
+- with(Area*, __anext) \
+- for(s=0; _cond(s < nscreens, 0); _cont(s++)) \
+- for((a)=(v)->areas[s], __anext=(a)->next; _cond(a, 1); _cont(((a)=__anext) && (__anext=(a)->next)))
++ with(int, __alive) \
++ with(Area*, __anext) \
++ for(s=0; _cond(s < nscreens, 0); _cont(s++)) \
++ for((a)=(v)->areas[s], __anext=((a)?(a)->next:NULL); \
++ _cond(a, 1); \
++ _cont(((a)=__anext) && (__anext=(a)->next)))
+
+ #define foreach_frame(v, s, a, f) \
+ with(Frame*, __fnext) \
+ foreach_area(v, s, a) \
+- for((void)(((f)=(a)->frame) && (__fnext=(f)->anext)); _cond(f, 2); _cont(((f)=__fnext) && (__fnext=(f)->anext)))
++ for((void)(((f)=(a)->frame) && (__fnext=(f)?((f)->anext):NULL)); \
++ _cond(f, 2); \
++ _cont(((f)=__fnext) && (__fnext=(f)->anext)))
+
+ #define btassert(arg, cond) \
+ (cond ? fprint(1, __FILE__":%d: failed assertion: " #cond "\n", __LINE__), backtrace(arg), true : false)
+--- a/cmd/wmii/message.c
++++ b/cmd/wmii/message.c
+@@ -505,6 +505,12 @@
+ return nil;
+ }
+
++ if(!strcmp(s, "xinerama")) {
++ setenv("XINERAMA_SCREENS", m->pos, 1);
++ init_screens();
++ return nil;
++ }
++
+ switch(getsym(s)) {
+ case LBAR: /* bar on? <"top" | "bottom"> */
+ s = msg_getword(m);
+--- a/cmd/wmii/view.c
++++ b/cmd/wmii/view.c
+@@ -86,7 +86,6 @@
+ for(i=0; i < nscreens; i++)
+ view_init(v, i);
+
+-
+ area_focus(v->firstarea);
+
+ v->next = *vp;
+@@ -108,6 +107,7 @@
+ void
+ view_init(View *v, int iscreen) {
+ v->r[iscreen] = screens[iscreen]->r;
++ v->pad[iscreen] = ZR;
+ v->areas[iscreen] = nil;
+ column_new(v, nil, iscreen, 0);
+ }
+@@ -149,6 +149,7 @@
+ }
+ free(v->areas);
+ free(v->r);
++ free(v->pad);
+ free(v);
+ ewmh_updateviews();
+ }
+@@ -207,26 +208,39 @@
+ WMScreen *scrn;
+ Strut *strut;
+ Frame *f;
++ int left, right, top, bottom;
+ int s, i;
+- /* These short variable names are hell, eh? */
+
+ /* XXX:
+ if(v != selview)
+ return false;
+ */
++
++ top = 0;
++ left = 0;
++ right = 0;
++ bottom = 0;
+ vec.n = 0;
+ for(f=v->floating->frame; f; f=f->anext) {
+ strut = f->client->strut;
+ if(!strut)
+ continue;
++ /* Can do better in the future. */
++ top = max(top, strut->top.max.y);
++ left = max(left, strut->left.max.x);
++ right = min(right, strut->right.min.x);
++ bottom = min(bottom, strut->bottom.min.y);
+ vector_rpush(&vec, strut->top);
+ vector_rpush(&vec, strut->left);
+ vector_rpush(&vec, rectaddpt(strut->right, Pt(scr.rect.max.x, 0)));
+ vector_rpush(&vec, rectaddpt(strut->bottom, Pt(0, scr.rect.max.y)));
+ }
+- /* Find the largest screen space not occupied by struts. */
+ vp = unique_rects(&vec, scr.rect);
+- scrnr = max_rect(vp);
++ scrnr = scr.rect;
++ scrnr.min.y += top;
++ scrnr.min.x += left;
++ scrnr.max.x += right;
++ scrnr.max.y += bottom;
+
+ /* FIXME: Multihead. */
+ v->floating->r = scr.rect;
diff -Nru wmii-3.9.2+debian/debian/patches/series wmii-3.9.2+debian/debian/patches/series
--- wmii-3.9.2+debian/debian/patches/series 2011-07-06 09:59:17.000000000 +0200
+++ wmii-3.9.2+debian/debian/patches/series 2012-07-16 13:22:00.000000000 +0200
@@ -1,5 +1,6 @@
01-x-terminal-emulator.patch
02-cflags.patch
03-font.patch
+05-fix-xrandr-crash.patch
ld-no-add-needed.patch
manpage-actions-location.patch
signature.asc
Description: PGP signature
--- End Message ---