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  4222204abc2118cafcc9c3e048f03235422c0e9f (commit)
       via  25d083a85fe6182b598dc75bd0b74b66613b4853 (commit)
       via  bb48c355223d33fd2237b5e6c5c15b9aab3ce876 (commit)
       via  42a4d95e5b17bc6f77289b911572a8148b0bc31a (commit)
       via  309d5c0d1a8a136fd163fcc50a08933e22e9b2a4 (commit)
       via  53d31c7bbd7e97129b0d96d48c85e161c2d1b087 (commit)
      from  066de301df2f07c614b77e7a2bbadd9ff1342e46 (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/4222204abc2118cafcc9c3e048f03235422c0e9f

commit 4222204abc2118cafcc9c3e048f03235422c0e9f
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Wed Mar 20 04:02:19 2013 +0100

    Workspace clip creation in two steps
    
    This patch assigns always the clip to NULL and only if the clip is
    needed is created.
    
    This patch mainly is more clear/clean.

diff --git a/src/workspace.c b/src/workspace.c
index 3734b49..491452b 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -88,16 +88,15 @@ int wWorkspaceNew(WScreen *scr)
 
                wspace = wmalloc(sizeof(WWorkspace));
                wspace->name = NULL;
+               wspace->clip = NULL;
 
                if (!wspace->name) {
                        wspace->name = wmalloc(strlen(_("Workspace %i")) + 8);
                        sprintf(wspace->name, _("Workspace %i"), 
scr->workspace_count);
                }
 
-               if (!wPreferences.flags.noclip) {
+               if (!wPreferences.flags.noclip)
                        wspace->clip = wDockCreate(scr, WM_CLIP);
-               } else
-                       wspace->clip = NULL;
 
                list = wmalloc(sizeof(WWorkspace *) * scr->workspace_count);
 

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

commit 25d083a85fe6182b598dc75bd0b74b66613b4853
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Wed Mar 20 04:02:18 2013 +0100

    Removed extra XClearWindow call
    
    The function XClearWindow() is called twice, we can remove one.
    See the asterisks (**):
    
    Before the call to wIconPaint():
    -----------------8<--------------------------
    +++ b/src/icon.c
    @@ -621,7 +621,6 @@ void update_icon_pixmap(WIcon *icon)
                    XSetWindowBackgroundPixmap(dpy, icon->core->window, 
icon->pixmap);
    
            /* Paint it */
    **      XClearWindow(dpy, icon->core->window);
            wIconPaint(icon);
     }
    -----------------8<--------------------------
    
    First call in wIconPaint() function:
    -----------------8<--------------------------
    void wIconPaint(WIcon *icon)
    {
            WScreen *scr = icon->core->screen_ptr;
            int x, l, w;
            char *tmp;
    
    **      XClearWindow(dpy, icon->core->window);
    -----------------8<--------------------------

diff --git a/src/icon.c b/src/icon.c
index 62f618a..2c9b27d 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -621,7 +621,6 @@ void update_icon_pixmap(WIcon *icon)
                XSetWindowBackgroundPixmap(dpy, icon->core->window, 
icon->pixmap);
 
        /* Paint it */
-       XClearWindow(dpy, icon->core->window);
        wIconPaint(icon);
 }
 

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

commit bb48c355223d33fd2237b5e6c5c15b9aab3ce876
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Wed Mar 20 04:02:17 2013 +0100

    Window attributes moved to wCoreCreateTopLevel
    
    The function wCoreCreateTopLevel() is used in two files (icon.c and
    framewin.c), but after create the window, some attributes are changed.
    
    This patch moves the change inside the wCoreCreateTopLevel(), avoiding to
    call XChangeWindowAttributes() after the window creation. Now the window
    is created in only one step, with all the final attributes.
    
    Some details:
    
    - The function wCoreCreateTopLevel() has now one argument more, the
      border pixel color. This attribute was used always as the screen
      frame_border_pixel, but in icon.c the attribute is changed to
      white_pixel. Now the function wCoreCreateTopLevel() receives the
      value frame_border_pixel in framewin.c and scr->white_pixel in
      icon.c, as argument.
    
    - The vmask and attribs variables and the call to XChangeWindowAttributes()
      are removed in framewin.c and icon.c. The values CWSaveUnder for vmask and
      attribs.save_under = True are used if wPreferences.use_saveunders is True.
    
    - CWBorderPixel is not needed in icon.c, because was previously set in 
