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  29a526748553e11a1bcd7400e4cfc16c1f5351ed (commit)
       via  41da1b30dbfe09aef2658f4feac9021bde0d31a9 (commit)
      from  25b5ca256614020150ecf5f13637d1e931ead666 (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/29a526748553e11a1bcd7400e4cfc16c1f5351ed

commit 29a526748553e11a1bcd7400e4cfc16c1f5351ed
Author: Rodolfo García Peñas (kix) <[email protected]>
Date:   Sun Apr 14 23:13:27 2013 +0200

    icon_update_pixmap default moved to bottom
    
    The default case is moved to the bottom of the switch case.
    
    The default case should be removed, because the icon has always
    a right value, because the icon creation always uses a real value:
    
    kix@debian:~/src/wmaker/wmaker-crm/src$ grep wAppIconCreateForDock *c
    appicon.c:WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char 
*wm_instance, char *wm_class, int tile)
    dock.c:         btn = wAppIconCreateForDock(scr, NULL, "Logo", "WMClip", 
TILE_CLIP);
    dock.c:         btn = wAppIconCreateForDock(scr, NULL, "Logo", "WMDock", 
TILE_NORMAL);
    dock.c:         btn = wAppIconCreateForDock(scr, NULL, name, "WMDrawer", 
TILE_DRAWER);
    dock.c: aicon = wAppIconCreateForDock(scr, command, winstance, wclass, 
TILE_NORMAL);
    (1)dock.c:                         aicon = 
