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 9a34570fe1df853a7cf21ef16fd23ee148782234 (commit)
via 7f8576b8d968b1eca422da20c688ad47cead1f7f (commit)
via 6887c12c6d74a1d87bcf2cc64a77c863051ebfa5 (commit)
via 6fa421a8b4914b6ed728e211e8d127d5eedaef6e (commit)
via 0fe64d31b0818cc3bd1a39b98e6f54bc02562cd7 (commit)
via dd94b98b814038e720fe46669c84802c8ca0b051 (commit)
via c815449e687c1e4bfd921109d24759fab3f0c24c (commit)
via fc9e453de2888536c07457e38ac6d50f18bcc2f7 (commit)
via 02feb72fdc5f0f075fecdf6b0d43a4af56b37030 (commit)
via 42cb1291e3b86921a0e381dac64abd8a80019b3a (commit)
via 7facc79c0cf2a9d1939f78adbff55631546671b0 (commit)
from 5795bb56385847ffcd9e170a8b177cd25685e0ac (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/9a34570fe1df853a7cf21ef16fd23ee148782234
commit 9a34570fe1df853a7cf21ef16fd23ee148782234
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 25 23:39:57 2012 +0200
Remove unused stuff from session.h
The struct WSessionData is not used and the function wSessionGetStateFor
is only defined, remove them.
diff --git a/src/session.h b/src/session.h
index 8ce14b4..4a7b9b4 100644
--- a/src/session.h
+++ b/src/session.h
@@ -22,27 +22,8 @@
#ifndef WMSESSION_H_
#define WMSESSION_H_
-
-typedef struct {
- int x;
- int y;
- unsigned int w; /* client size */
- unsigned int h;
-
- int workspace;
- unsigned shortcuts; /* mask like 1<<shortcut_number */
-
- WWindowAttributes mflags;
- WWindowAttributes flags;
-
- char miniaturized;
- char shaded;
- char maximized;
-} WSessionData;
-
void wSessionSaveState(WScreen *scr);
void wSessionClearState(WScreen *scr);
void wSessionRestoreState(WScreen *scr);
void wSessionRestoreLastWorkspace(WScreen *scr);
-Bool wSessionGetStateFor(WWindow *wwin, WSessionData *state);
#endif
http://repo.or.cz/w/wmaker-crm.git/commit/7f8576b8d968b1eca422da20c688ad47cead1f7f
commit 7f8576b8d968b1eca422da20c688ad47cead1f7f
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 25 23:37:09 2012 +0200
window.h unused variables
These variables are not used and can be removed.
diff --git a/src/window.h b/src/window.h
index c872be9..99e1c24 100644
--- a/src/window.h
+++ b/src/window.h
@@ -264,11 +264,6 @@ typedef struct WWindow {
app */
unsigned int is_dockapp:1; /* 1 if the window belongs to a DockApp */
- unsigned int buttons_dont_fit:1;
- unsigned int rebuild_texture:1; /* the window was resized and
- * gradients should be re-rendered */
- unsigned int needs_full_repaint:1;/* does a full repaint of the
- * window next time it's painted */
unsigned int icon_moved:1; /* icon for this window was moved
* by the user */
unsigned int selected:1; /* multiple window selection */
@@ -331,7 +326,6 @@ typedef struct WSavedState {
unsigned window_shortcuts; /* mask like 1<<shortcut_number */
} WSavedState;
-
typedef struct WWindowState {
char *instance;
char *class;
@@ -341,11 +335,8 @@ typedef struct WWindowState {
struct WWindowState *next;
} WWindowState;
-
typedef void* WMagicNumber;
-
-
void wWindowDestroy(WWindow *wwin);
WWindow *wWindowCreate(void);
@@ -411,5 +402,4 @@ void wWindowDeleteSavedState(WMagicNumber id);
Bool wWindowObscuresWindow(WWindow *wwin, WWindow *obscured);
void wWindowSetOmnipresent(WWindow *wwin, Bool flag);
-
#endif
http://repo.or.cz/w/wmaker-crm.git/commit/6887c12c6d74a1d87bcf2cc64a77c863051ebfa5
commit 6887c12c6d74a1d87bcf2cc64a77c863051ebfa5
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 25 23:06:31 2012 +0200
window.h: Remove unused variables from WWindow struct
The variables waiting_save_ack and dragged_while_fmaximized are not used,
so they can be removed.
diff --git a/src/window.h b/src/window.h
index dfe53b6..c872be9 100644
--- a/src/window.h
+++ b/src/window.h
@@ -279,15 +279,9 @@ typedef struct WWindow {
unsigned int inspector_open:1; /* attrib inspector is already open */
unsigned int destroyed:1; /* window was already destroyed */
-
unsigned int menu_open_for_me:1; /* window commands menu */
-
- unsigned int waiting_save_ack:1; /* waiting for SAVE_YOURSELF ack */
-
unsigned int obscured:1; /* window is obscured */
- unsigned int dragged_while_fmaximized;
-
unsigned int net_skip_pager:1;
unsigned int net_handle_icon:1;
unsigned int net_show_desktop:1;
http://repo.or.cz/w/wmaker-crm.git/commit/6fa421a8b4914b6ed728e211e8d127d5eedaef6e
commit 6fa421a8b4914b6ed728e211e8d127d5eedaef6e
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 25 21:56:19 2012 +0200
Variables user_changed_* can be removed
The variables user_changed_ are set but their values are not checked/used
in the code, so they can be removed.
diff --git a/src/moveres.c b/src/moveres.c
index 6563258..3d3ff7e 100644
--- a/src/moveres.c
+++ b/src/moveres.c
@@ -1471,7 +1471,6 @@ int wKeyboardMoveResizeWindow(WWindow * wwin)
if (opaqueMoveResize) {
XUngrabServer(dpy);
- wwin->flags.user_changed_width = 1;
wWindowConfigure(wwin, src_x + off_x,
src_y + off_y, ww, wh - vert_border);
};
@@ -1518,15 +1517,11 @@ int wKeyboardMoveResizeWindow(WWindow * wwin)
}
}
} else {
- if (wwin->client.width != ww) {
- wwin->flags.user_changed_width
= 1;
+ if (wwin->client.width != ww)
wwin->flags.maximized &=
~(MAX_HORIZONTAL | MAX_MAXIMUS);
- }
- if (wwin->client.height != wh -
vert_border) {
- wwin->flags.user_changed_height
= 1;
+ if (wwin->client.height != wh -
vert_border)
wwin->flags.maximized &=
~(MAX_VERTICAL | MAX_LEFTHALF | MAX_RIGHTHALF | MAX_MAXIMUS);
- }
wWindowConfigure(wwin, src_x + off_x,
src_y + off_y, ww, wh - vert_border);
wWindowSynthConfigureNotify(wwin);
@@ -2047,7 +2042,6 @@ void wMouseResizeWindow(WWindow * wwin, XEvent * ev)
showGeometry(wwin, fx, fy, fx + fw, fy
+ fh, res);
/* Now, continue drawing */
XUngrabServer(dpy);
- wwin->flags.user_changed_width = 1;
moveGeometryDisplayCentered(scr, fx +
fw / 2, fy + fh / 2);
wWindowConfigure(wwin, fx, fy, fw, fh -
vert_border);
showGeometry(wwin, fx, fy, fx + fw, fy
+ fh, res);
@@ -2072,15 +2066,11 @@ void wMouseResizeWindow(WWindow * wwin, XEvent * ev)
WMUnmapWidget(scr->gview);
XUngrabServer(dpy);
- if (wwin->client.width != fw) {
- wwin->flags.user_changed_width = 1;
+ if (wwin->client.width != fw)
wwin->flags.maximized &=
~(MAX_HORIZONTAL | MAX_MAXIMUS);
- }
- if (wwin->client.height != fh - vert_border) {
- wwin->flags.user_changed_height = 1;
+ if (wwin->client.height != fh - vert_border)
wwin->flags.maximized &= ~(MAX_VERTICAL
| MAX_LEFTHALF | MAX_RIGHTHALF | MAX_MAXIMUS);
- }
wWindowConfigure(wwin, fx, fy, fw, fh -
vert_border);
wWindowSynthConfigureNotify(wwin);
diff --git a/src/window.h b/src/window.h
index ae1e704..dfe53b6 100644
--- a/src/window.h
+++ b/src/window.h
@@ -288,8 +288,6 @@ typedef struct WWindow {
unsigned int dragged_while_fmaximized;
- unsigned int user_changed_width:1;
- unsigned int user_changed_height:1;
unsigned int net_skip_pager:1;
unsigned int net_handle_icon:1;
unsigned int net_show_desktop:1;
http://repo.or.cz/w/wmaker-crm.git/commit/0fe64d31b0818cc3bd1a39b98e6f54bc02562cd7
commit 0fe64d31b0818cc3bd1a39b98e6f54bc02562cd7
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 25 21:53:23 2012 +0200
net_state_from_client can be removed
The variable net_state_from_client doesn't change its value in the
code, therefore we don't need to check it in any "if".
diff --git a/src/window.h b/src/window.h
index e2d516a..ae1e704 100644
--- a/src/window.h
+++ b/src/window.h
@@ -290,7 +290,6 @@ typedef struct WWindow {
unsigned int user_changed_width:1;
unsigned int user_changed_height:1;
- unsigned int net_state_from_client:1; /* state hint was set by client
*/
unsigned int net_skip_pager:1;
unsigned int net_handle_icon:1;
unsigned int net_show_desktop:1;
diff --git a/src/wmspec.c b/src/wmspec.c
index 9456841..ae870ea 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -795,9 +795,7 @@ static void updateWorkspaceHint(WWindow * wwin, Bool fake,
Bool del)
static void updateStateHint(WWindow * wwin, Bool changedWorkspace, Bool del)
{ /* changeable */
if (del) {
- if (!wwin->flags.net_state_from_client) {
- XDeleteProperty(dpy, wwin->client_win, net_wm_state);
- }
+ XDeleteProperty(dpy, wwin->client_win, net_wm_state);
} else {
Atom state[15]; /* nr of defined state atoms */
int i = 0;
http://repo.or.cz/w/wmaker-crm.git/commit/dd94b98b814038e720fe46669c84802c8ca0b051
commit dd94b98b814038e720fe46669c84802c8ca0b051
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 25 21:51:47 2012 +0200
Remove unused variable wm_name_changed
wm_name_changed is not used and can be removed.
diff --git a/src/window.c b/src/window.c
index 1c0a39a..d6c697e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1736,8 +1736,6 @@ void wWindowUpdateName(WWindow *wwin, char *newTitle)
if (!wwin->frame)
return;
- wwin->flags.wm_name_changed = 1;
-
if (!newTitle)
title = DEF_WINDOW_TITLE; /* the hint was removed */
else
diff --git a/src/window.h b/src/window.h
index fb72d4e..e2d516a 100644
--- a/src/window.h
+++ b/src/window.h
@@ -290,7 +290,6 @@ typedef struct WWindow {
unsigned int user_changed_width:1;
unsigned int user_changed_height:1;
- unsigned int wm_name_changed:1;
unsigned int net_state_from_client:1; /* state hint was set by client
*/
unsigned int net_skip_pager:1;
unsigned int net_handle_icon:1;
http://repo.or.cz/w/wmaker-crm.git/commit/c815449e687c1e4bfd921109d24759fab3f0c24c
commit c815449e687c1e4bfd921109d24759fab3f0c24c
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 25 21:50:04 2012 +0200
Remove unused wWindowCanReceiveFocus()
The function wWindowCanReceiveFocus() is not used, remove it.
diff --git a/src/window.c b/src/window.c
index 9e44e34..1c0a39a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -421,18 +421,6 @@ void wWindowSetupInitialAttributes(WWindow *wwin, int
*level, int *workspace)
wwin->client_flags.no_focusable = 1;
}
-Bool wWindowCanReceiveFocus(WWindow *wwin)
-{
- if (!wwin->flags.mapped && (!wwin->flags.shaded || wwin->flags.hidden))
- return False;
- if (WFLAGP(wwin, no_focusable) || wwin->flags.miniaturized)
- return False;
- if (wwin->frame->workspace != wwin->screen_ptr->current_workspace)
- return False;
-
- return True;
-}
-
Bool wWindowObscuresWindow(WWindow *wwin, WWindow *obscured)
{
int w1, h1, w2, h2;
diff --git a/src/window.h b/src/window.h
index 28adcc5..fb72d4e 100644
--- a/src/window.h
+++ b/src/window.h
@@ -409,8 +409,6 @@ void wWindowMap(WWindow *wwin);
void wWindowUnmap(WWindow *wwin);
-Bool wWindowCanReceiveFocus(WWindow *wwin);
-
void wWindowDeleteSavedStatesForPID(pid_t pid);
WMagicNumber wWindowAddSavedState(char *instance, char *class, char *command,
http://repo.or.cz/w/wmaker-crm.git/commit/fc9e453de2888536c07457e38ac6d50f18bcc2f7
commit fc9e453de2888536c07457e38ac6d50f18bcc2f7
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 25 21:47:56 2012 +0200
Remove unused variables from WSessionData struct
The variables user_changed_width and user_changed_height are not used,
so they can be safely removed.
diff --git a/src/session.h b/src/session.h
index 0b0e520..8ce14b4 100644
--- a/src/session.h
+++ b/src/session.h
@@ -38,9 +38,6 @@ typedef struct {
char miniaturized;
char shaded;
char maximized;
-
- char user_changed_width;
- char user_changed_height;
} WSessionData;
void wSessionSaveState(WScreen *scr);
http://repo.or.cz/w/wmaker-crm.git/commit/02feb72fdc5f0f075fecdf6b0d43a4af56b37030
commit 02feb72fdc5f0f075fecdf6b0d43a4af56b37030
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 25 13:29:35 2012 +0200
New colormap header file and remove unused functions
The functions related to colormap are moved from funcs.h to the new
file colormap.h. These files are included where needed.
The functions wColormapInstallRoot and wColormapUninstallRoot are
removed, because they are not used.
diff --git a/src/actions.c b/src/actions.c
index 16d93a6..881448f 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -35,7 +35,7 @@
#include "window.h"
#include "client.h"
#include "icon.h"
-#include "funcs.h"
+#include "colormap.h"
#include "application.h"
#include "actions.h"
#include "stacking.h"
diff --git a/src/client.c b/src/client.c
index 93245e0..3287306 100644
--- a/src/client.c
+++ b/src/client.c
@@ -37,7 +37,7 @@
#include "actions.h"
#include "icon.h"
#include "client.h"
-#include "funcs.h"
+#include "colormap.h"
#include "stacking.h"
#include "appicon.h"
#include "appmenu.h"
diff --git a/src/colormap.c b/src/colormap.c
index a4f3af4..3a8906a 100644
--- a/src/colormap.c
+++ b/src/colormap.c
@@ -92,26 +92,6 @@ void wColormapInstallForWindow(WScreen * scr, WWindow * wwin)
XSync(dpy, False);
}
-void wColormapInstallRoot(WScreen * scr)
-{
- if (scr->root_colormap_install_count == 0) {
- wColormapInstallForWindow(scr, NULL);
- scr->original_cmap_window = scr->cmap_window;
- }
- scr->root_colormap_install_count++;
-}
-
-void wColormapUninstallRoot(WScreen * scr)
-{
- if (scr->root_colormap_install_count > 0)
- scr->root_colormap_install_count--;
-
- if (scr->root_colormap_install_count == 0) {
- wColormapInstallForWindow(scr, scr->original_cmap_window);
- scr->original_cmap_window = NULL;
- }
-}
-
void wColormapAllowClientInstallation(WScreen * scr, Bool starting)
{
scr->flags.colormap_stuff_blocked = starting;
diff --git a/src/colormap.h b/src/colormap.h
new file mode 100644
index 0000000..0236541
--- /dev/null
+++ b/src/colormap.h
@@ -0,0 +1,27 @@
+/*
+ * Window Maker window manager
+ *
+ * Copyright (c) 2000-2003 Alfredo K. Kojima
+ *
+ * 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 WMCOLORMAP_H
+#define WMCOLORMAP_H
+
+void wColormapInstallForWindow(WScreen *scr, WWindow *wwin);
+void wColormapAllowClientInstallation(WScreen * scr, Bool starting);
+
+#endif /* WMCOLORMAP_H */
diff --git a/src/event.c b/src/event.c
index 8e287d1..53d5acf 100644
--- a/src/event.c
+++ b/src/event.c
@@ -67,6 +67,7 @@
#include "xinerama.h"
#include "wmspec.h"
#include "rootmenu.h"
+#include "colormap.h"
/******** Global Variables **********/
extern XContext wWinContext;
diff --git a/src/funcs.h b/src/funcs.h
index 65ceb4a..74927b9 100644
--- a/src/funcs.h
+++ b/src/funcs.h
@@ -41,10 +41,6 @@ void OpenWindowMenu2(WWindow *wwin, int x, int y, int
keyboard);
void OpenMiniwindowMenu(WWindow *wwin, int x, int y);
void CloseWindowMenu(WScreen *scr);
void DestroyWindowMenu(WScreen *scr);
-void wColormapInstallForWindow(WScreen *scr, WWindow *wwin);
-void wColormapInstallRoot(WScreen *scr);
-void wColormapUninstallRoot(WScreen *scr);
-void wColormapAllowClientInstallation(WScreen *scr, Bool starting);
void PlaceIcon(WScreen *scr, int *x_ret, int *y_ret, int head);
void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next, Bool
class_only);
void SendHelperMessage(WScreen *scr, char type, int workspace, char *msg);
diff --git a/src/shutdown.c b/src/shutdown.c
index 6d87306..d86bd0d 100644
--- a/src/shutdown.c
+++ b/src/shutdown.c
@@ -36,6 +36,7 @@
#include "session.h"
#include "winspector.h"
#include "wmspec.h"
+#include "colormap.h"
extern Atom _XA_WM_DELETE_WINDOW;
extern Time LastTimestamp;
diff --git a/src/window.c b/src/window.c
index c7f41d0..9e44e34 100644
--- a/src/window.c
+++ b/src/window.c
@@ -50,6 +50,7 @@
#include "actions.h"
#include "client.h"
#include "funcs.h"
+#include "colormap.h"
#include "keybind.h"
#include "stacking.h"
#include "defaults.h"
http://repo.or.cz/w/wmaker-crm.git/commit/42cb1291e3b86921a0e381dac64abd8a80019b3a
commit 42cb1291e3b86921a0e381dac64abd8a80019b3a
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Fri Jun 22 17:35:03 2012 +0200
New move_window function
diff --git a/src/actions.c b/src/actions.c
index 9617fb5..16d93a6 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1767,9 +1767,8 @@ void wArrangeIcons(WScreen *scr, Bool arrangeAll)
if (aicon->x_pos != X || aicon->y_pos != Y) {
#ifdef ANIMATIONS
- if (!wPreferences.no_animations) {
+ if (!wPreferences.no_animations)
SlideWindow(aicon->icon->core->window,
aicon->x_pos, aicon->y_pos, X, Y);
- }
#endif /* ANIMATIONS */
}
wAppIconMove(aicon, X, Y);
@@ -1796,18 +1795,9 @@ void wArrangeIcons(WScreen *scr, Bool arrangeAll)
head = wGetHeadForWindow(wwin);
if (arrangeAll || !wwin->flags.icon_moved) {
- if (wwin->icon_x != X || wwin->icon_y != Y) {
-#ifdef ANIMATIONS
- if (wPreferences.no_animations) {
- XMoveWindow(dpy,
wwin->icon->core->window, X, Y);
- } else {
-
SlideWindow(wwin->icon->core->window, wwin->icon_x,
- wwin->icon_y, X, Y);
- }
-#else
- XMoveWindow(dpy,
wwin->icon->core->window, X, Y);
-#endif /* ANIMATIONS */
- }
+ if (wwin->icon_x != X || wwin->icon_y != Y)
+ move_window(wwin->icon->core->window,
wwin->icon_x, wwin->icon_y, X, Y);
+
wwin->icon_x = X;
wwin->icon_y = Y;
diff --git a/src/dock.c b/src/dock.c
index d5d5003..05824d4 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -592,18 +592,9 @@ static void colectIconsCallback(WMenu *menu, WMenuEntry
*entry)
if (!aicon->docked && wDockFindFreeSlot(clip, &x, &y)) {
x_pos = clip->x_pos + x * ICON_SIZE;
y_pos = clip->y_pos + y * ICON_SIZE;
- if (aicon->x_pos != x_pos || aicon->y_pos != y_pos) {
-#ifdef ANIMATIONS
- if (wPreferences.no_animations) {
- XMoveWindow(dpy,
aicon->icon->core->window, x_pos, y_pos);
- } else {
- SlideWindow(aicon->icon->core->window,
- aicon->x_pos, aicon->y_pos,
x_pos, y_pos);
- }
-#else
- XMoveWindow(dpy, aicon->icon->core->window,
x_pos, y_pos);
-#endif /* ANIMATIONS */
- }
+ if (aicon->x_pos != x_pos || aicon->y_pos != y_pos)
+ move_window(aicon->icon->core->window,
aicon->x_pos, aicon->y_pos, x_pos, y_pos);
+
aicon->attracted = 1;
if (!aicon->icon->shadowed) {
aicon->icon->shadowed = 1;
diff --git a/src/funcs.h b/src/funcs.h
index ff6ee6c..65ceb4a 100644
--- a/src/funcs.h
+++ b/src/funcs.h
@@ -85,6 +85,7 @@ 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);
RImage * wGetImageForWindowName(WScreen *scr, char *winstance, char *wclass);
diff --git a/src/misc.c b/src/misc.c
index 389ad00..3353a63 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -247,6 +247,18 @@ static void eatExpose(void)
}
}
+void move_window(Window win, int from_x, int from_y, int to_x, int to_y)
+{
+#ifdef ANIMATIONS
+ if (wPreferences.no_animations)
+ XMoveWindow(dpy, win, to_x, to_y);
+ else
+ SlideWindow(win, from_x, from_y, to_x, to_y);
+#else
+ XMoveWindow(dpy, win, to_x, to_y);
+#endif
+}
+
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y)
{
time_t time0 = time(NULL);
http://repo.or.cz/w/wmaker-crm.git/commit/7facc79c0cf2a9d1939f78adbff55631546671b0
commit 7facc79c0cf2a9d1939f78adbff55631546671b0
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Fri Jun 22 16:39:46 2012 +0200
Add helper functions for appicon list management
New functions
static void add_to_appicon_list()
static void remove_from_appicon_list()
to add or remove appicons from the app_icon_list, making the code easier
to follow.
diff --git a/src/appicon.c b/src/appicon.c
index 546c3ac..9cf0b14 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -68,6 +68,8 @@ static void iconDblClick(WObjDescriptor * desc, XEvent *
event);
static void iconExpose(WObjDescriptor * desc, XEvent * event);
static void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance,
char *wm_class);
static WAppIcon *wAppIconCreate(WWindow * leader_win);
+static void add_to_appicon_list(WScreen *scr, WAppIcon *appicon);
+static void remove_from_appicon_list(WScreen *scr, WAppIcon *appicon);
/* This function is used if the application is a .app. It checks if it has an
icon in it
* like for example /usr/local/GNUstep/Applications/WPrefs.app/WPrefs.tiff
@@ -114,12 +116,7 @@ WAppIcon *wAppIconCreateForDock(WScreen * scr, char
*command, char *wm_instance,
dicon->yindex = -1;
dicon->xindex = -1;
- dicon->prev = NULL;
- dicon->next = scr->app_icon_list;
- if (scr->app_icon_list)
- scr->app_icon_list->prev = dicon;
-
- scr->app_icon_list = dicon;
+ add_to_appicon_list(scr, dicon);
if (command)
dicon->command = wstrdup(command);
@@ -250,14 +247,8 @@ static WAppIcon *wAppIconCreate(WWindow * leader_win)
/* When no_appicon is set we want to avoid having it on the list
* because otherwise there will be a hole when the icons are
* arranged with wArrangeIcons() */
- if (!WFLAGP(leader_win, no_appicon)) {
- aicon->prev = NULL;
- aicon->next = scr->app_icon_list;
- if (scr->app_icon_list)
- scr->app_icon_list->prev = aicon;
-
- scr->app_icon_list = aicon;
- }
+ if (!WFLAGP(leader_win, no_appicon))
+ add_to_appicon_list(scr, aicon);
if (leader_win->wm_class)
aicon->wm_class = wstrdup(leader_win->wm_class);
@@ -300,16 +291,7 @@ void wAppIconDestroy(WAppIcon * aicon)
if (aicon->wm_class)
wfree(aicon->wm_class);
- if (aicon == scr->app_icon_list) {
- if (aicon->next)
- aicon->next->prev = NULL;
- scr->app_icon_list = aicon->next;
- } else {
- if (aicon->next)
- aicon->next->prev = aicon->prev;
- if (aicon->prev)
- aicon->prev->next = aicon->next;
- }
+ remove_from_appicon_list(scr, aicon);
aicon->destroyed = 1;
wrelease(aicon);
@@ -980,3 +962,29 @@ void create_appicon_from_dock(WWindow *wwin, WApplication
*wapp, Window main_win
save_appicon(wapp->app_icon, True);
}
}
+
+/* Add the appicon to the appiconlist */
+static void add_to_appicon_list(WScreen *scr, WAppIcon *appicon)
+{
+ appicon->prev = NULL;
+ appicon->next = scr->app_icon_list;
+ if (scr->app_icon_list)
+ scr->app_icon_list->prev = appicon;
+
+ scr->app_icon_list = appicon;
+}
+
+/* Remove the appicon from the appiconlist */
+static void remove_from_appicon_list(WScreen *scr, WAppIcon *appicon)
+{
+ if (appicon == scr->app_icon_list) {
+ if (appicon->next)
+ appicon->next->prev = NULL;
+ scr->app_icon_list = appicon->next;
+ } else {
+ if (appicon->next)
+ appicon->next->prev = appicon->prev;
+ if (appicon->prev)
+ appicon->prev->next = appicon->next;
+ }
+}
-----------------------------------------------------------------------
Summary of changes:
src/actions.c | 20 +++----------
src/appicon.c | 56 ++++++++++++++++++++++-----------------
src/client.c | 2 +-
src/colormap.c | 20 --------------
src/{rootmenu.h => colormap.h} | 14 ++++-----
src/dock.c | 15 ++--------
src/event.c | 1 +
src/funcs.h | 5 +---
src/misc.c | 12 ++++++++
src/moveres.c | 18 +++----------
src/session.h | 22 ---------------
src/shutdown.c | 1 +
src/window.c | 15 +----------
src/window.h | 22 ---------------
src/wmspec.c | 4 +--
15 files changed, 68 insertions(+), 159 deletions(-)
copy src/{rootmenu.h => colormap.h} (76%)
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].