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 adebdf41c6ff33648fd884599e35b20a448500cc (commit)
from ef659ca1fb6f8c442a9b51754b695d8d5fdb423f (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/adebdf41c6ff33648fd884599e35b20a448500cc
commit adebdf41c6ff33648fd884599e35b20a448500cc
Author: David Maciejak <[email protected]>
Date: Fri Aug 22 19:29:19 2014 +0800
wmaker: src/action.c merge duplicate code
This patch is merging some duplicate code related
to animation position.
diff --git a/src/actions.c b/src/actions.c
index ae326a11..aa88633f 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1060,6 +1060,34 @@ static WWindow *recursiveTransientFor(WWindow * wwin)
return 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) {
+ *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_w;
+ *ih = wwin->icon_h;
+ } else {
+ *ix = 0;
+ *iy = 0;
+ *iw = wwin->screen_ptr->scr_width;
+ *ih = wwin->screen_ptr->scr_height;
+ }
+ }
+ return 1;
+ }
+ return 0;
+}
+
void wIconifyWindow(WWindow * wwin)
{
XWindowAttributes attribs;
@@ -1137,6 +1165,9 @@ void wIconifyWindow(WWindow * wwin)
unmapTransientsFor(wwin);
if (present) {
+#ifdef ANIMATIONS
+ int ix, iy, iw, ih;
+#endif
XUngrabPointer(dpy, CurrentTime);
wWindowUnmap(wwin);
/* let all Expose events arrive so that we can repaint
@@ -1150,28 +1181,7 @@ void wIconifyWindow(WWindow * wwin)
flushExpose();
#ifdef ANIMATIONS
- if (!wwin->screen_ptr->flags.startup &&
!wwin->flags.skip_next_animation
- && !wPreferences.no_animations) {
- int ix, iy, iw, ih;
-
- 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_w;
- ih = wwin->icon_h;
- } else {
- ix = 0;
- iy = 0;
- iw = wwin->screen_ptr->scr_width;
- ih = wwin->screen_ptr->scr_height;
- }
- }
+ 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);
}
@@ -1291,34 +1301,13 @@ void wDeiconifyWindow(WWindow *wwin)
/* if the window is in another workspace, do it silently */
if (!netwm_hidden) {
#ifdef ANIMATIONS
- if (!wwin->screen_ptr->flags.startup &&
!wPreferences.no_animations
- && !wwin->flags.skip_next_animation && wwin->icon != NULL) {
- int ix, iy, iw, ih;
-
- 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_w;
- ih = wwin->icon_h;
- } else {
- ix = 0;
- iy = 0;
- iw = wwin->screen_ptr->scr_width;
- ih = wwin->screen_ptr->scr_height;
- }
- }
+ int 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 /* ANIMATIONS */
+#endif
wwin->flags.skip_next_animation = 0;
XGrabServer(dpy);
if (!wwin->flags.shaded)
-----------------------------------------------------------------------
Summary of changes:
src/actions.c | 81 ++++++++++++++++++++++++--------------------------------
1 files changed, 35 insertions(+), 46 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].