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 9ab2b642a6bf030c375a51ca9b2b27b6d51f1411 (commit)
via 39a5f3da0b0844e5544e2108699b9a5a4057ea83 (commit)
from 5fe41600254cc0cbb19a1edc596bcbfc91d075e9 (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/9ab2b642a6bf030c375a51ca9b2b27b6d51f1411
commit 9ab2b642a6bf030c375a51ca9b2b27b6d51f1411
Author: Iain Patterson <[email protected]>
Date: Fri Aug 24 17:59:30 2012 +0100
_NET_FRAME_EXTENTS fixes.
Recalculate frame extents when the titlebar, resize bar or border are
enabled/disabled.
Account for border when calculating top and bottom frame extents.
Quoth I,
> I've just seen that _NET_FRAME_EXTENTS isn't updated when
> disabling or enabling the titlebar, resizebar and border of a window,
> so that needs to be fixed.
The attached patch fixes _NET_FRAME_EXTENTS not updating when using
the inspector to disable or enable the titlebar, resizebar or border.
It also fixes not taking the border width into account when
calculating the top and bottom extents.
With the patch the window's border is drawn for 32bpp urxvt windows
with compton. The border still isn't black, however. That's because
the border is taken from the screen's colormap rather than the
window's. I'll have a fix for that soon.
diff --git a/src/winspector.c b/src/winspector.c
index 65b21fa..184aec7 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -793,6 +793,8 @@ static void applySettings(WMButton *button, InspectorPanel
*panel)
wAppIconPaint(wapp->app_icon);
}
}
+
+ wNETFrameExtents(wwin);
}
static void revertSettings(WMButton *button, InspectorPanel *panel)
diff --git a/src/wmspec.c b/src/wmspec.c
index b416fdb..56cab82 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -1629,12 +1629,16 @@ void wNETFrameExtents(WWindow *wwin)
* 2 = top
* 3 = bottom
*/
- if (!wwin->client_flags.no_border)
- extents[0] = extents[1] = FRAME_BORDER_WIDTH;
if (wwin->frame->titlebar)
extents[2] = wwin->frame->titlebar->height;
if (wwin->frame->resizebar)
extents[3] = wwin->frame->resizebar->height;
+ if (HAS_BORDER(wwin)) {
+ extents[0] += FRAME_BORDER_WIDTH;
+ extents[1] += FRAME_BORDER_WIDTH;
+ extents[2] += FRAME_BORDER_WIDTH;
+ extents[3] += FRAME_BORDER_WIDTH;
+ }
XChangeProperty(dpy, wwin->client_win, net_frame_extents, XA_CARDINAL,
32, PropModeReplace, (unsigned char *) extents, 4);
}
http://repo.or.cz/w/wmaker-crm.git/commit/39a5f3da0b0844e5544e2108699b9a5a4057ea83
commit 39a5f3da0b0844e5544e2108699b9a5a4057ea83
Author: Iain Patterson <[email protected]>
Date: Mon Aug 20 15:18:21 2012 +0100
Allow windows to specify their own depth.
Accept windows' depth, visual and colormap instead of always using those
of the root window. Internal windows such as menus behave as before.
In conjunction with a compositing manager on a display supporting the
RENDER extension windows can now manage their own opacity.
I wrote the patch after reading the FAQ for urxvt, which says,
regarding transparency support:
"3. Use an ARGB visual:
urxvt -depth 32 -fg grey90 -bg rgba:0000/0000/4444/cccc
This requires XFT support, and the support of your X-server. If that
doesn't work for you, blame Xorg and Keith Packard. ARGB visuals
aren't there yet, no matter what they claim. Rxvt-Unicode contains the
necessary bugfixes and workarounds for Xft and Xlib to make it work,
but that doesn't mean that your WM has the required kludges in place."
In conjunction with a compositing manager (I tested compton) it does
work and urxvt draws a semi-transparent background with fully opaque
foreground text and scrollbars; much prettier than applying a blanket
transparency value over the whole window with the compositing manager.
Other application windows I tested were, as expected, drawn the same
as before.
I verified that urxvt is drawn in the same way when using xfwm4
(with builtin compositing). Since Window Maker doesn't (at time of
writing) have its own compositing manager I should clarify that one is
required to see any benefit from this patch.
Whether or not this feature is useful for any application other than
urxvt I don't know, though I assume that an application which chose an
ARGB visual in the same way would be able to draw itself prettily.
On a display without RENDER things work just as they do without the
patch. I have, however, only been able to test on a fairly standard
TrueColor display supporting multiple colour depths with 24bpp being
the default. Testing with more ... exotic ... display types would
probably be advisable.
diff --git a/src/framewin.c b/src/framewin.c
index 2d3c009..448d204 100644
--- a/src/framewin.c
+++ b/src/framewin.c
@@ -62,7 +62,8 @@ WFrameWindow *wFrameWindowCreate(WScreen * scr, int wlevel,
int x, int y,
int width, int height, int *clearance,
int *title_min, int *title_max, int flags,
WTexture ** title_texture, WTexture **
resize_texture,
- WMColor ** color, WMFont ** font)
+ WMColor ** color, WMFont ** font,
+ int depth, Visual *visual, Colormap colormap)
{
WFrameWindow *fwin;
@@ -84,8 +85,12 @@ WFrameWindow *wFrameWindowCreate(WScreen * scr, int wlevel,
int x, int y,
fwin->last_languagemode = XkbGroup2Index;
#endif
+ fwin->depth = depth;
+ fwin->visual = visual;
+ fwin->colormap = colormap;
+
fwin->core = wCoreCreateTopLevel(scr, x, y, width, height, (flags &
WFF_BORDER)
- ? FRAME_BORDER_WIDTH : 0);
+ ? FRAME_BORDER_WIDTH : 0, fwin->depth,
fwin->visual, fwin->colormap);
if (wPreferences.use_saveunders) {
unsigned long vmask;
XSetWindowAttributes attribs;
diff --git a/src/framewin.h b/src/framewin.h
index 24b438c..27e6518 100644
--- a/src/framewin.h
+++ b/src/framewin.h
@@ -147,6 +147,9 @@ typedef struct WFrameWindow {
unsigned int incomplete_title:1;
} flags;
+ int depth;
+ Visual *visual;
+ Colormap colormap;
} WFrameWindow;
@@ -156,7 +159,8 @@ wFrameWindowCreate(WScreen *scr, int wlevel, int x, int y,
int *title_min, int *title_max, int flags,
union WTexture **title_texture,
union WTexture **resize_texture,
- WMColor **color, WMFont **font);
+ WMColor **color, WMFont **font,
+ int depth, Visual *visual, Colormap colormap);
void wFrameWindowUpdateBorders(WFrameWindow *fwin, int flags);
diff --git a/src/icon.c b/src/icon.c
index c479890..d929a8c 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -187,7 +187,7 @@ static WIcon *wIconCreateCore(WScreen *scr, int coord_x,
int coord_y)
coord_y,
wPreferences.icon_size,
wPreferences.icon_size,
- 0);
+ 0, scr->w_depth, scr->w_visual,
scr->w_colormap);
if (wPreferences.use_saveunders) {
vmask = CWSaveUnder;
diff --git a/src/menu.c b/src/menu.c
index 6231e06..7bb0639 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -164,7 +164,8 @@ WMenu *wMenuCreate(WScreen * screen, char *title, int
main_menu)
&wPreferences.menu_title_max_height,
flags,
screen->menu_title_texture, NULL,
- screen->menu_title_color,
&screen->menu_title_font);
+ screen->menu_title_color,
&screen->menu_title_font,
+ screen->w_depth, screen->w_visual,
screen->w_colormap);
menu->frame->core->descriptor.parent = menu;
menu->frame->core->descriptor.parent_type = WCLASS_MENU;
diff --git a/src/wcore.c b/src/wcore.c
index ac896a5..241ede4 100644
--- a/src/wcore.c
+++ b/src/wcore.c
@@ -46,7 +46,7 @@ extern XContext wWinContext;
* The created window.
*----------------------------------------------------------------------
*/
-WCoreWindow *wCoreCreateTopLevel(WScreen * screen, int x, int y, int width,
int height, int bwidth)
+WCoreWindow *wCoreCreateTopLevel(WScreen * screen, int x, int y, int width,
int height, int bwidth, int depth, Visual *visual, Colormap colormap)
{
WCoreWindow *core;
int vmask;
@@ -67,10 +67,10 @@ WCoreWindow *wCoreCreateTopLevel(WScreen * screen, int x,
int y, int width, int
| ButtonReleaseMask | ButtonMotionMask | ExposureMask |
EnterWindowMask | LeaveWindowMask;
vmask |= CWColormap;
- attribs.colormap = screen->w_colormap;
+ attribs.colormap = colormap;
core->window = XCreateWindow(dpy, screen->root_win, x, y, width, height,
- bwidth, screen->w_depth, CopyFromParent,
screen->w_visual, vmask, &attribs);
+ bwidth, depth, CopyFromParent, visual,
vmask, &attribs);
core->width = width;
core->height = height;
core->screen_ptr = screen;
@@ -115,10 +115,8 @@ WCoreWindow *wCoreCreate(WCoreWindow * parent, int x, int
y, int width, int heig
attribs.background_pixel = parent->screen_ptr->black_pixel;
attribs.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask
| ButtonReleaseMask | ButtonMotionMask | ExposureMask |
EnterWindowMask | LeaveWindowMask;
- /*
- vmask |= CWColormap;
- attribs.colormap = parent->screen_ptr->w_colormap;
- */
+ vmask |= CWColormap;
+ attribs.colormap = parent->screen_ptr->w_colormap;
core->window =
XCreateWindow(dpy, parent->window, x, y, width, height, 0,
parent->screen_ptr->w_depth, CopyFromParent,
diff --git a/src/wcore.h b/src/wcore.h
index 8209ba6..3452227 100644
--- a/src/wcore.h
+++ b/src/wcore.h
@@ -43,7 +43,8 @@ typedef struct _WCoreWindow {
WCoreWindow *wCoreCreateTopLevel(WScreen *screen, int x, int y, int width,
- int height, int bwidth);
+ int height, int bwidth,
+ int depth, Visual *visual, Colormap colormap);
WCoreWindow *wCoreCreate(WCoreWindow *parent, int x, int y,
int width, int height);
diff --git a/src/window.c b/src/window.c
index 50962f7..e7b1036 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1094,7 +1094,8 @@ WWindow *wManageWindow(WScreen *scr, Window window)
&wPreferences.window_title_max_height,
foo,
scr->window_title_texture,
- scr->resizebar_texture,
scr->window_title_color, &scr->title_font);
+ scr->resizebar_texture,
scr->window_title_color, &scr->title_font,
+ wattribs.depth, wattribs.visual,
wattribs.colormap);
wwin->frame->flags.is_client_window_frame = 1;
wwin->frame->flags.justification = wPreferences.title_justification;
@@ -1373,7 +1374,8 @@ WWindow *wManageInternalWindow(WScreen *scr, Window
window, Window owner,
&wPreferences.window_title_max_height,
foo,
scr->window_title_texture,
- scr->resizebar_texture,
scr->window_title_color, &scr->title_font);
+ scr->resizebar_texture,
scr->window_title_color, &scr->title_font,
+ scr->w_depth, scr->w_visual,
scr->w_colormap);
XSaveContext(dpy, window, wWinContext, (XPointer) &
wwin->client_descriptor);
-----------------------------------------------------------------------
Summary of changes:
src/framewin.c | 9 +++++++--
src/framewin.h | 6 +++++-
src/icon.c | 2 +-
src/menu.c | 3 ++-
src/wcore.c | 12 +++++-------
src/wcore.h | 3 ++-
src/window.c | 6 ++++--
src/winspector.c | 2 ++
src/wmspec.c | 8 ++++++--
9 files changed, 34 insertions(+), 17 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].