summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/wobbly.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-18 16:53:23 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-18 16:53:23 +0000
commit2e6d7b6b5aa46a28b2377e9aa8148fcd771f9404 (patch)
treec27f0915b04b75d9573e140314e1411b9b5d37b7 /beryl-plugins/src/wobbly.c
parent4f1dfda90140e83041d2d0398b186c0184f559f8 (diff)
downloadmarex-dev-2e6d7b6b5aa46a28b2377e9aa8148fcd771f9404.tar.gz
marex-dev-2e6d7b6b5aa46a28b2377e9aa8148fcd771f9404.tar.bz2
wobbly plugin: revert ignoring of resize notifies without a resize diff
git-svn-id: file:///beryl/trunk@2847 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/wobbly.c')
-rw-r--r--beryl-plugins/src/wobbly.c98
1 files changed, 47 insertions, 51 deletions
diff --git a/beryl-plugins/src/wobbly.c b/beryl-plugins/src/wobbly.c
index 31a438c..962439e 100644
--- a/beryl-plugins/src/wobbly.c
+++ b/beryl-plugins/src/wobbly.c
@@ -3013,73 +3013,69 @@ static void wobblyWindowResizeNotify(CompWindow * w, int dx, int dy, int dwidth,
WOBBLY_SCREEN(w->screen);
WOBBLY_WINDOW(w);
- if (dx || dy || dwidth || dheight)
+ if (ws->opt[WOBBLY_SCREEN_OPTION_MAXIMIZE_EFFECT].value.b &&
+ isWobblyWin(w) && ((w->state | ww->state) & MAXIMIZE_STATE))
{
- if (ws->opt[WOBBLY_SCREEN_OPTION_MAXIMIZE_EFFECT].value.b &&
- isWobblyWin(w) && ((w->state | ww->state) & MAXIMIZE_STATE))
+ ww->state &= ~MAXIMIZE_STATE;
+ ww->state |= w->state & MAXIMIZE_STATE;
+ if (wobblyEnsureModel(w))
{
- ww->state &= ~MAXIMIZE_STATE;
- ww->state |= w->state & MAXIMIZE_STATE;
- if (wobblyEnsureModel(w))
+ if (w->state & MAXIMIZE_STATE)
{
- if (w->state & MAXIMIZE_STATE)
- {
- if (!ww->grabbed && ww->model->anchorObject)
- {
- ww->model->anchorObject->immobile = FALSE;
- ww->model->anchorObject = NULL;
- }
-
- modelAddEdgeAnchors(ww->model,
- WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
- }
- else
+ if (!ww->grabbed && ww->model->anchorObject)
{
- modelRemoveEdgeAnchors(ww->model,
- WIN_X(w), WIN_Y(w),
- WIN_W(w), WIN_H(w));
- modelSetMiddleAnchor(ww->model,
- WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
+ ww->model->anchorObject->immobile = FALSE;
+ ww->model->anchorObject = NULL;
}
+
+ modelAddEdgeAnchors(ww->model,
+ WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
+ }
+ else
+ {
+ modelRemoveEdgeAnchors(ww->model,
+ WIN_X(w), WIN_Y(w),
+ WIN_W(w), WIN_H(w));
+ modelSetMiddleAnchor(ww->model,
+ WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
+ }
- modelInitSprings(ww->model,
- WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
+ modelInitSprings(ww->model,
+ WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
- ww->friction =
- ws->opt[WOBBLY_SCREEN_OPTION_MAXIMIZE_FRICTION].value.f;
- ww->spring_k =
- ws->opt[WOBBLY_SCREEN_OPTION_MAXIMIZE_SPRING_K].value.f;
+ ww->friction =
+ ws->opt[WOBBLY_SCREEN_OPTION_MAXIMIZE_FRICTION].value.f;
+ ww->spring_k =
+ ws->opt[WOBBLY_SCREEN_OPTION_MAXIMIZE_SPRING_K].value.f;
- ww->wobbly |= WobblyInitial;
- ws->wobblyWindows |= ww->wobbly;
+ ww->wobbly |= WobblyInitial;
+ ws->wobblyWindows |= ww->wobbly;
- damagePendingOnScreen(w->screen);
- }
+ damagePendingOnScreen(w->screen);
}
- else if (ww->model)
- {
- if (!ww->wobbly)
- modelInitObjects(ww->model,
- WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
+ }
+ else if (ww->model)
+ {
+ if (!ww->wobbly)
+ modelInitObjects(ww->model,
+ WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
- modelInitSprings(ww->model, WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
- }
+ modelInitSprings(ww->model, WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
+ }
- /* update grab */
- if (ww->model && ww->grabbed)
- {
- if (ww->model->anchorObject)
- ww->model->anchorObject->immobile = FALSE;
+ /* update grab */
+ if (ww->model && ww->grabbed)
+ {
+ if (ww->model->anchorObject)
+ ww->model->anchorObject->immobile = FALSE;
- ww->model->anchorObject = modelFindNearestObject(ww->model,
- w->screen->display->pointerX,
- w->screen->display->pointerY);
+ ww->model->anchorObject = modelFindNearestObject(ww->model,
+ w->screen->display->pointerX, w->screen->display->pointerY);
- ww->model->anchorObject->immobile = TRUE;
+ ww->model->anchorObject->immobile = TRUE;
- modelAdjustObjectPosition(ww->model, ww->model->anchorObject,
+ modelAdjustObjectPosition(ww->model, ww->model->anchorObject,
WIN_X(w), WIN_Y(w), WIN_W(w), WIN_H(w));
- }
}
UNWRAP(ws, w->screen, windowResizeNotify);