wcore.c!

diff --git a/src/framewin.c b/src/framewin.c
index b7a6e97..67cda92 100644
--- a/src/framewin.c
+++ b/src/framewin.c
@@ -113,15 +113,7 @@ WFrameWindow *wFrameWindowCreate(WScreen * scr, int 
wlevel, int x, int y,
        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);
-       if (wPreferences.use_saveunders) {
-               unsigned long vmask;
-               XSetWindowAttributes attribs;
-
-               vmask = CWSaveUnder;
-               attribs.save_under = True;
-               XChangeWindowAttributes(dpy, fwin->core->window, vmask, 
&attribs);
-       }
+                                        ? FRAME_BORDER_WIDTH : 0, fwin->depth, 
fwin->visual, fwin->colormap, scr->frame_border_pixel);
 
        /* setup stacking information */
        fwin->core->stacking = wmalloc(sizeof(WStacking));
diff --git a/src/icon.c b/src/icon.c
index e88ec30..62f618a 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -168,8 +168,6 @@ WIcon *icon_create_for_dock(WScreen *scr, char *command, 
char *wm_instance, char
 static WIcon *icon_create_core(WScreen *scr, int coord_x, int coord_y)
 {
        WIcon *icon;
-       unsigned long vmask = 0;
-       XSetWindowAttributes attribs;
 
        icon = wmalloc(sizeof(WIcon));
        icon->core = wCoreCreateTopLevel(scr,
@@ -177,18 +175,8 @@ static WIcon *icon_create_core(WScreen *scr, int coord_x, 
int coord_y)
                                         coord_y,
                                         wPreferences.icon_size,
                                         wPreferences.icon_size,
-                                        0, scr->w_depth, scr->w_visual, 
scr->w_colormap);
-
-       if (wPreferences.use_saveunders) {
-               vmask = CWSaveUnder;
-               attribs.save_under = True;
-       }
-
-       /* a white border for selecting it */
-       vmask |= CWBorderPixel;
-       attribs.border_pixel = scr->white_pixel;
-
-       XChangeWindowAttributes(dpy, icon->core->window, vmask, &attribs);
+                                        0, scr->w_depth, scr->w_visual, 
scr->w_colormap,
+                                        scr->white_pixel);
 
        /* will be overriden if this is a application icon */
        icon->core->descriptor.handle_mousedown = miniwindowMouseDown;
diff --git a/src/wcore.c b/src/wcore.c
index 1abe842..a2aff96 100644
--- a/src/wcore.c
+++ b/src/wcore.c
@@ -43,7 +43,7 @@ extern XContext wWinContext;
  * Returns:
  *     The created window.
  *--------------------------------------------------------------------- */
-WCoreWindow *wCoreCreateTopLevel(WScreen *screen, int x, int y, int width, int 
height, int bwidth, int depth, Visual *visual, Colormap colormap)
+WCoreWindow *wCoreCreateTopLevel(WScreen *screen, int x, int y, int width, int 
height, int bwidth, int depth, Visual *visual, Colormap colormap, WMPixel 
border_pixel)
 {
        WCoreWindow *core;
        int vmask;
@@ -56,13 +56,18 @@ WCoreWindow *wCoreCreateTopLevel(WScreen *screen, int x, 
int y, int width, int h
        attribs.cursor = wCursor[WCUR_DEFAULT];
        attribs.background_pixmap = None;
        attribs.background_pixel = screen->black_pixel;
-       attribs.border_pixel = screen->frame_border_pixel;
+       attribs.border_pixel = border_pixel;
        attribs.event_mask = SubstructureRedirectMask | ButtonPressMask |
                             ButtonReleaseMask | ButtonMotionMask |
                             ExposureMask | EnterWindowMask | LeaveWindowMask;
 
        attribs.colormap = colormap;
 
+       if (wPreferences.use_saveunders) {
+               vmask |= CWSaveUnder;
+               attribs.save_under = True;
+       }
+
        core->window = XCreateWindow(dpy, screen->root_win, x, y, width, height,
                                     bwidth, depth, CopyFromParent, visual, 
vmask, &attribs);
        core->width = width;
diff --git a/src/wcore.h b/src/wcore.h
index 4e626cc..6065c5f 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 depth, Visual *visual, Colormap colormap);
+                                int depth, Visual *visual, Colormap colormap,
+                                WMPixel border_pixel);
 
 WCoreWindow *wCoreCreate(WCoreWindow *parent, int x, int y,
                         int width, int height);

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

commit 42a4d95e5b17bc6f77289b911572a8148b0bc31a
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Wed Mar 20 04:02:16 2013 +0100

    Removed unused dock types
    
    The dock types NORMAL_DOCK and EXTENDED_DOCK are never used
    so can be removed.
    
    kix@debian:~/src/wmaker/git/wmaker-crm-base$ rgrep NORMAL_DOCK *
    src/dock.h:#define NORMAL_DOCK    WM_DOCK
    kix@debian:~/src/wmaker/git/wmaker-crm-base$ rgrep EXTENDED_DOCK *
    src/dock.h:#define EXTENDED_DOCK  WM_CLIP
    kix@debian:~/src/wmaker/git/wmaker-crm-base$

diff --git a/src/dock.h b/src/dock.h
index 08ae8de..47d963d 100644
--- a/src/dock.h
+++ b/src/dock.h
@@ -39,8 +39,6 @@ typedef struct WDock {
 
 #define WM_DOCK        0
 #define WM_CLIP        1
-#define NORMAL_DOCK    WM_DOCK
-#define EXTENDED_DOCK  WM_CLIP
     int type;
 
     WMagicNumber auto_expand_magic;

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

commit 309d5c0d1a8a136fd163fcc50a08933e22e9b2a4
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Wed Mar 20 04:02:15 2013 +0100

    Cosmetic code changes in workspace
    
    Added some blank lines, removed commented code and removed some
    spaces on function prototypes/definitions.

diff --git a/src/workspace.c b/src/workspace.c
index 7b62798..3734b49 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -78,7 +78,7 @@ void wWorkspaceMake(WScreen * scr, int count)
        }
 }
 
