This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.
The branch, next has been updated
via 5d8dfa4764679834aa70df95ef2f90bfeecf99b1 (commit)
via b796928504107228fc8fde81b03eaeafcaf07f3b (commit)
from 9ab2b642a6bf030c375a51ca9b2b27b6d51f1411 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/5d8dfa4764679834aa70df95ef2f90bfeecf99b1
commit 5d8dfa4764679834aa70df95ef2f90bfeecf99b1
Author: Iain Patterson <[email protected]>
Date: Sat Aug 25 10:28:04 2012 +0100
Fixed invalid argument to popen in readMenuPipe().
We were passing "rb" to popen(), which was failing with EINVAL with the
result that generated menus were not displayed.
diff --git a/src/rootmenu.c b/src/rootmenu.c
index addb23e..2fcd0ae 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -998,7 +998,7 @@ static WMenu *readMenuPipe(WScreen * scr, char **file_name)
}
filename = flat_file + (flat_file[1] == '|' ? 2 : 1);
- file = popen(filename, "rb");
+ file = popen(filename, "r");
if (!file) {
werror(_("%s:could not open menu file"), filename);
return NULL;
http://repo.or.cz/w/wmaker-crm.git/commit/b796928504107228fc8fde81b03eaeafcaf07f3b
commit b796928504107228fc8fde81b03eaeafcaf07f3b
Author: Iain Patterson <[email protected]>
Date: Sat Aug 25 09:59:03 2012 +0100
Draw window borders with correct colormap.
Using window-supplied depth, visual and colormap information has the
side effect of causing window borders to be draw using inconsistent
colormap entries. Allocate entries from each window's colormap when
drawing its border.
Force setting the border when the window is first created so it's
guaranteed to be drawn in a consistent state.
diff --git a/src/actions.c b/src/actions.c
index 988e90a..0d4cff1 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1863,7 +1863,10 @@ void wSelectWindow(WWindow *wwin, Bool flag)
if (flag) {
wwin->flags.selected = 1;
- XSetWindowBorder(dpy, wwin->frame->core->window,
scr->white_pixel);
+ if (wwin->frame->selected_border_pixel)
+ XSetWindowBorder(dpy, wwin->frame->core->window,
*wwin->frame->selected_border_pixel);
+ else
+ XSetWindowBorder(dpy, wwin->frame->core->window,
scr->white_pixel);
if (!HAS_BORDER(wwin)) {
XSetWindowBorderWidth(dpy, wwin->frame->core->window,
FRAME_BORDER_WIDTH);
@@ -1874,7 +1877,10 @@ void wSelectWindow(WWindow *wwin, Bool flag)
WMAddToArray(scr->selected_windows, wwin);
} else {
wwin->flags.selected = 0;
- XSetWindowBorder(dpy, wwin->frame->core->window,
scr->frame_border_pixel);
+ if (wwin->frame->border_pixel)
+ XSetWindowBorder(dpy, wwin->frame->core->window,
*wwin->frame->border_pixel);
+ else
+ XSetWindowBorder(dpy, wwin->frame->core->window,
scr->frame_border_pixel);
if (!HAS_BORDER(wwin)) {
XSetWindowBorderWidth(dpy, wwin->frame->core->window,
0);
diff --git a/src/framewin.c b/src/framewin.c
index 448d204..2a26952 100644
--- a/src/framewin.c
+++ b/src/framewin.c
@@ -58,6 +58,27 @@ static void paintButton(WCoreWindow * button, WTexture *
texture,
static void updateTitlebar(WFrameWindow * fwin);
+static void allocFrameBorderPixel(Colormap colormap, char *color_name,
unsigned long **pixel);
+
+static void allocFrameBorderPixel(Colormap colormap, char *color_name,
unsigned long **pixel) {
+ XColor xcol;
+
+ *pixel = NULL;
+
+ if (!XParseColor(dpy, colormap, color_name, &xcol)) {
+ wwarning(_("could not parse color "%s""), color_name);
+ return;
+ }
+ if (!XAllocColor(dpy, colormap, &xcol)) {
+ wwarning(_("could not allocate color "%s""), color_name);
+ return;
+ }
+
+ *pixel = wmalloc(sizeof(unsigned long));
+ if (*pixel)
+ **pixel = xcol.pixel;
+}
+
WFrameWindow *wFrameWindowCreate(WScreen * scr, int wlevel, int x, int y,
int width, int height, int *clearance,
int *title_min, int *title_max, int flags,
@@ -88,6 +109,8 @@ WFrameWindow *wFrameWindowCreate(WScreen * scr, int wlevel,
int x, int y,
fwin->depth = depth;
fwin->visual = visual;
fwin->colormap = colormap;
+ allocFrameBorderPixel(fwin->colormap, FRAME_BORDER_COLOR,
&fwin->border_pixel);
+ allocFrameBorderPixel(fwin->colormap, FRAME_SELECTED_BORDER_COLOR,
&fwin->selected_border_pixel);
fwin->core = wCoreCreateTopLevel(scr, x, y, width, height, (flags &
WFF_BORDER)
? FRAME_BORDER_WIDTH : 0, fwin->depth,
fwin->visual, fwin->colormap);
@@ -413,6 +436,9 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int
flags)
}
checkTitleSize(fwin);
+
+ if (fwin->border_pixel)
+ XSetWindowBorder(dpy, fwin->core->window, *fwin->border_pixel);
}
void wFrameWindowDestroy(WFrameWindow * fwin)
diff --git a/src/framewin.h b/src/framewin.h
index 27e6518..d893cd1 100644
--- a/src/framewin.h
+++ b/src/framewin.h
@@ -150,6 +150,8 @@ typedef struct WFrameWindow {
int depth;
Visual *visual;
Colormap colormap;
+ unsigned long *border_pixel;
+ unsigned long *selected_border_pixel;
} WFrameWindow;
diff --git a/src/wconfig.h.in b/src/wconfig.h.in
index 0046863..baef446 100644
--- a/src/wconfig.h.in
+++ b/src/wconfig.h.in
@@ -344,6 +344,7 @@
#undef NO_MINIWINDOW_TITLES
#define FRAME_BORDER_COLOR "black"
+#define FRAME_SELECTED_BORDER_COLOR "white"
/* for boxes with high mouse sampling rates (SGI) */
#define DELAY_BETWEEN_MOUSE_SAMPLING 10
-----------------------------------------------------------------------
Summary of changes:
src/actions.c | 10 ++++++++--
src/framewin.c | 26 ++++++++++++++++++++++++++
src/framewin.h | 2 ++
src/rootmenu.c | 2 +-
src/wconfig.h.in | 1 +
5 files changed, 38 insertions(+), 3 deletions(-)
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].