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  c6991fb991e33c33d3801e5d5023901f2840a8ad (commit)
       via  bc8ccee72f78d163fd16caf6386f14ed9e6ae53d (commit)
      from  9d503d2abc2eb052436fb2f8d072750810f1fc09 (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/c6991fb991e33c33d3801e5d5023901f2840a8ad

commit c6991fb991e33c33d3801e5d5023901f2840a8ad
Author: Amadeusz Sławiński <am...@asmblr.net>
Date:   Mon May 19 22:27:23 2014 +0200

    Allow setting "FrameFocusedBorderColor" from WPrefs
    
    Adds separate entry in menu and draws border around focused window.
    
    Signed-off-by: Amadeusz Sławiński <am...@asmblr.net>

diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c
index 092ad08a..f67975d9 100644
--- a/WPrefs.app/Appearance.c
+++ b/WPrefs.app/Appearance.c
@@ -331,6 +331,7 @@ enum {
        MDISAB_COL,
        MHIGH_COL,
        MHIGHT_COL,
+       FFBORDER_COL,
        FBORDER_COL,
        FSBORDER_COL,
        ICONT_COL,
@@ -351,6 +352,7 @@ static const struct {
        { "MenuDisabledColor", "#616161" },
        { "HighlightColor", "white" },
        { "HighlightTextColor", "black" },
+       { "FrameFocusedBorderColor", "black" },
        { "FrameBorderColor", "black" },
        { "FrameSelectedBorderColor", "white" }/* , */
        /* { "IconTitleColor", "white" }, */
@@ -390,6 +392,7 @@ static WMRect previewColorPositions[] = {
        {{30, 200}, {90, 20}},
        {{0, 0}, {0, 0}},
        {{0, 0}, {0, 0}},
+       {{0, 0}, {0, 0}},
        {{155, 130}, {64, 64}},
        {{155, 130}, {64, 64}},
        {{155, 130}, {64, 64}},
@@ -790,7 +793,7 @@ static void updatePreviewBox(_Panel * panel, int elements)
 
        if (elements & (1 << PFOCUSED)) {
                renderPreview(panel, gc, PFOCUSED, RBEV_RAISED2);
-               colorUpdate |= 1 << FTITLE_COL | 1 << FBORDER_COL;
+               colorUpdate |= 1 << FTITLE_COL | 1 << FFBORDER_COL;
        }
        if (elements & (1 << PUNFOCUSED)) {
                renderPreview(panel, gc, PUNFOCUSED, RBEV_RAISED2);
@@ -1372,6 +1375,7 @@ static void changeColorPage(WMWidget * w, void *data)
                {5, 180},
                {-22, -21},
                {-22, -21},
+               {-22, -21},
                {130, 140},
                {130, 140},
                {130, 140},
@@ -1494,12 +1498,6 @@ static void updateColorPreviewBox(_Panel * panel, int 
elements)
        if (elements & (1 << FBORDER_COL)) {
                XDrawRectangle(dpy, pnot,
                               WMColorGC(panel->colors[FBORDER_COL]),
-                              29, 9, 190, 20);
-               XDrawRectangle(dpy, d,
-                              WMColorGC(panel->colors[FBORDER_COL]),
-                              29, 9, 190, 20);
-               XDrawRectangle(dpy, pnot,
-                              WMColorGC(panel->colors[FBORDER_COL]),
                               29, 39, 190, 20);
                XDrawRectangle(dpy, d,
                               WMColorGC(panel->colors[FBORDER_COL]),
@@ -1548,6 +1546,15 @@ static void updateColorPreviewBox(_Panel * panel, int 
elements)
                          119, 120, 119, 220);
        }
 
+       if (elements & (1 << FFBORDER_COL)) {
+               XDrawRectangle(dpy, pnot,
+                              WMColorGC(panel->colors[FFBORDER_COL]),
+                              29, 9, 190, 20);
+               XDrawRectangle(dpy, d,
+                              WMColorGC(panel->colors[FFBORDER_COL]),
+                              29, 9, 190, 20);
+       }
+
        /*
           if (elements & (1 << ICONT_COL)) {
           WRITE(_("Focused Window"), panel->colors[ICONT_COL],
@@ -1839,6 +1846,7 @@ static void createPanel(Panel * p)
        WMAddPopUpButtonItem(panel->colP, _("Disabled Menu Item Text"));
        WMAddPopUpButtonItem(panel->colP, _("Menu Highlight Color"));
        WMAddPopUpButtonItem(panel->colP, _("Highlighted Menu Text Color"));
+       WMAddPopUpButtonItem(panel->colP, _("Focused Window Border Color"));
        WMAddPopUpButtonItem(panel->colP, _("Window Border Color"));
        WMAddPopUpButtonItem(panel->colP, _("Selected Window Border Color"));
        /*

http://repo.or.cz/w/wmaker-crm.git/commit/bc8ccee72f78d163fd16caf6386f14ed9e6ae53d

commit bc8ccee72f78d163fd16caf6386f14ed9e6ae53d
Author: Amadeusz Sławiński <am...@asmblr.net>
Date:   Mon May 19 22:27:22 2014 +0200

    Allow setting separate border color for focused windows
    
    This patch adds "FrameFocusedBorderColor" option for theming,
    It should allow having borders better matching titlebar colors.
    By default it's set to black.
    
    Signed-off-by: Amadeusz Sławiński <am...@asmblr.net>

diff --git a/src/actions.c b/src/actions.c
index 13dffec6..a767072f 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1874,10 +1874,17 @@ void wSelectWindow(WWindow *wwin, Bool flag)
                WMAddToArray(scr->selected_windows, wwin);
        } else {
                wwin->flags.selected = 0;
-               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 (wwin->flags.focused) {
+                       if (wwin->frame->focused_border_pixel)
+                               XSetWindowBorder(dpy, 
wwin->frame->core->window, *wwin->frame->focused_border_pixel);
+                       else
+                               XSetWindowBorder(dpy, 
wwin->frame->core->window, scr->frame_focused_border_pixel);
+               } else {
+                       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/defaults.c b/src/defaults.c
index 7d66372e..436cb203 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -126,6 +126,7 @@ static WDECallbackUpdate setIconTitleColor;
 static WDECallbackUpdate setIconTitleBack;
 static WDECallbackUpdate setFrameBorderWidth;
 static WDECallbackUpdate setFrameBorderColor;
+static WDECallbackUpdate setFrameFocusedBorderColor;
 static WDECallbackUpdate setFrameSelectedBorderColor;
 static WDECallbackUpdate setLargeDisplayFont;
 static WDECallbackUpdate setWTitleColor;
@@ -568,6 +569,8 @@ WDefaultEntry optionList[] = {
            NULL, getInt, setFrameBorderWidth, NULL, NULL},
        {"FrameBorderColor", "black", NULL,
            NULL, getColor, setFrameBorderColor, NULL, NULL},
+       {"FrameFocusedBorderColor", "black", NULL,
+           NULL, getColor, setFrameFocusedBorderColor, NULL, NULL},
        {"FrameSelectedBorderColor", "white", NULL,
            NULL, getColor, setFrameSelectedBorderColor, NULL, NULL},
 
@@ -2891,6 +2894,23 @@ static int setFrameBorderColor(WScreen * scr, 
WDefaultEntry * entry, void *tdata
        return REFRESH_FRAME_BORDER;
 }
 
+static int setFrameFocusedBorderColor(WScreen *scr, WDefaultEntry *entry, void 
*tdata, void *foo)
+{
+       XColor *color = tdata;
+
+       /* Parameter not used, but tell the compiler that it is ok */
+       (void) entry;
+       (void) foo;
+
+       if (scr->frame_focused_border_color)
+               WMReleaseColor(scr->frame_focused_border_color);
+       scr->frame_focused_border_color = WMCreateRGBColor(scr->wmscreen, 
color->red, color->green, color->blue, True);
+
+       wFreeColor(scr, color->pixel);
+
+       return REFRESH_FRAME_BORDER;
+}
+
 static int setFrameSelectedBorderColor(WScreen * scr, WDefaultEntry * entry, 
void *tdata, void *foo)
 {
        XColor *color = tdata;
diff --git a/src/framewin.c b/src/framewin.c
index 68a1b740..13fe1e09 100644
--- a/src/framewin.c
+++ b/src/framewin.c
@@ -415,6 +415,7 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int 
flags)
        checkTitleSize(fwin);
 
        allocFrameBorderPixel(fwin->colormap, 
WMGetColorRGBDescription(scr->frame_border_color), &fwin->border_pixel);
+       allocFrameBorderPixel(fwin->colormap, 
WMGetColorRGBDescription(scr->frame_focused_border_color), 
&fwin->focused_border_pixel);
        allocFrameBorderPixel(fwin->colormap, 
WMGetColorRGBDescription(scr->frame_selected_border_color), 
&fwin->selected_border_pixel);
 
        if (flags & WFF_SELECTED) {
@@ -422,8 +423,13 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int 
flags)
                        XSetWindowBorder(dpy, fwin->core->window, 
*fwin->selected_border_pixel);
        }
        else {
-               if (fwin->border_pixel)
-                       XSetWindowBorder(dpy, fwin->core->window, 
*fwin->border_pixel);
+               if (fwin->flags.state == WS_FOCUSED) {
+                       if (fwin->focused_border_pixel)
+                               XSetWindowBorder(dpy, fwin->core->window, 
*fwin->focused_border_pixel);
+               } else {
+                       if (fwin->border_pixel)
+                               XSetWindowBorder(dpy, fwin->core->window, 
*fwin->border_pixel);
+               }
        }
 }
 
@@ -477,6 +483,13 @@ void wFrameWindowChangeState(WFrameWindow * fwin, int 
state)
        fwin->flags.state = state;
        fwin->flags.need_texture_change = 1;
 
+       if (fwin->flags.state == WS_FOCUSED) {
+               if (fwin->focused_border_pixel)
+                       XSetWindowBorder(dpy, fwin->core->window, 
*fwin->focused_border_pixel);
+       } else {
+               if (fwin->border_pixel)
+                       XSetWindowBorder(dpy, fwin->core->window, 
*fwin->border_pixel);
+       }
        wFrameWindowPaint(fwin);
 }
 
diff --git a/src/framewin.h b/src/framewin.h
index 22e0edfd..8b0a53ca 100644
--- a/src/framewin.h
+++ b/src/framewin.h
@@ -152,6 +152,7 @@ typedef struct WFrameWindow {
     Visual *visual;
     Colormap colormap;
     unsigned long *border_pixel;
+    unsigned long *focused_border_pixel;
     unsigned long *selected_border_pixel;
 } WFrameWindow;
 
diff --git a/src/screen.c b/src/screen.c
index 91ef63bc..afc9d17d 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -622,6 +622,8 @@ WScreen *wScreenInit(int screen_number)
                /* frame boder color */
                wGetColor(scr, 
WMGetColorRGBDescription(scr->frame_border_color), &xcol);
                scr->frame_border_pixel = xcol.pixel;
+               wGetColor(scr, 
WMGetColorRGBDescription(scr->frame_focused_border_color), &xcol);
+               scr->frame_focused_border_pixel = xcol.pixel;
                wGetColor(scr, 
WMGetColorRGBDescription(scr->frame_selected_border_color), &xcol);
                scr->frame_selected_border_pixel = xcol.pixel;
        }