-int wWorkspaceNew(WScreen * scr)
+int wWorkspaceNew(WScreen *scr)
 {
        WWorkspace *wspace, **list;
        int i;
@@ -101,12 +101,13 @@ int wWorkspaceNew(WScreen * scr)
 
                list = wmalloc(sizeof(WWorkspace *) * scr->workspace_count);
 
-               for (i = 0; i < scr->workspace_count - 1; i++) {
+               for (i = 0; i < scr->workspace_count - 1; i++)
                        list[i] = scr->workspaces[i];
-               }
+
                list[i] = wspace;
                if (scr->workspaces)
                        wfree(scr->workspaces);
+
                scr->workspaces = list;
 
                wWorkspaceMenuUpdate(scr, scr->workspace_menu);
@@ -625,24 +626,15 @@ static void deleteWSCommand(WMenu * menu, WMenuEntry * 
entry)
        wWorkspaceDelete(menu->frame->screen_ptr, 
menu->frame->screen_ptr->workspace_count - 1);
 }
 
-static void newWSCommand(WMenu * menu, WMenuEntry * foo)
+static void newWSCommand(WMenu *menu, WMenuEntry *foo)
 {
        int ws;
 
        ws = wWorkspaceNew(menu->frame->screen_ptr);
+
        /* autochange workspace */
        if (ws >= 0)
                wWorkspaceChange(menu->frame->screen_ptr, ws);
-
-       /*
-          if (ws<9) {
-          int kcode;
-          if (wKeyBindings[WKBD_WORKSPACE1+ws]) {
-          kcode = wKeyBindings[WKBD_WORKSPACE1+ws]->keycode;
-          entry->rtext =
-          wstrdup(XKeysymToString(XKeycodeToKeysym(dpy, kcode, 0)));
-          }
-          } */
 }
 
 void wWorkspaceRename(WScreen * scr, int workspace, char *name)
