[Xfce4-commits] [xfce/xfwm4] 01/01: Fix gravity on configure request
noreply at xfce.org
noreply at xfce.org
Mon Jan 5 23:33:58 CET 2015
This is an automated email from the git hooks/post-receive script.
olivier pushed a commit to branch master
in repository xfce/xfwm4.
commit 62edeb719933e97696f948a44f33979ee744de36
Author: Olivier Fourdan <ofourdan at redhat.com>
Date: Mon Jan 5 23:21:16 2015 +0100
Fix gravity on configure request
Bug: 3634
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
src/client.c | 48 ++++++++++++++++++++++++------------------------
src/events.c | 2 +-
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/src/client.c b/src/client.c
index a93cdcc..37ecae8 100644
--- a/src/client.c
+++ b/src/client.c
@@ -463,46 +463,46 @@ clientCoordGravitate (Client *c, int gravity, int mode, int *x, int *y)
switch (gravity)
{
case CenterGravity:
- dx = (c->border_width * 2) - ((frameLeft (c) +
- frameRight (c)) / 2);
- dy = (c->border_width * 2) - ((frameTop (c) +
- frameBottom (c)) / 2);
+ dx = (c->border_width * 2) - ((frameExtentLeft (c) +
+ frameExtentRight (c)) / 2);
+ dy = (c->border_width * 2) - ((frameExtentTop (c) +
+ frameExtentBottom (c)) / 2);
break;
case NorthGravity:
- dx = (c->border_width * 2) - ((frameLeft (c) +
- frameRight (c)) / 2);
- dy = frameTop (c);
+ dx = (c->border_width * 2) - ((frameExtentLeft (c) +
+ frameExtentRight (c)) / 2);
+ dy = frameExtentTop (c);
break;
case SouthGravity:
- dx = (c->border_width * 2) - ((frameLeft (c) +
- frameRight (c)) / 2);
- dy = (c->border_width * 2) - frameBottom (c);
+ dx = (c->border_width * 2) - ((frameExtentLeft (c) +
+ frameExtentRight (c)) / 2);
+ dy = (c->border_width * 2) - frameExtentBottom (c);
break;
case EastGravity:
- dx = (c->border_width * 2) - frameRight (c);
- dy = (c->border_width * 2) - ((frameTop (c) +
- frameBottom (c)) / 2);
+ dx = (c->border_width * 2) - frameExtentRight (c);
+ dy = (c->border_width * 2) - ((frameExtentTop (c) +
+ frameExtentBottom (c)) / 2);
break;
case WestGravity:
- dx = frameLeft (c);
- dy = (c->border_width * 2) - ((frameTop (c) +
- frameBottom (c)) / 2);
+ dx = frameExtentLeft (c);
+ dy = (c->border_width * 2) - ((frameExtentTop (c) +
+ frameExtentBottom (c)) / 2);
break;
case NorthWestGravity:
- dx = frameLeft (c);
- dy = frameTop (c);
+ dx = frameExtentLeft (c);
+ dy = frameExtentTop (c);
break;
case NorthEastGravity:
- dx = (c->border_width * 2) - frameRight (c);
- dy = frameTop (c);
+ dx = (c->border_width * 2) - frameExtentRight (c);
+ dy = frameExtentTop (c);
break;
case SouthWestGravity:
- dx = frameLeft (c);
- dy = (c->border_width * 2) - frameBottom (c);
+ dx = frameExtentLeft (c);
+ dy = (c->border_width * 2) - frameExtentBottom (c);
break;
case SouthEastGravity:
- dx = (c->border_width * 2) - frameRight (c);
- dy = (c->border_width * 2) - frameBottom (c);
+ dx = (c->border_width * 2) - frameExtentRight (c);
+ dy = (c->border_width * 2) - frameExtentBottom (c);
break;
default:
dx = 0;
diff --git a/src/events.c b/src/events.c
index 1406f00..7b6da47 100644
--- a/src/events.c
+++ b/src/events.c
@@ -1335,8 +1335,8 @@ handleConfigureRequest (DisplayInfo *display_info, XConfigureRequestEvent * ev)
/* Sorry, but it's not the right time for configure request */
return EVENT_FILTER_REMOVE;
}
- clientAdjustCoordGravity (c, c->gravity, &ev->value_mask, &wc);
clientMoveResizeWindow (c, &wc, ev->value_mask);
+ clientAdjustCoordGravity (c, c->gravity, &ev->value_mask, &wc);
}
else
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list