wAppIconCreateForDock(dock->screen_ptr, NULL,
    kix@debian:~/src/wmaker/wmaker-crm/src$
    kix@debian:~/src/wmaker/wmaker-crm/src$ grep TILE_ *c | grep -v 
ICON_TILE_SIZE
    ***[2]appicon.c:              tile = TILE_CLIP;
    dock.c:         btn = wAppIconCreateForDock(scr, NULL, "Logo", "WMClip", 
TILE_CLIP);
    dock.c:         btn = wAppIconCreateForDock(scr, NULL, "Logo", "WMDock", 
TILE_NORMAL);
    dock.c:         btn = wAppIconCreateForDock(scr, NULL, name, "WMDrawer", 
TILE_DRAWER);
    dock.c: aicon = wAppIconCreateForDock(scr, command, winstance, wclass, 
TILE_NORMAL);
    (2)dock.c:                                                       
wm_instance, wm_class, TILE_NORMAL);
    ***[3]icon.c: icon->tile_type = TILE_NORMAL;
    icon.c: case TILE_NORMAL:
    icon.c: case TILE_CLIP:
    icon.c: case TILE_DRAWER:
    kix@debian:~/src/wmaker/wmaker-crm/src$ grep tile_type *c
    icon.c: icon->tile_type = TILE_NORMAL;
    ***[1]icon.c: icon->tile_type = tile;
    icon.c: switch (icon->tile_type) {
    icon.c:         wwarning("Unknown tile type: %d.n", icon->tile_type);
    kix@debian:~/src/wmaker/wmaker-crm/src$
    
    There are only three cases without value (asterisk in the line start) set
    as preprocessor variable. (1) and (2) is the same call. These are the three 
cases:
    
    Case [1]:
    
    -------------8<--------------
    WIcon *icon_create_for_dock(WScreen *scr, char *command, char *wm_instance, 
char *wm_class, int tile)
    {
            WIcon *icon;
    
            icon = icon_create_core(scr, 0, 0);
            icon->tile_type = tile;
    -------------8<--------------
    
    Calls to icon_create_for_dock, is only call in appicon.c:
    
    -------------8<--------------
    kix@debian:~/src/wmaker/wmaker-crm/src$ grep icon_create_for_dock *c
    appicon.c:      aicon->icon = icon_create_for_dock(scr, command, 
wm_instance, wm_class, tile);
    icon.c:WIcon *icon_create_for_dock(WScreen *scr, char *command, char 
*wm_instance, char *wm_class, int tile)
    kix@debian:~/src/wmaker/wmaker-crm/src$
    -------------8<--------------
    
    The call:
    
    -------------8<--------------
    WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char 
*wm_instance, char *wm_class, int tile)
    {
    [snip]
            if (strcmp(wm_class, "WMDock") == 0 && 
wPreferences.flags.clip_merged_in_dock)
                    tile = TILE_CLIP;
            aicon->icon = icon_create_for_dock(scr, command, wm_instance, 
wm_class, tile);
    -------------8<--------------
    
    And the calls to wAppIconCreateForDock() are checked before.
    
    The case [2] is just the line:
    
    -------------8<--------------
    WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char 
*wm_instance, char *wm_class, int tile)
    {
    [snip]
            if (strcmp(wm_class, "WMDock") == 0 && 
wPreferences.flags.clip_merged_in_dock)
    ***             tile = TILE_CLIP;
            aicon->icon = icon_create_for_dock(scr, command, wm_instance, 
wm_class, tile);
    -------------8<--------------
    
    Then, is sure too.
    
    The case [3] is:
    
    -------------8<--------------
    WIcon *icon_create_for_wwindow(WWindow *wwin)
    {
    [snip]
            icon->tile_type = TILE_NORMAL;
    -------------8<--------------
    
    All windows have TILE_NORMAL.
    
    Then, all cases are secure.

diff --git a/src/icon.c b/src/icon.c
index e0ea97a..1033734 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -250,17 +250,20 @@ static void icon_update_pixmap(WIcon *icon, RImage *image)
        case TILE_NORMAL:
                tile = RCloneImage(scr->icon_tile);
                break;
-       default:
-               wwarning("Unknown tileType: %d.n", icon->tile_type);
-               // fallthrough to TILE_CLIP (emulate previous behaviour)
        case TILE_CLIP:
-               assert(scr->clip_tile);
                tile = RCloneImage(scr->clip_tile);
                break;
        case TILE_DRAWER:
-               assert(scr->drawer_tile);
                tile = RCloneImage(scr->drawer_tile);
                break;
+       default:
+               /*
+                * The icon has always rigth value, this case is
+                * only to avoid a compiler warning with "tile"
+                * "may be used uninitialized"
+                */
+               wwarning("Unknown tile type: %d.n", icon->tile_type);
+               tile = RCloneImage(scr->icon_tile);
        }
 
        if (image) {

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

commit 41da1b30dbfe09aef2658f4feac9021bde0d31a9
Author: Rodolfo García Peñas (kix) <[email protected]>
Date:   Sun Apr 14 23:13:26 2013 +0200

    New file misc.h
    
    This is the new file misc.h, with the function prototypes for misc.c.
    This file is created using misc.c and removing the prototypes from funcs.h

diff --git a/src/actions.c b/src/actions.c
index 207ce4f..3fb3fe6 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -47,6 +47,7 @@
 #include "xinerama.h"
 #include "usermenu.h"
 #include "placement.h"
+#include "misc.h"
 
 /****** Global Variables ******/
 
diff --git a/src/appicon.c b/src/appicon.c
index 72fb3d0..d6d8164 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -48,6 +48,7 @@
 #include "xinerama.h"
 #include "client.h"
 #include "placement.h"
+#include "misc.h"
 #ifdef XDND
 #include "xdnd.h"
 #endif
diff --git a/src/client.c b/src/client.c
index cfe5181..e877229 100644
--- a/src/client.c
+++ b/src/client.c
@@ -42,6 +42,7 @@
 #include "appicon.h"
 #include "appmenu.h"
 #include "wmspec.h"
+#include "misc.h"
 
 /****** Global Variables ******/
 
diff --git a/src/defaults.c b/src/defaults.c
index 5300a23..53d8173 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -61,6 +61,7 @@
 #include "dock.h"
 #include "workspace.h"
 #include "properties.h"
+#include "misc.h"
 
 #define MAX_SHORTCUT_LENGTH 32
 
diff --git a/src/dialog.c b/src/dialog.c
index 6964495..91a3d83 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -52,7 +52,7 @@
 #include "GNUstep.h"
 #include "screen.h"
 #include "dialog.h"
-#include "funcs.h"
+#include "misc.h"
 #include "stacking.h"
 #include "framewin.h"
 #include "window.h"
diff --git a/src/dock.c b/src/dock.c
index 529b982..7f277c5 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -55,6 +55,7 @@
 #include "superfluous.h"
 #include "xinerama.h"
 #include "placement.h"
+#include "misc.h"
 
 /**** Local variables ****/
 #define CLIP_REWIND       1
diff --git a/src/dockedapp.c b/src/dockedapp.c
index d7fc7b7..cc592e0 100644
--- a/src/dockedapp.c
+++ b/src/dockedapp.c
@@ -33,7 +33,7 @@
 #include "dock.h"
 #include "dockedapp.h"
 #include "dialog.h"
-#include "funcs.h"
+#include "misc.h"
 #include "defaults.h"
 #include "framewin.h"
 #include "xinerama.h"
diff --git a/src/event.c b/src/event.c
index 302497b..a8f71f7 100644
--- a/src/event.c
+++ b/src/event.c
@@ -70,6 +70,7 @@
 #include "colormap.h"
 #include "screen.h"
 #include "shutdown.h"
+#include "misc.h"
 
 /******** Global Variables **********/
 extern XContext wWinContext;
diff --git a/src/framewin.c b/src/framewin.c
index fe6a1b2..39f55d6 100644
--- a/src/framewin.c
+++ b/src/framewin.c
@@ -39,7 +39,7 @@
 #include "wcore.h"
 #include "framewin.h"
 #include "stacking.h"
-#include "funcs.h"
+#include "misc.h"
 
 #define DBLCLICK_TIME wPreferences.dblclick_time
 
diff --git a/src/funcs.h b/src/funcs.h
index 7fb6958..1863d55 100644
--- a/src/funcs.h
+++ b/src/funcs.h
@@ -41,11 +41,6 @@ void OpenMiniwindowMenu(WWindow *wwin, int x, int y);
 void CloseWindowMenu(WScreen *scr);
 void DestroyWindowMenu(WScreen *scr);
 void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next, Bool 
class_only);
-void SendHelperMessage(WScreen *scr, char type, int workspace, char *msg);
-void UnescapeWM_CLASS(char *str, char **name, char **class);
-
-void ParseWindowName(WMPropList *value, char **winstance, char **wclass,
-                     char *where);
 
 void wHackedGrabButton(unsigned int button, unsigned int modifiers,
                        Window grab_window, Bool owner_events,
@@ -57,24 +52,11 @@ WMagicNumber wAddDeathHandler(pid_t pid, WDeathHandler 
*callback, void *cdata);
 Pixmap LoadIcon(WScreen *scr, char *path, char *mask, int title_height);
 
 
-char * StrConcatDot(char *a, char *b);
-char * ExpandOptions(WScreen *scr, char *cmdline);
-char * ShrinkString(WMFont *font, char *string, int width);
-char * FindImage(char *paths, char *file);
-char * GetShortcutString(char *text);
-char * GetShortcutKey(WShortKey key);
-char * EscapeWM_CLASS(char *name, char *class);
-
 Bool IsDoubleClick(WScreen *scr, XEvent *event);
-Bool UpdateDomainFile(WDDomain *domain);
 
 WWindow * NextToFocusAfter(WWindow *wwin);
 WWindow * NextToFocusBefore(WWindow *wwin);
 
-void move_window(Window win, int from_x, int from_y, int to_x, int to_y);
-void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
-void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int 
to_y);
-
 RImage * wGetImageForWindowName(WScreen *scr, char *winstance, char *wclass);
 
 #ifdef NUMLOCK_HACK
@@ -83,14 +65,6 @@ void wHackedGrabKey(int keycode, unsigned int modifiers,
                     int keyboard_mode);
 #endif
 
-/****** I18N Wrapper for XFetchName,XGetIconName ******/
-
-Bool wFetchName(Display *dpy, Window win, char **winname);
-Bool wGetIconName(Display *dpy, Window win, char **iconname);
-
-/* Free returned string it when done. (applies to the next 2 functions) */
-char * GetCommandForWindow(Window win);
-
 Bool GetCommandForPid(int pid, char ***argv, int *argc);
 
 int getWVisualID(int screen);
diff --git a/src/icon.c b/src/icon.c
index 2d01341..e0ea97a 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -38,12 +38,12 @@
 #include "window.h"
 #include "icon.h"
 #include "actions.h"
-#include "funcs.h"
 #include "stacking.h"
 #include "application.h"
 #include "defaults.h"
 #include "appicon.h"
 #include "wmspec.h"
+#include "misc.h"
 
 /**** Global varianebles ****/
 extern WPreferences wPreferences;
diff --git a/src/misc.c b/src/misc.c
index 32d5659..ef35608 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -38,13 +38,13 @@
 #include <WINGs/WUtil.h>
 #include <wraster.h>
 
+#include "misc.h"
 #include "WindowMaker.h"
 #include "GNUstep.h"
 #include "screen.h"
 #include "wcore.h"
 #include "window.h"
 #include "framewin.h"
-#include "funcs.h"
 #include "dialog.h"
 #include "xutil.h"
 #include "xmodifier.h"
@@ -53,6 +53,9 @@
 extern WPreferences wPreferences;
 #define ICON_SIZE wPreferences.icon_size
 
+/**** Local prototypes *****/
+static void UnescapeWM_CLASS(char *str, char **name, char **class);
+
 /* XFetchName Wrapper */
 Bool wFetchName(Display *dpy, Window win, char **winname)
 {
@@ -862,7 +865,7 @@ char *EscapeWM_CLASS(char *name, char *class)
        return ret;
 }
 
-void UnescapeWM_CLASS(char *str, char **name, char **class)
+static void UnescapeWM_CLASS(char *str, char **name, char **class)
 {
        int i, j, k, dot;
 
diff --git a/src/misc.h b/src/misc.h
new file mode 100644
index 0000000..791bc59
--- /dev/null
+++ b/src/misc.h
@@ -0,0 +1,45 @@
+/*
+ *  Window Maker window manager
+ *
+ *  Copyright (c) 1997-2003 Alfredo K. Kojima
+ *  Copyright (c) 2013 Window Maker Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef WMMISC_H_
+#define WMMISC_H_
+
+#include "appicon.h"
+
+
+Bool wFetchName(Display *dpy, Window win, char **winname);
+Bool wGetIconName(Display *dpy, Window win, char **iconname);
+Bool UpdateDomainFile(WDDomain * domain);
+
+void move_window(Window win, int from_x, int from_y, int to_x, int to_y);
+void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
+void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int 
to_y);
+void ParseWindowName(WMPropList * value, char **winstance, char **wclass, char 
*where);
+void SendHelperMessage(WScreen * scr, char type, int workspace, char *msg);
+
+char *ShrinkString(WMFont * font, char *string, int width);
+char *FindImage(char *paths, char *file);
+char *ExpandOptions(WScreen * scr, char *cmdline);
+char *GetShortcutString(char *text);
+char *GetShortcutKey(WShortKey key);
+char *EscapeWM_CLASS(char *name, char *class);
+char *StrConcatDot(char *a, char *b);
+char *GetCommandForWindow(Window win);
+#endif
diff --git a/src/rootmenu.c b/src/rootmenu.c
index 5b8ff90..db81212 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -41,7 +41,7 @@
 #include "WindowMaker.h"
 #include "actions.h"
 #include "menu.h"
-#include "funcs.h"
+#include "misc.h"
 #include "main.h"
 #include "dialog.h"
 #include "keybind.h"
diff --git a/src/session.c b/src/session.c
index 065e769..c4ba5af 100644
--- a/src/session.c
+++ b/src/session.c
@@ -81,6 +81,7 @@
 #include "application.h"
 #include "appicon.h"
 #include "dock.h"
+#include "misc.h"
 
 #include <WINGs/WUtil.h>
 
diff --git a/src/switchmenu.c b/src/switchmenu.c
index 6569252..a890bbb 100644
--- a/src/switchmenu.c
+++ b/src/switchmenu.c
@@ -33,7 +33,7 @@
 #include "window.h"
 #include "actions.h"
 #include "client.h"
-#include "funcs.h"
+#include "misc.h"
 #include "stacking.h"
 #include "workspace.h"
 #include "framewin.h"
diff --git a/src/switchpanel.c b/src/switchpanel.c
index fcd61fa..4ad9b8c 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -31,7 +31,7 @@
 #include "window.h"
 #include "defaults.h"
 #include "switchpanel.h"
-#include "funcs.h"
+#include "misc.h"
 #include "xinerama.h"
 
 extern Atom _XA_WM_IGNORE_FOCUS_EVENTS;
diff --git a/src/texture.c b/src/texture.c
index a29406a..47258a5 100644
--- a/src/texture.c
+++ b/src/texture.c
@@ -31,7 +31,7 @@
 
 #include "WindowMaker.h"
 #include "texture.h"
-#include "funcs.h"
+#include "misc.h"
 
 extern WPreferences wPreferences;
 
diff --git a/src/wdefaults.c b/src/wdefaults.c
index ce9af5f..f71a8dd 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -38,10 +38,10 @@
 #include "window.h"
 #include "appicon.h"
 #include "screen.h"
-#include "funcs.h"
 #include "workspace.h"
 #include "defaults.h"
 #include "icon.h"
+#include "misc.h"
 
 #define APPLY_VAL(value, flag, attrib)      if (value) {attr->flag = 
getBool(attrib, value); diff --git a/src/window.c b/src/window.c
index c227b4c..9ac5e78 100644
--- a/src/window.c
+++ b/src/window.c
@@ -49,7 +49,6 @@
 #include "properties.h"
 #include "actions.h"
 #include "client.h"
-#include "funcs.h"
 #include "colormap.h"
 #include "keybind.h"
 #include "stacking.h"
@@ -61,6 +60,7 @@
 #include "superfluous.h"
 #include "rootmenu.h"
 #include "placement.h"
+#include "misc.h"
 
 #ifdef MWM_HINTS
 # include "motif.h"
diff --git a/src/winmenu.c b/src/winmenu.c
index 7d49d2b..aa2bb24 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -38,7 +38,7 @@
 #include "client.h"
 #include "application.h"
 #include "keybind.h"
-#include "funcs.h"
+#include "misc.h"
 #include "framewin.h"
 #include "workspace.h"
 #include "winspector.h"
diff --git a/src/winspector.c b/src/winspector.c
index 08066da..41d3afb 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -35,7 +35,6 @@
 #include "framewin.h"
 #include "window.h"
 #include "workspace.h"
-#include "funcs.h"
 #include "defaults.h"
 #include "dialog.h"
 #include "icon.h"
@@ -47,6 +46,7 @@
 #include "dock.h"
 #include "client.h"
 #include "wmspec.h"
+#include "misc.h"
 
 #include <WINGs/WUtil.h>
 
diff --git a/src/workspace.c b/src/workspace.c
index 8b24087..b4cccd0 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -39,7 +39,7 @@
 #include "framewin.h"
 #include "window.h"
 #include "icon.h"
-#include "funcs.h"
+#include "misc.h"
 #include "menu.h"
 #include "application.h"
 #include "dock.h"

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

Summary of changes:
 src/actions.c     |    1 +
 src/appicon.c     |    1 +
 src/client.c      |    1 +
 src/defaults.c    |    1 +
 src/dialog.c      |    2 +-
 src/dock.c        |    1 +
 src/dockedapp.c   |    2 +-
 src/event.c       |    1 +
 src/framewin.c    |    2 +-
 src/funcs.h       |   26 --------------------------
 src/icon.c        |   15 +++++++++------
 src/misc.c        |    7 +++++--
 src/misc.h        |   45 +++++++++++++++++++++++++++++++++++++++++++++
 src/rootmenu.c    |    2 +-
 src/session.c     |    1 +
 src/switchmenu.c  |    2 +-
 src/switchpanel.c |    2 +-
 src/texture.c     |    2 +-
 src/wdefaults.c   |    2 +-
 src/window.c      |    2 +-
 src/winmenu.c     |    2 +-
 src/winspector.c  |    2 +-
 src/workspace.c   |    2 +-
 23 files changed, 78 insertions(+), 46 deletions(-)
 create mode 100644 src/misc.h


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