@@ -801,7 +793,7 @@ void wWorkspaceSaveState(WScreen * scr, WMPropList * 
old_state)
        WMReleasePropList(parr);
 }
 
-void wWorkspaceRestoreState(WScreen * scr)
+void wWorkspaceRestoreState(WScreen *scr)
 {
        WMPropList *parr, *pstr, *wks_state, *clip_state;
        int i, j;
@@ -822,20 +814,25 @@ void wWorkspaceRestoreState(WScreen * scr)
                        pstr = WMGetFromPLDictionary(wks_state, dName);
                else
                        pstr = wks_state;
+
                if (i >= scr->workspace_count)
                        wWorkspaceNew(scr);
+
                if (scr->workspace_menu) {
                        wfree(scr->workspace_menu->entries[i + 2]->text);
                        scr->workspace_menu->entries[i + 2]->text = 
wstrdup(WMGetFromPLString(pstr));
                        scr->workspace_menu->flags.realized = 0;
                }
+
                wfree(scr->workspaces[i]->name);
                scr->workspaces[i]->name = wstrdup(WMGetFromPLString(pstr));
                if (!wPreferences.flags.noclip) {
                        int added_omnipresent_icons = 0;
+
                        clip_state = WMGetFromPLDictionary(wks_state, dClip);
                        if (scr->workspaces[i]->clip)
                                wDockDestroy(scr->workspaces[i]->clip);
+
                        scr->workspaces[i]->clip = wDockRestoreState(scr, 
clip_state, WM_CLIP);
                        if (i > 0)
                                wDockHideIcons(scr->workspaces[i]->clip);

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

commit 53d31c7bbd7e97129b0d96d48c85e161c2d1b087
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Wed Mar 20 04:02:14 2013 +0100

    Removed dead code in wSessionRestoreState
    
    The function wSessionRestoreState() calls execCommand()
    with the argument "host", but this argument is never used,
    so we can remove the argument and the code to make that
    argument, dead code at wSessionRestoreState.

diff --git a/src/session.c b/src/session.c
index 703b5fa..4fd11f8 100644
--- a/src/session.c
+++ b/src/session.c
@@ -328,7 +328,7 @@ void wSessionClearState(WScreen * scr)
        WMRemoveFromPLDictionary(scr->session_state, sWorkspace);
 }
 
-static pid_t execCommand(WScreen * scr, char *command, char *host)
+static pid_t execCommand(WScreen *scr, char *command)
 {
        pid_t pid;
        char **argv;
@@ -411,10 +411,10 @@ static WSavedState *getWindowState(WScreen * scr, 
WMPropList * win_state)
 
 #define SAME(x, y) (((x) && (y) && !strcmp((x), (y))) || (!(x) && !(y)))
 
-void wSessionRestoreState(WScreen * scr)
+void wSessionRestoreState(WScreen *scr)
 {
        WSavedState *state;
-       char *instance, *class, *command, *host;
+       char *instance, *class, *command;
        WMPropList *win_info, *apps, *cmd, *value;
        pid_t pid;
        int i, count;
@@ -454,12 +454,6 @@ void wSessionRestoreState(WScreen * scr)
                if (!instance && !class)
                        continue;
 
-               value = WMGetFromPLDictionary(win_info, sHost);
-               if (value && WMIsPLString(value))
-                       host = WMGetFromPLString(value);
-               else
-                       host = NULL;
-
                state = getWindowState(scr, win_info);
 
                dock = NULL;
@@ -499,7 +493,7 @@ void wSessionRestoreState(WScreen * scr)
 
                if (found) {
                        wDockLaunchWithState(dock, btn, state);
-               } else if ((pid = execCommand(scr, command, host)) > 0) {
+               } else if ((pid = execCommand(scr, command)) > 0) {
                        wWindowAddSavedState(instance, class, command, pid, 
state);
                } else {
                        wfree(state);

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

Summary of changes:
 src/dock.h      |    2 --
 src/framewin.c  |   10 +---------
 src/icon.c      |   17 ++---------------
 src/session.c   |   14 ++++----------
 src/wcore.c     |    9 +++++++--
 src/wcore.h     |    3 ++-
 src/workspace.c |   32 ++++++++++++++------------------
 7 files changed, 30 insertions(+), 57 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