Bug#862499: unblock: 9wm/1.4.0-1
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package 9wm
The changes between 1.3.9 and 1.4.0 are very minimal and they prevent an
annoying bug that causes 9wm's color customization to fail silently.
A debdiff is attached, along with a diff of the code between 1.3.9 and 1.4.0.
unblock 9wm/1.4.0-1
-- System Information:
Debian Release: 9.0
APT prefers testing
APT policy: (500, 'testing'), (50, 'unstable')
Architecture: amd64
(x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff --git a/9wm.c b/9wm.c
index 9ea769e..cabc53c 100644
--- a/9wm.c
+++ b/9wm.c
@@ -16,7 +16,7 @@
#include "fns.h"
char *version[] = {
- "9wm version 1.3.9, Copyright (c) 2016 multiple authors", 0,
+ "9wm version 1.4.0, Copyright (c) 2017 multiple authors", 0,
};
Display *dpy;
@@ -36,6 +36,11 @@ int debug;
int signalled;
int num_screens;
+#ifdef COLOR
+char *activestr;
+char *inactivestr;
+#endif
+
Atom exit_9wm;
Atom restart_9wm;
Atom wm_state;
@@ -78,11 +83,8 @@ usage(void)
}
#ifdef COLOR
-char *activestr = NULL;
-char *inactivestr = NULL;
-
-unsigned long
-getcolor(Colormap cmap, char *str)
+Status
+getcolor(Colormap cmap, unsigned long *pixel, char *str)
{
if (str != NULL) {
XColor color;
@@ -93,7 +95,8 @@ getcolor(Colormap cmap, char *str)
if (stpc != 0)
stac = XAllocColor(dpy, cmap, &color);
if (stac != 0) {
- return color.pixel;
+ *pixel = color.pixel;
+ return 1;
}
}
return 0;
@@ -288,11 +291,13 @@ initscreen(ScreenInfo * s, int i)
if (activestr != NULL || inactivestr != NULL) {
Colormap cmap = DefaultColormap(dpy,s->num);
if (cmap != 0) {
- unsigned long active = getcolor(cmap,activestr);
- if (active != 0)
+ unsigned long active;
+ Status sa = getcolor(cmap, &active, activestr);
+ if (sa != 0)
s->active = active;
- unsigned long inactive = getcolor(cmap,inactivestr);
- if (inactive != 0)
+ unsigned long inactive;
+ Status si = getcolor(cmap, &inactive, inactivestr);
+ if (si != 0)
s->inactive = inactive;
}
}
diff --git a/README.md b/README.md
index afc74dd..8033b03 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
9wm
====
-9wm is an X11 window manager inspired by the Plan 9 window manager 8½.
+9wm is an X11 window manager inspired by the Plan 9 window manager 8½, also known as rio.
It provides a very simple and clean user interface.
It is click-to-type.
It uses the X11 font system (which, unfortunately, means no Unicode support).
9wm does not provide virtual desktops, customization, key bindings,
EWMH support, or compositing.
-It does not allocate any colors,
+It does not allocate any colors (if you disable COLOR),
which will be great news if you are stuck in 1993.
It is a great place to start if you are interested in writing a window manager from scratch:
File lists identical (after any substitutions)
Control files: lines which differ (wdiff format)
------------------------------------------------
Installed-Size: [-66-] {+67+}
Version: [-1.3.9-1-] {+1.4.0-1+}
Reply to: