diff options
author | Andrew Shadura <andrew@shadura.me> | 2014-08-03 00:33:34 +0200 |
---|---|---|
committer | Andrew Shadura <andrew@shadura.me> | 2014-08-03 00:33:34 +0200 |
commit | 98c1ff0a265d47fcd5fde800d029b23156847db2 (patch) | |
tree | 7845874be32096edd1873dd0c85d6c101a93a268 | |
parent | 772c238c513f8ec2f962ca90ec687b188b3dd8d7 (diff) | |
parent | 00e39cbd9adbbc6c582a3647b5296b9f013e57f4 (diff) |
Merge.
-rw-r--r-- | debian/changelog | 14 | ||||
-rw-r--r-- | debian/patches/16-fix-notice-command.patch (renamed from debian/patches/16-rc-fixes.patch) | 0 | ||||
-rw-r--r-- | debian/patches/17-fix-multimonitor-witray.patch (renamed from debian/patches/17-witray-fix.patch) | 0 | ||||
-rw-r--r-- | debian/patches/23-buildsys-tweaks.patch | 65 | ||||
-rw-r--r-- | debian/patches/24-fix-focus.patch | 113 | ||||
-rw-r--r-- | debian/patches/25-add-wipescreens.patch | 242 | ||||
-rw-r--r-- | debian/patches/26-run-wipescreens.patch | 25 | ||||
-rw-r--r-- | debian/patches/27-fix-screens.patch | 43 | ||||
-rw-r--r-- | debian/patches/28-fix-regexp-clients.patch | 24 | ||||
-rw-r--r-- | debian/patches/series | 10 |
10 files changed, 534 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 4e898a2..62eb369 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +wmii (3.10~20120413+hg2813-7) UNRELEASED; urgency=medium + + * Fix witray placement on multi-monitor setups. + * Update Notice command. + * Tweaks to the build system. + * Changes from the upstream: + - Work around focus drawing issue in newer Xorg versions. + - Add command to cleanup old screens after monitor disconnect. + - Run wipescreens on Screenchange event in python/wmiirc. + - Treat cloned/subsumed screens as one. + - Keep regexp clients on the same screen when attaching to new view. + + -- Andrew Shadura <andrewsh@debian.org> Sun, 03 Aug 2014 00:15:36 +0200 + wmii (3.10~20120413+hg2813-6) unstable; urgency=low * Set WMII_TERM to x-terminal-emulator, not xterm. diff --git a/debian/patches/16-rc-fixes.patch b/debian/patches/16-fix-notice-command.patch index 81ab733..81ab733 100644 --- a/debian/patches/16-rc-fixes.patch +++ b/debian/patches/16-fix-notice-command.patch diff --git a/debian/patches/17-witray-fix.patch b/debian/patches/17-fix-multimonitor-witray.patch index 11a6952..11a6952 100644 --- a/debian/patches/17-witray-fix.patch +++ b/debian/patches/17-fix-multimonitor-witray.patch diff --git a/debian/patches/23-buildsys-tweaks.patch b/debian/patches/23-buildsys-tweaks.patch new file mode 100644 index 0000000..66cf57a --- /dev/null +++ b/debian/patches/23-buildsys-tweaks.patch @@ -0,0 +1,65 @@ +From: Andrew Shadura <andrew@shadura.me> +Subject: Fix the build system. + +--- a/cmd/x11/Makefile ++++ b/cmd/x11/Makefile +@@ -9,7 +9,6 @@ + + LIB = $(LIBS9) $(LIBIXP) + LIBS += $(LIB) +-CFLAGS += $(INCX11) + + wiclick.out: wiclick.o + $(LINK) $@ $< -lXtst +--- a/config.mk ++++ b/config.mk +@@ -29,7 +29,6 @@ + PYTHON = python + + X11PACKAGES = x11 xinerama xrender xrandr +-INCX11 = $$(pkg-config --cflags $(X11PACKAGES)) + LIBIXP = -lixp + + # Enable RTLD. Only necessary for Xft support. +--- a/lib/libwmii_hack/Makefile ++++ b/lib/libwmii_hack/Makefile +@@ -3,9 +3,6 @@ + + hack.o hack.o_pic: util.c hack.h x11.h + +-CFLAGS += $(INCX11) +-SOLDFLAGS += $(LIBX11) +- + TARG = libwmii_hack + # Can't just link libstuff here. We need PIC objects. + OBJ = hack \ +--- a/test/Makefile ++++ b/test/Makefile +@@ -7,8 +7,7 @@ + ../cmd/wmii/map.o \ + ../cmd/wmii/x11.o + +-LDFLAGS += $(OFILES) -lfmt -lutf -lbio $(LIBX11) -lXext +-CFLAGS += $(INCX11) ++LIBS += $(OFILES) -lfmt -lutf -lbio -lXext + + include $(ROOT)/mk/many.mk + +--- a/mk/hdr.mk ++++ b/mk/hdr.mk +@@ -48,13 +48,14 @@ + SHELL := $(BINSH) + .SHELL: name=sh path=$(SHELL) + ++all: ++ + include $(ROOT)/config.mk + sinclude $(ROOT)/config.local.mk + sinclude $(shell echo .)depend + + #.SILENT: + .SUFFIXES: .$(SOEXT) .1 .3 .awk .build .c .clean .depend .install .man1 .man3 .o .o_pic .out .pdf .py .rc .sh .uninstall +-all: + + .c.depend: + echo MKDEP $< diff --git a/debian/patches/24-fix-focus.patch b/debian/patches/24-fix-focus.patch new file mode 100644 index 0000000..ae93c21 --- /dev/null +++ b/debian/patches/24-fix-focus.patch @@ -0,0 +1,113 @@ +From: Kris Maglione <kris@suckless.org> +Subject: Work around focus drawing issue in newer Xorg versions. + +diff --git a/cmd/wmii/client.c b/cmd/wmii/client.c +--- a/cmd/wmii/client.c ++++ b/cmd/wmii/client.c +@@ -1,5 +1,5 @@ + /* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com> +- * Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail> ++ * Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail> + * See LICENSE file for license details. + */ + #include "dat.h" +diff --git a/cmd/wmii/frame.c b/cmd/wmii/frame.c +--- a/cmd/wmii/frame.c ++++ b/cmd/wmii/frame.c +@@ -559,7 +559,7 @@ move_focus(Frame *old_f, Frame *f) { + noinput = (old_f && old_f->client->noinput) || + (f && f->client->noinput) || + disp.hasgrab != &c_root; +- if(noinput) { ++ if(noinput || true) { + if(old_f) + frame_draw(old_f); + if(f) +diff --git a/cmd/wmii/message.c b/cmd/wmii/message.c +--- a/cmd/wmii/message.c ++++ b/cmd/wmii/message.c +@@ -1,4 +1,4 @@ +-/* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail> ++/* Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail> + * See LICENSE file for license details. + */ + #include "dat.h" +@@ -609,26 +609,33 @@ message_root(void *p, IxpMsg *m) { + setdef(&screen->barpos, s, barpostab, nelem(barpostab)); + view_update(selview); + break; ++ + case LBORDER: + def.border = msg_getulong(msg_getword(m, 0));; + view_update(selview); + break; ++ + case LCOLMODE: + setdef(&def.colmode, msg_getword(m, 0), modes, Collast); + break; ++ + case LDEBUG: + msg_debug(msg_getword(m, 0)); + break; ++ + case LEXEC: + execstr = strdup(m->pos); + srv.running = 0; + break; ++ + case LSPAWN: + spawn_command(m->pos); + break; ++ + case LFOCUSCOLORS: + msg_parsecolors(m, &def.focuscolor); + goto updatecolors; ++ + case LFONT: + fn = loadfont(m->pos); + if(fn) { +@@ -640,6 +647,7 @@ message_root(void *p, IxpMsg *m) { + ret = "can't load font"; + view_update(selview); + break; ++ + case LFONTPAD: + if(!getint(msg_getword(m, 0), &def.font->pad.min.x) || + !getint(msg_getword(m, 0), &def.font->pad.max.x) || +@@ -652,6 +660,7 @@ message_root(void *p, IxpMsg *m) { + view_update(selview); + } + break; ++ + case LGRABMOD: + s = msg_getword(m, Ebadvalue); + if(!parsekey(s, &i, nil) || i == 0) +@@ -659,10 +668,12 @@ message_root(void *p, IxpMsg *m) { + + def.mod = i; + break; ++ + case LINCMODE: + setdef(&def.incmode, msg_getword(m, 0), incmodetab, nelem(incmodetab)); + view_update(selview); + break; ++ + case LNORMCOLORS: + msg_parsecolors(m, &def.normcolor); + updatecolors: +@@ -670,12 +681,15 @@ message_root(void *p, IxpMsg *m) { + client_reparent(c); + view_update(selview); + break; ++ + case LSELCOLORS: + warning("selcolors have been removed"); + return Ebadcmd; ++ + case LVIEW: + view_select(m->pos); + break; ++ + case LQUIT: + srv.running = 0; + break; diff --git a/debian/patches/25-add-wipescreens.patch b/debian/patches/25-add-wipescreens.patch new file mode 100644 index 0000000..40ad25a --- /dev/null +++ b/debian/patches/25-add-wipescreens.patch @@ -0,0 +1,242 @@ +From: Kris Maglione <maglione.k@gmail.com> +Subject: Add command to cleanup old screens after monitor disconnect. + +--- a/cmd/wmii/column.c ++++ b/cmd/wmii/column.c +@@ -1,5 +1,5 @@ + /* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com> +- * Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail> ++ * Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail> + * See LICENSE file for license details. + */ + #include "dat.h" +@@ -156,7 +156,7 @@ + if(first) + stack_scale(first, dy); + column_arrange(a, false); +- }else if(a->view->areas[a->screen]->next) ++ }else if(a->view->areas[a->screen]->next && !a->permanent) + column_destroy(a); + } + +--- a/cmd/wmii/dat.h ++++ b/cmd/wmii/dat.h +@@ -1,4 +1,4 @@ +-/* Copyright ©2007-2010 Kris Maglione <jg@suckless.org> ++/* Copyright ©2007-2014 Kris Maglione <jg@suckless.org> + * See LICENSE file for license details. + */ + +@@ -153,6 +153,7 @@ + int mode; + int screen; + bool max; ++ bool permanent; + Rectangle r; + Rectangle r_old; + }; +@@ -375,6 +376,7 @@ + EXTERN bool resizing; + EXTERN int starting; + EXTERN char* user; ++EXTERN long nscreens_new; + + EXTERN Client* kludge; + +--- a/cmd/wmii/fns.h ++++ b/cmd/wmii/fns.h +@@ -1,4 +1,4 @@ +-/* Copyright ©2007-2010 Kris Maglione <jg@suckless.org> ++/* Copyright ©2007-2014 Kris Maglione <jg@suckless.org> + * See LICENSE file for license details. + */ + +@@ -207,6 +207,7 @@ + /* main.c */ + void init_screens(void); + void spawn_command(const char*); ++void wipe_screens(void); + + /* message.c */ + char* mask(char**, int*, int*); +@@ -280,6 +281,7 @@ + void view_update(View*); + void view_update_all(void); + void view_update_rect(View*); ++void view_update_screens(View*); + void view_update_urgency(View*, char*); + Rectangle* view_rects(View*, uint *num, Frame *ignore); + +--- a/cmd/wmii/frame.c ++++ b/cmd/wmii/frame.c +@@ -1,4 +1,4 @@ +-/* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail> ++/* Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail> + * See LICENSE file for license details. + */ + #include "dat.h" +@@ -559,6 +559,7 @@ + noinput = (old_f && old_f->client->noinput) || + (f && f->client->noinput) || + disp.hasgrab != &c_root; ++ + if(noinput || true) { + if(old_f) + frame_draw(old_f); +--- a/cmd/wmii/main.c ++++ b/cmd/wmii/main.c +@@ -1,5 +1,5 @@ + /* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com> +- * Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail> ++ * Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail> + * See LICENSE file for license details. + */ + #define EXTERN +@@ -158,6 +158,8 @@ + fprint(2, "%s: %s\n", argv0, err); + } + ++static bool keep_screens = true; ++ + void + init_screens(void) { + static int old_n, old_nscreens; +@@ -177,14 +179,14 @@ + /* Reallocate screens, zero any new ones. */ + rects = xinerama_screens(&n); + m = nscreens; +- nscreens = max(n, nscreens); ++ nscreens_new = keep_screens ? max(n, nscreens) : n; ++ ++ for(v=view; v; v=v->next) ++ view_update_screens(v); ++ ++ nscreens = nscreens_new; + screens = erealloc(screens, (nscreens + 1) * sizeof *screens); + screens[nscreens] = nil; +- for(v=view; v; v=v->next) { +- v->areas = erealloc(v->areas, nscreens * sizeof *v->areas); +- v->r = erealloc(v->r, nscreens * sizeof *v->r); +- v->pad = erealloc(v->pad, nscreens * sizeof *v->pad); +- } + + /* Reallocate buffers. */ + freeimage(disp.ibuf); +@@ -207,9 +209,11 @@ + screen->r = rects[i]; + else + screen->r = rectsetorigin(screen->r, scr.rect.max); ++ + if(i >= m) + for(v=view; v; v=v->next) + view_init(v, i); ++ + def.snap = Dy(screen->r) / 63; + bar_init(screens[i]); + } +@@ -219,10 +223,18 @@ + + if (old_n != n || old_nscreens != nscreens) + event("ScreenChange %d %d\n", n, nscreens); ++ + old_n = n; + old_nscreens = nscreens; + } + ++void ++wipe_screens(void) { ++ keep_screens = false; ++ init_screens(); ++ keep_screens = true; ++} ++ + static void + cleanup(void) { + starting = -1; +--- a/cmd/wmii/message.c ++++ b/cmd/wmii/message.c +@@ -62,6 +62,7 @@ + LUP, + LURGENT, + LVIEW, ++ LWIPESCREENS, + LTILDE, + }; + char *symtab[] = { +@@ -103,6 +104,7 @@ + "up", + "urgent", + "view", ++ "wipescreens", + "~", + }; + +@@ -690,6 +692,10 @@ + view_select(m->pos); + break; + ++ case LWIPESCREENS: ++ wipe_screens(); ++ break; ++ + case LQUIT: + srv.running = 0; + break; +--- a/cmd/wmii/view.c ++++ b/cmd/wmii/view.c +@@ -1,5 +1,5 @@ + /* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com> +- * Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail> ++ * Copyright ©2006-2014 Kris Maglione <maglione.k at Gmail> + * See LICENSE file for license details. + */ + #include "dat.h" +@@ -113,6 +113,38 @@ + } + + void ++view_update_screens(View *v) { ++ Area *a; ++ Frame *f; ++ int s; ++ ++ if (v->sel->screen > (long)nscreens) ++ v->sel = v->floating->next; ++ ++ v->selscreen = min(v->selscreen, nscreens); ++ ++ if (nscreens_new < nscreens) { ++ foreach_frame(v, s, a, f) { ++ f->oldscreen = min(f->oldscreen, nscreens_new); ++ if (a->screen >= nscreens_new) { ++ a->permanent = true; ++ area_detach(f); ++ view_attach(v, f); ++ } ++ } ++ ++ foreach_area(v, s, a) { ++ if (a->screen >= nscreens_new) ++ area_destroy(a); ++ } ++ } ++ ++ v->areas = erealloc(v->areas, nscreens_new * sizeof *v->areas); ++ v->r = erealloc(v->r, nscreens_new * sizeof *v->r); ++ v->pad = erealloc(v->pad, nscreens_new * sizeof *v->pad); ++} ++ ++void + view_destroy(View *v) { + View **vp; + Frame *f; +@@ -393,7 +425,8 @@ + a = v->floating; + } + else if((ff = client_groupframe(c, v))) { +- a = ff->area; ++ if (ff->client != c && ff->area->screen < nscreens_new) ++ a = ff->area; + if(v->oldsel && ff->client == view_selclient(v)) + a = v->oldsel; + } diff --git a/debian/patches/26-run-wipescreens.patch b/debian/patches/26-run-wipescreens.patch new file mode 100644 index 0000000..f728aa3 --- /dev/null +++ b/debian/patches/26-run-wipescreens.patch @@ -0,0 +1,25 @@ +From: Kris Maglione <maglione.k@gmail.com> +Subject: Run wipescreens on Screenchange event in python/wmiirc. + +--- a/alternative_wmiircs/python/wmiirc.py ++++ b/alternative_wmiircs/python/wmiirc.py +@@ -103,6 +103,8 @@ + + 'Notice': lambda args: notice.show(args), + ++ 'ScreenChange': lambda args: wmii.ctl('wipescreens'), ++ + Match(('LeftBarClick', 'LeftBarDND'), 1): lambda e, b, tag: tags.select(tag), + Match('LeftBarClick', 4): lambda *a: tags.select(tags.next(True)), + Match('LeftBarClick', 5): lambda *a: tags.select(tags.next()), +--- a/rc/wmiirc.sh ++++ b/rc/wmiirc.sh +@@ -107,6 +107,8 @@ + wmiir xwrite /client/$client/ctl slay & + fi + }& ++Event ScreenChange ++ wmiir xwrite /ctl wipescreens + Event Notice + wmiir xwrite $noticebar "label $wi_arg" + diff --git a/debian/patches/27-fix-screens.patch b/debian/patches/27-fix-screens.patch new file mode 100644 index 0000000..2f18abb --- /dev/null +++ b/debian/patches/27-fix-screens.patch @@ -0,0 +1,43 @@ +From: Kris Maglione <maglione.k@gmail.com> +Subject: Treat cloned/subsumed screens as one. + +diff --git a/cmd/wmii/main.c b/cmd/wmii/main.c +--- a/cmd/wmii/main.c ++++ b/cmd/wmii/main.c +@@ -163,9 +163,9 @@ static bool keep_screens = true; + void + init_screens(void) { + static int old_n, old_nscreens; +- Rectangle *rects; ++ Rectangle *rects, *r; + View *v; +- int i, n, m; ++ int i, j, n, m; + + #ifdef notdef + d.x = Dx(scr.rect) - Dx(screen->r); +@@ -178,6 +178,24 @@ init_screens(void) { + + /* Reallocate screens, zero any new ones. */ + rects = xinerama_screens(&n); ++ r = malloc(n * sizeof *r); ++ ++ /* Weed out subsumed/cloned screens */ ++ for(m=-1; m < n; n=m) { ++ for(i=n-1, m=0; i >= 0; i--) { ++ for(j=0; j < n; j++) ++ if (i != j && ++ eqrect(rects[i], ++ rect_intersection(rects[i], rects[j]))) ++ break; ++ if (j == n) ++ r[m++] = rects[i]; ++ } ++ for(i=m-1, j=0; i >= 0; i--) ++ rects[j++] = r[i]; ++ } ++ free(r); ++ + m = nscreens; + nscreens_new = keep_screens ? max(n, nscreens) : n; + diff --git a/debian/patches/28-fix-regexp-clients.patch b/debian/patches/28-fix-regexp-clients.patch new file mode 100644 index 0000000..66d0d5a --- /dev/null +++ b/debian/patches/28-fix-regexp-clients.patch @@ -0,0 +1,24 @@ +From: Kris Maglione <maglione.k@gmail.com> +Subject: Keep regexp clients on the same screen when attaching to new view. + +diff --git a/cmd/wmii/view.c b/cmd/wmii/view.c +--- a/cmd/wmii/view.c ++++ b/cmd/wmii/view.c +@@ -417,6 +417,7 @@ view_attach(View *v, Frame *f) { + + oldsel = v->oldsel; + a = v->sel; ++ + if(c->floating == Never) + a = view_findarea(v, v->selscreen, v->selcol, false); + else if(client_floats_p(c)) { +@@ -424,6 +425,9 @@ view_attach(View *v, Frame *f) { + oldsel = v->sel; + a = v->floating; + } ++ else if(c->sel && c->sel->screen >= 0 && c->sel->screen < nscreens_new && ++ c->sel->screen != v->sel->screen) ++ a = view_findarea(v, c->sel->screen, 0, false); + else if((ff = client_groupframe(c, v))) { + if (ff->client != c && ff->area->screen < nscreens_new) + a = ff->area; diff --git a/debian/patches/series b/debian/patches/series index a94c72c..990062e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,6 +7,12 @@ 10-hostname.patch 13-fix-spelling-manpages.patch 16-fix-confdir.patch -16-rc-fixes.patch -17-witray-fix.patch +16-fix-notice-command.patch +17-fix-multimonitor-witray.patch 20-libixp-link.patch +23-buildsys-tweaks.patch +24-fix-focus.patch +25-add-wipescreens.patch +26-run-wipescreens.patch +27-fix-screens.patch +28-fix-regexp-clients.patch |