diff --git a/src/screen.h b/src/screen.h
index 97e2e48a..b9b5d78b 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -160,10 +160,12 @@ typedef struct _WScreen {
 
     int frame_border_width;
     WMColor *frame_border_color;
+    WMColor *frame_focused_border_color;
     WMColor *frame_selected_border_color;
 
     WMPixel line_pixel;
     WMPixel frame_border_pixel;               /* frame border */
+    WMPixel frame_focused_border_pixel;               /* frame border */
     WMPixel frame_selected_border_pixel;/* frame border */
 
 
diff --git a/util/getstyle.c b/util/getstyle.c
index dfb739c6..079b7d40 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -92,6 +92,7 @@ static char *options[] = {
        "IconTitleBack",
        "FrameBorderWidth",
        "FrameBorderColor",
+       "FrameFocusedBorderColor",
        "FrameSelectedBorderColor",
        "MenuStyle",
        "WindowTitleExtendSpace",

-----------------------------------------------------------------------

Summary of changes:
 WPrefs.app/Appearance.c |   22 +++++++++++++++-------
 src/actions.c           |   15 +++++++++++----
 src/defaults.c          |   20 ++++++++++++++++++++
 src/framewin.c          |   17 +++++++++++++++--
 src/framewin.h          |    1 +
 src/screen.c            |    2 ++
 src/screen.h            |    2 ++
 util/getstyle.c         |    1 +
 8 files changed, 67 insertions(+), 13 deletions(-)


repo.or.cz automatic notification. Contact project admin crma...@gmail.com
if you want to unsubscribe, or site admin ad...@repo.or.cz if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to