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 556b0d77a1414f47b3dbf467de2841ee79db3b04 (commit)
via 9cb4388180029208ee1226e8e48e77978470a109 (commit)
via 371818fe368d8f034c68ca1a93af83cb40b536a8 (commit)
from 238b8ed3ca301ee027e11fe5b7dbd3627d61f265 (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/556b0d77a1414f47b3dbf467de2841ee79db3b04
commit 556b0d77a1414f47b3dbf467de2841ee79db3b04
Author: David Maciejak <[email protected]>
Date: Mon Aug 25 11:42:39 2014 +0700
wmaker: update src/action.c coding style
This patch is updating the coding style based on checkpatch output
and as suggested by Rodolfo it also inverts the condition test
in getAnimationGeometry fct to return earlier when possible.
diff --git a/src/actions.c b/src/actions.c
index 8a78113a..b8e4fc4e 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -4,6 +4,7 @@
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
+ * Copyright (c) 2014 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
@@ -60,12 +61,12 @@ static struct {
int steps;
int delay;
} shadePars[5] = {
- {
- SHADE_STEPS_UF, SHADE_DELAY_UF}, {
- SHADE_STEPS_F, SHADE_DELAY_F}, {
- SHADE_STEPS_M, SHADE_DELAY_M}, {
- SHADE_STEPS_S, SHADE_DELAY_S}, {
-SHADE_STEPS_US, SHADE_DELAY_US}};
+ { SHADE_STEPS_UF, SHADE_DELAY_UF },
+ { SHADE_STEPS_F, SHADE_DELAY_F },
+ { SHADE_STEPS_M, SHADE_DELAY_M },
+ { SHADE_STEPS_S, SHADE_DELAY_S },
+ { SHADE_STEPS_US, SHADE_DELAY_US }
+};
#define UNSHADE 0
#define SHADE 1
@@ -84,7 +85,8 @@ static int compareTimes(Time t1, Time t2)
#ifdef ANIMATIONS
static void shade_animate(WWindow *wwin, Bool what);
#else
-static inline void shade_animate(WWindow *wwin, Bool what) {
+static inline void shade_animate(WWindow *wwin, Bool what)
+{
/*
* This function is empty on purpose, so tell the compiler
* to not warn about parameters being not used
@@ -97,13 +99,13 @@ static inline void shade_animate(WWindow *wwin, Bool what) {
/*
*----------------------------------------------------------------------
* wSetFocusTo--
- * Changes the window focus to the one passed as argument.
+ * Changes the window focus to the one passed as argument.
* If the window to focus is not already focused, it will be brought
* to the head of the list of windows. Previously focused window is
* unfocused.
*
* Side effects:
- * Window list may be reordered and the window focus is changed.
+ * Window list may be reordered and the window focus is changed.
*
*----------------------------------------------------------------------
*/
@@ -291,9 +293,9 @@ void wUnshadeWindow(WWindow *wwin)
static void save_old_geometry(WWindow *wwin, int directions)
{
/* never been saved? */
- if (! wwin->old_geometry.width)
+ if (!wwin->old_geometry.width)
directions |= SAVE_GEOMETRY_X | SAVE_GEOMETRY_WIDTH;
- if (! wwin->old_geometry.height)
+ if (!wwin->old_geometry.height)
directions |= SAVE_GEOMETRY_Y | SAVE_GEOMETRY_HEIGHT;
if (directions & SAVE_GEOMETRY_X)
@@ -391,9 +393,8 @@ void wMaximizeWindow(WWindow *wwin, int directions)
/* Only save directions, not kbd or xinerama hints */
directions &= (MAX_HORIZONTAL | MAX_VERTICAL | MAX_LEFTHALF |
MAX_RIGHTHALF | MAX_TOPHALF | MAX_BOTTOMHALF | MAX_MAXIMUS);
- if (WFLAGP(wwin, full_maximize)) {
+ if (WFLAGP(wwin, full_maximize))
usableArea = totalArea;
- }
half_scr_width = (usableArea.x2 - usableArea.x1)/2;
half_scr_height = (usableArea.y2 - usableArea.y1)/2;
@@ -584,8 +585,7 @@ static void find_Maximus_geometry(WWindow *wwin, WArea
usableArea, int *new_x, i
remember_geometry(wwin, &orig.left, &orig.top, &orig.width,
&orig.height);
orig.bottom = orig.top + orig.height;
orig.right = orig.left + orig.width;
- }
- else
+ } else
set_window_coords(wwin, &orig);
/* Try to fully maximize first, then readjust later */
@@ -665,7 +665,7 @@ static void find_Maximus_geometry(WWindow *wwin, WArea
usableArea, int *new_x, i
*new_x = new.left;
*new_y = new.top;
/* xcalc needs -7 here, but other apps don't */
- *new_height = new.bottom - new.top - adjust_height - 1;;
+ *new_height = new.bottom - new.top - adjust_height - 1;
*new_width = new.right - new.left;
}
@@ -735,11 +735,10 @@ void wUnfullscreenWindow(WWindow *wwin)
wwin->flags.fullscreen = False;
- if (WFLAGP(wwin, sunken)) {
+ if (WFLAGP(wwin, sunken))
ChangeStackingLevel(wwin->frame->core, WMSunkenLevel);
- } else if (WFLAGP(wwin, floating)) {
+ else if (WFLAGP(wwin, floating))
ChangeStackingLevel(wwin->frame->core, WMFloatingLevel);
- }
wWindowConfigure(wwin, wwin->bfs_geometry.x, wwin->bfs_geometry.y,
wwin->bfs_geometry.width, wwin->bfs_geometry.height);
@@ -926,15 +925,13 @@ static void animateResizeZoom(WScreen *scr, int x, int y,
int w, int h, int fx,
}
}
- for (j = 0; j < FRAMES; j++) {
+ for (j = 0; j < FRAMES; j++)
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, (int)cx[j],
(int)cy[j], (int)cw[j], (int)ch[j]);
- }
XFlush(dpy);
wusleep(MINIATURIZE_ANIMATION_DELAY_Z);
- for (j = 0; j < FRAMES; j++) {
+ for (j = 0; j < FRAMES; j++)
XDrawRectangle(dpy, scr->root_win, scr->frame_gc, (int)cx[j],
(int)cy[j], (int)cw[j], (int)ch[j]);
- }
XUngrabServer(dpy);
}
@@ -949,9 +946,8 @@ void animateResize(WScreen *scr, int x, int y, int w, int
h, int fx, int fy, int
if (style == WIS_NONE)
return;
- if (style == WIS_RANDOM) {
+ if (style == WIS_RANDOM)
style = rand() % 3;
- }
switch (style) {
case WIS_TWIST:
@@ -994,11 +990,10 @@ static void unmapTransientsFor(WWindow *wwin)
&& (tmp->flags.mapped || wwin->screen_ptr->flags.startup ||
tmp->flags.shaded)) {
unmapTransientsFor(tmp);
tmp->flags.miniaturized = 1;
- if (!tmp->flags.shaded) {
+ if (!tmp->flags.shaded)
wWindowUnmap(tmp);
- } else {
+ else
XUnmapWindow(dpy, tmp->frame->core->window);
- }
/*
if (!tmp->flags.shaded)
*/
@@ -1021,11 +1016,10 @@ static void mapTransientsFor(WWindow *wwin)
&& tmp->icon == NULL) {
mapTransientsFor(tmp);
tmp->flags.miniaturized = 0;
- if (!tmp->flags.shaded) {
+ if (!tmp->flags.shaded)
wWindowMap(tmp);
- } else {
+ else
XMapWindow(dpy, tmp->frame->core->window);
- }
tmp->flags.semi_focused = 0;
/*
if (!tmp->flags.shaded)
@@ -1038,7 +1032,7 @@ static void mapTransientsFor(WWindow *wwin)
}
}
-static WWindow *recursiveTransientFor(WWindow * wwin)
+static WWindow *recursiveTransientFor(WWindow *wwin)
{
int i;
@@ -1062,33 +1056,32 @@ static WWindow *recursiveTransientFor(WWindow * wwin)
static int getAnimationGeometry(WWindow *wwin, int *ix, int *iy, int *iw, int
*ih)
{
- if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations
- && !wwin->flags.skip_next_animation && wwin->icon != NULL) {
- if (!wPreferences.disable_miniwindows
- && !wwin->flags.net_handle_icon) {
+ if (wwin->screen_ptr->flags.startup || wPreferences.no_animations
+ || wwin->flags.skip_next_animation || wwin->icon == NULL)
+ return 0;
+
+ if (!wPreferences.disable_miniwindows && !wwin->flags.net_handle_icon) {
+ *ix = wwin->icon_x;
+ *iy = wwin->icon_y;
+ *iw = wwin->icon->core->width;
+ *ih = wwin->icon->core->height;
+ } else {
+ if (wwin->flags.net_handle_icon) {
*ix = wwin->icon_x;
*iy = wwin->icon_y;
- *iw = wwin->icon->core->width;
- *ih = wwin->icon->core->height;
+ *iw = wwin->icon_w;
+ *ih = wwin->icon_h;
} else {
- if (wwin->flags.net_handle_icon) {
- *ix = wwin->icon_x;
- *iy = wwin->icon_y;
- *iw = wwin->icon_w;
- *ih = wwin->icon_h;
- } else {
- *ix = 0;
- *iy = 0;
- *iw = wwin->screen_ptr->scr_width;
- *ih = wwin->screen_ptr->scr_height;
- }
+ *ix = 0;
+ *iy = 0;
+ *iw = wwin->screen_ptr->scr_width;
+ *ih = wwin->screen_ptr->scr_height;
}
- return 1;
}
- return 0;
+ return 1;
}
-void wIconifyWindow(WWindow * wwin)
+void wIconifyWindow(WWindow *wwin)
{
XWindowAttributes attribs;
int present;
@@ -1181,10 +1174,9 @@ void wIconifyWindow(WWindow * wwin)
flushExpose();
#ifdef ANIMATIONS
- if (getAnimationGeometry(wwin, &ix, &iy, &iw, &ih)) {
+ if (getAnimationGeometry(wwin, &ix, &iy, &iw, &ih))
animateResize(wwin->screen_ptr, wwin->frame_x,
wwin->frame_y,
wwin->frame->core->width,
wwin->frame->core->height, ix, iy, iw, ih);
- }
#endif
}
@@ -1231,9 +1223,8 @@ void wIconifyWindow(WWindow * wwin)
ProcessPendingEvents();
/* the window can disappear while
ProcessPendingEvents() runs */
- if (!wWindowFor(clientwin)) {
+ if (!wWindowFor(clientwin))
return;
- }
}
#endif
}
@@ -1302,11 +1293,10 @@ void wDeiconifyWindow(WWindow *wwin)
if (!netwm_hidden) {
#ifdef ANIMATIONS
int ix, iy, iw, ih;
- if (getAnimationGeometry(wwin, &ix, &iy, &iw, &ih)) {
+ if (getAnimationGeometry(wwin, &ix, &iy, &iw, &ih))
animateResize(wwin->screen_ptr, ix, iy, iw, ih,
wwin->frame_x, wwin->frame_y,
wwin->frame->core->width,
wwin->frame->core->height);
- }
#endif
wwin->flags.skip_next_animation = 0;
XGrabServer(dpy);
@@ -1375,9 +1365,8 @@ static void hideWindow(WIcon *icon, int icon_x, int
icon_y, WWindow *wwin, int a
return;
}
- if (wwin->flags.inspector_open) {
+ if (wwin->flags.inspector_open)
wHideInspectorForWindow(wwin);
- }
wwin->flags.hidden = 1;
wWindowUnmap(wwin);
@@ -1517,9 +1506,8 @@ void wHideApplication(WApplication *wapp)
while (wlist) {
if (wlist->main_window == wapp->main_window) {
- if (wlist->flags.focused) {
+ if (wlist->flags.focused)
hadfocus = 1;
- }
if (wapp->app_icon) {
hideWindow(wapp->app_icon->icon,
wapp->app_icon->x_pos,
wapp->app_icon->y_pos, wlist,
animate);
@@ -1580,9 +1568,8 @@ static void unhideWindow(WIcon *icon, int icon_x, int
icon_y, WWindow *wwin, int
wwin->flags.mapped = 1;
wRaiseFrame(wwin->frame->core);
}
- if (wwin->flags.inspector_open) {
+ if (wwin->flags.inspector_open)
wUnhideInspectorForWindow(wwin);
- }
WMPostNotificationName(WMNChangedState, wwin, "hide");
}
@@ -1624,9 +1611,8 @@ void wUnhideApplication(WApplication *wapp, Bool
miniwindows, Bool bringToCurren
int x, y;
PlaceIcon(scr, &x, &y,
wGetHeadForWindow(wlist));
- if (wlist->icon_x != x ||
wlist->icon_y != y) {
+ if (wlist->icon_x != x ||
wlist->icon_y != y)
XMoveWindow(dpy,
wlist->icon->core->window, x, y);
- }
wlist->icon_x = x;
wlist->icon_y = y;
XMapWindow(dpy,
wlist->icon->core->window);
@@ -1637,9 +1623,8 @@ void wUnhideApplication(WApplication *wapp, Bool
miniwindows, Bool bringToCurren
if (bringToCurrentWS)
wWindowChangeWorkspace(wlist,
w_global.workspace.current);
wlist->flags.hidden = 0;
- if (miniwindows && wlist->frame->workspace ==
w_global.workspace.current) {
+ if (miniwindows && wlist->frame->workspace ==
w_global.workspace.current)
wDeiconifyWindow(wlist);
- }
WMPostNotificationName(WMNChangedState, wlist,
"hide");
} else if (wlist->flags.shaded) {
if (bringToCurrentWS)
@@ -1648,9 +1633,8 @@ void wUnhideApplication(WApplication *wapp, Bool
miniwindows, Bool bringToCurren
wRaiseFrame(wlist->frame->core);
if (wlist->frame->workspace ==
w_global.workspace.current) {
XMapWindow(dpy,
wlist->frame->core->window);
- if (miniwindows) {
+ if (miniwindows)
wUnshadeWindow(wlist);
- }
}
WMPostNotificationName(WMNChangedState, wlist,
"hide");
} else if (wlist->flags.hidden) {
@@ -1804,12 +1788,12 @@ void wArrangeIcons(WScreen *scr, Bool arrangeAll)
}
#define X ((wPreferences.icon_yard & IY_VERT) - ? vars[head].xo +
vars[head].xs*(vars[head].si*isize) - : vars[head].xo +
vars[head].xs*(vars[head].pi*isize))
+ ? vars[head].xo + vars[head].xs*(vars[head].si*isize) + : vars[head].xo
+ vars[head].xs*(vars[head].pi*isize))
#define Y ((wPreferences.icon_yard & IY_VERT) - ? vars[head].yo +
vars[head].ys*(vars[head].pi*isize) - : vars[head].yo +
vars[head].ys*(vars[head].si*isize))
+ ? vars[head].yo + vars[head].ys*(vars[head].pi*isize) + : vars[head].yo
+ vars[head].ys*(vars[head].si*isize))
/* arrange application icons */
aicon = w_global.app_icon_list;
@@ -1867,9 +1851,8 @@ void wArrangeIcons(WScreen *scr, Bool arrangeAll)
}
}
}
- if (arrangeAll) {
+ if (arrangeAll)
wwin->flags.icon_moved = 0;
- }
/* we reversed the order, so we use next */
wwin = wwin->next;
}
@@ -1888,9 +1871,8 @@ void wSelectWindow(WWindow *wwin, Bool flag)
else
XSetWindowBorder(dpy, wwin->frame->core->window,
scr->white_pixel);
- if (!HAS_BORDER(wwin)) {
+ if (!HAS_BORDER(wwin))
XSetWindowBorderWidth(dpy, wwin->frame->core->window,
wwin->screen_ptr->frame_border_width);
- }
if (!scr->selected_windows)
scr->selected_windows = WMCreateArray(4);
@@ -1909,13 +1891,11 @@ void wSelectWindow(WWindow *wwin, Bool flag)
XSetWindowBorder(dpy,
wwin->frame->core->window, scr->frame_border_pixel);
}
- if (!HAS_BORDER(wwin)) {
+ if (!HAS_BORDER(wwin))
XSetWindowBorderWidth(dpy, wwin->frame->core->window,
0);
- }
- if (scr->selected_windows) {
+ if (scr->selected_windows)
WMRemoveFromArray(scr->selected_windows, wwin);
- }
}
}
@@ -1959,7 +1939,7 @@ static void shade_animate(WWindow *wwin, Bool what)
if (wwin->flags.skip_next_animation || wPreferences.no_animations)
return;
- switch(what) {
+ switch (what) {
case SHADE:
if (!wwin->screen_ptr->flags.startup) {
/* do the shading animation */
@@ -1977,11 +1957,10 @@ static void shade_animate(WWindow *wwin, Bool what)
if (time(NULL) - time0 > MAX_ANIMATION_TIME)
break;
- if (SHADE_DELAY > 0) {
- wusleep(SHADE_DELAY * 1000L);
- } else {
+ if (SHADE_DELAY > 0)
+ wusleep(SHADE_DELAY * 1000L);
+ else
wusleep(10);
- }
h -= s;
y -= s;
}
@@ -2002,11 +1981,10 @@ static void shade_animate(WWindow *wwin, Bool what)
XResizeWindow(dpy, wwin->frame->core->window,
w, h);
XMoveWindow(dpy, wwin->client_win, 0, y);
XFlush(dpy);
- if (SHADE_DELAY > 0) {
+ if (SHADE_DELAY > 0)
wusleep(SHADE_DELAY * 2000L / 3);
- } else {
+ else
wusleep(10);
- }
h += s;
y += s;
http://repo.or.cz/w/wmaker-crm.git/commit/9cb4388180029208ee1226e8e48e77978470a109
commit 9cb4388180029208ee1226e8e48e77978470a109
Author: David Maciejak <[email protected]>
Date: Mon Aug 25 13:14:34 2014 +0700
wmaker: fix control shortcut label in window menu
This patch is fixing the shortcut label used in window menu.
As now when a 'control' shortcut was used, the label displayed
was 'bug' cause GetShortcutString fct which is calling wXModifierFromKey
fct was waiting for a 'Control' static string not the default one
set to 'Ctrl' string.
diff --git a/src/defaults.c b/src/defaults.c
index 5e305c90..332c0eb3 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -567,7 +567,7 @@ WDefaultEntry optionList[] = {
NULL, getColor, setIconTitleBack, NULL, NULL},
{"SwitchPanelImages", "(swtile.png, swback.png, 30, 40)", &wPreferences,
NULL, getPropList, setSwPOptions, NULL, NULL},
- {"ModifierKeyLabels", "("Shift+", "Ctrl+", "Mod1+", "Mod2+", "Mod3+",
"Mod4+", "Mod5+")", &wPreferences,
+ {"ModifierKeyLabels", "("Shift+", "Control+", "Mod1+", "Mod2+",
"Mod3+", "Mod4+", "Mod5+")", &wPreferences,
NULL, getPropList, setModifierKeyLabels, NULL, NULL},
{"FrameBorderWidth", "1", NULL,
NULL, getInt, setFrameBorderWidth, NULL, NULL},
diff --git a/src/misc.c b/src/misc.c
index 572fbe42..3d78c930 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -732,7 +732,6 @@ char *GetShortcutString(const char *shortcut)
{
char *buffer = NULL;
char *k;
- /* KeySym ksym; */
int control = 0;
char *tmp, *text;
@@ -788,7 +787,7 @@ char *GetShortcutKey(WShortKey key)
if (!k) return NULL;
char **m = wPreferences.modifier_labels;
- if (key.modifier & ControlMask) tmp = wstrappend(tmp, m[1] ? m[1] :
"Ctrl+");
+ if (key.modifier & ControlMask) tmp = wstrappend(tmp, m[1] ? m[1] :
"Control+");
if (key.modifier & ShiftMask) tmp = wstrappend(tmp, m[0] ? m[0] :
"Shift+");
if (key.modifier & Mod1Mask) tmp = wstrappend(tmp, m[2] ? m[2] :
"Mod1+");
if (key.modifier & Mod2Mask) tmp = wstrappend(tmp, m[3] ? m[3] :
"Mod2+");
http://repo.or.cz/w/wmaker-crm.git/commit/371818fe368d8f034c68ca1a93af83cb40b536a8
commit 371818fe368d8f034c68ca1a93af83cb40b536a8
Author: David Maciejak <[email protected]>
Date: Sat Aug 23 19:14:09 2014 +0800
wmaker: fix deiconify window on double-click
This patch is fixing the RenderBadPicture X errors on deiconifying
window using double-click.
Background:
I also experienced this issue these days, after checking it was not
introduce with latest apercu feature I decided to dig into it.
As far as I saw in the archive it was first reported by Rodolfo in June
2012.
Each time a window is deiconify using double-click, the error below
is reported in the session error log:
wmaker(catchXError(startup.c:177)): warning: internal X error:
RenderBadPicture (invalid Picture parameter)
Request code: 152
Request minor code: 7
Resource ID: 0x6000a4
Error serial: 9269
So I decided to track when the issue is happening,
from src/action.c wDeiconifyWindow then in src/icon.c wIconDestroy
then in src/wcore.c wCoreDestroy.
At that stage, all the structures I checked are cleaned up properly
during the icon destroy process.
So I also checked when the issue is generated, I ended in
wrlib/xutil.c RCreateXImage (in the share memory extension code)
XSync(context->dpy, False);
oldErrorHandler = XSetErrorHandler(errorHandler);
XShmAttach(context->dpy, &rximg->info);
XSync(context->dpy, False);
XSetErrorHandler(oldErrorHandler);
At this point I was quite lost, cause it means the error could
have been in the server error queue already.
Facts, seems the issue is appearing only on double-clicking the miniwindow,
but not when "Deminiaturize" is clicked from the right-click contextual
menu.
I also checked the code from winmenu.c when the action MC_MINIATURIZE
is selected from execMenuCommand fct, but it was just calling
wDeiconifyWindow function. Hum.
So, after one full day of thought I tested to just change the focus before
double-clicking the miniwindow, and bingo it works.
That means when the icon is destroyed the X server still has a reference
on it that's generating the issue.
diff --git a/src/actions.c b/src/actions.c
index aa88633f..8a78113a 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1324,7 +1324,7 @@ void wDeiconifyWindow(WWindow *wwin)
if (!wPreferences.disable_miniwindows && wwin->icon != NULL
&& !wwin->flags.net_handle_icon) {
RemoveFromStackList(wwin->icon->core);
- /* removeIconGrabs(wwin->icon); */
+ wSetFocusTo(wwin->screen_ptr, wwin);
wIconDestroy(wwin->icon);
wwin->icon = NULL;
}
-----------------------------------------------------------------------
Summary of changes:
src/actions.c | 160 ++++++++++++++++++++++++--------------------------------
src/defaults.c | 2 +-
src/misc.c | 3 +-
3 files changed, 71 insertions(+), 94 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].