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  89a6476a33b6cabde9646e01d7cbcf5ce7547a87 (commit)
       via  bf9e0252894f8501ef781e40bfed42264cee0b19 (commit)
      from  936a85ce253a12425e4462ef6085b3c34ac3376d (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/89a6476a33b6cabde9646e01d7cbcf5ce7547a87

commit 89a6476a33b6cabde9646e01d7cbcf5ce7547a87
Author: Iain Patterson <[email protected]>
Date:   Thu May 23 14:54:35 2013 +0100

    Dim switchpanel icons when same-class cycling.
    
    When cycling through windows in the switchpanel using the GroupNextKey
    or GroupPrevKey shortcuts, dim the icons of windows which are of a
    different WM_CLASS.

diff --git a/src/switchpanel.c b/src/switchpanel.c
index cedc487..6c8f6ea 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -105,7 +105,7 @@ static Bool sameWindowClass(WWindow *wwin, WWindow *curwin)
        return True;
 }
 
-static void changeImage(WSwitchPanel *panel, int idecks, int selected)
+static void changeImage(WSwitchPanel *panel, int idecks, int selected, Bool 
dim)
 {
        WMFrame *icon = WMGetFromArray(panel->icons, idecks);
        RImage *image = WMGetFromArray(panel->images, idecks);
@@ -115,7 +115,7 @@ static void changeImage(WSwitchPanel *panel, int idecks, 
int selected)
 
        if (image && icon) {
                RImage *back;
-               int opaq = 255;
+               int opaq = (dim) ? 75 : 255;
                RImage *tile;
                WMPoint pos;
                Pixmap p;
@@ -204,7 +204,7 @@ static void scrollIcons(WSwitchPanel *panel, int delta)
        panel->firstVisible = nfirst;
 
        for (i = panel->firstVisible; i < panel->firstVisible + 
panel->visibleCount; i++)
-               changeImage(panel, i, i == panel->current);
+               changeImage(panel, i, i == panel->current, 0);
 }
 
 /*
@@ -471,7 +471,7 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow 
*curwin, Bool class_only)
        WMRealizeWidget(panel->win);
 
        WM_ITERATE_ARRAY(panel->windows, wwin, i) {
-               changeImage(panel, i, 0);
+               changeImage(panel, i, 0, False);
        }
 
        if (panel->bg) {
@@ -501,7 +501,7 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow 
*curwin, Bool class_only)
 
        panel->current = WMGetFirstInArray(panel->windows, curwin);
        if (panel->current >= 0)
-               changeImage(panel, panel->current, 1);
+               changeImage(panel, panel->current, 1, False);
 
        WMMapWidget(panel->win);
 
@@ -564,15 +564,16 @@ void wSwitchPanelDestroy(WSwitchPanel *panel)
 
 WWindow *wSwitchPanelSelectNext(WSwitchPanel *panel, int back, int 
ignore_minimized, Bool class_only)
 {
-       WWindow *wwin, *curwin;
+       WWindow *wwin, *curwin, *tmpwin;
        int count = WMGetArrayItemCount(panel->windows);
        int orig = panel->current;
+       int i;
 
        if (count == 0)
                return NULL;
 
        if (panel->win)
-               changeImage(panel, panel->current, 0);
+               changeImage(panel, panel->current, 0, False);
 
        if (!wPreferences.cycle_ignore_minimized)
                ignore_minimized = False;
@@ -598,6 +599,14 @@ WWindow *wSwitchPanelSelectNext(WSwitchPanel *panel, int 
back, int ignore_minimi
                } while (!sameWindowClass(wwin, curwin));
        } while (ignore_minimized && panel->current != orig && 
canReceiveFocus(wwin) < 0);
 
+       WM_ITERATE_ARRAY(panel->windows, tmpwin, i) {
+               if (!class_only || sameWindowClass(tmpwin, curwin))
+                       changeImage(panel, i, 0, False);
+               else
+                       changeImage(panel, i, 0, True);
+
+       }
+
        if (panel->current < panel->firstVisible)
                scrollIcons(panel, panel->current - panel->firstVisible);
        else if (panel->current - panel->firstVisible >= panel->visibleCount)
@@ -606,7 +615,7 @@ WWindow *wSwitchPanelSelectNext(WSwitchPanel *panel, int 
back, int ignore_minimi
        if (panel->win) {
                drawTitle(panel, panel->current, wwin->frame->title);
 
-               changeImage(panel, panel->current, 1);
+               changeImage(panel, panel->current, 1, False);
        }
 
        return wwin;
@@ -621,7 +630,7 @@ WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int 
back)
                return NULL;
 
        if (panel->win)
-               changeImage(panel, panel->current, 0);
+               changeImage(panel, panel->current, 0, False);
 
        if (back) {
                panel->current = count - 1;
@@ -635,7 +644,7 @@ WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int 
back)
 
        if (panel->win) {
                drawTitle(panel, panel->current, wwin->frame->title);
-               changeImage(panel, panel->current, 1);
+               changeImage(panel, panel->current, 1, False);
        }
 
        return wwin;
@@ -662,8 +671,8 @@ WWindow *wSwitchPanelHandleEvent(WSwitchPanel *panel, 
XEvent *event)
        if (focus >= 0 && panel->current != focus) {
                WWindow *wwin;
 
-               changeImage(panel, panel->current, 0);
-               changeImage(panel, focus, 1);
+               changeImage(panel, panel->current, 0, False);
+               changeImage(panel, focus, 1, False);
                panel->current = focus;
 
                wwin = WMGetFromArray(panel->windows, focus);

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

commit bf9e0252894f8501ef781e40bfed42264cee0b19
Author: Iain Patterson <[email protected]>
Date:   Thu May 23 13:36:57 2013 +0100

    Prevent crash when switchpanel is not initialised.
    
    A while loop in StartWindozeCycle() was checking the value of the panel
    pointer and setting a flag to break out of the loop if it were NULL.
    The current iteration of the loop was allowed to continue, however, with
    the result that the null pointer could be passed to one of the
    switchpanel functions and cause a segfault.
    
    To reproduce, close all windows except one.  Open the inspector and set
    the window's "Do not show in the switch panel" flag.  Then close the
    inspector and press alt-tab to open the switchpanel.  As there is only
    one window and it is not allowed to appear in the switchpanel, a null
    panel pointer is returned, then later passed to wSwitchPanelSelectNext()
    causing wmaker to crash.
    
    The fix is to break out of the loop immediately instead of setting the
    done flag.

diff --git a/src/cycling.c b/src/cycling.c
index 574e0f4..44c4d1e 100644
--- a/src/cycling.c
+++ b/src/cycling.c
@@ -152,7 +152,7 @@ void StartWindozeCycle(WWindow * wwin, XEvent * event, Bool 
next, Bool class_onl
                modifiers = ev.xkey.state & ValidModMask;
 
                if (!swpanel)
-                       done = True;
+                       break;
 
                switch (ev.type) {
 

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

Summary of changes:
 src/cycling.c     |    2 +-
 src/switchpanel.c |   33 +++++++++++++++++++++------------
 2 files changed, 22 insertions(+), 13 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].

Reply via email to