[Xfce4-commits] [xfce/xfwm4] 01/01: Remove horizontal tyling on move
noreply at xfce.org
noreply at xfce.org
Sat Jan 10 22:00:00 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 b2e3cefab1cd6a7dfa3c6434a8ffe2d4bb667ac1
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sat Jan 10 21:56:21 2015 +0100
Remove horizontal tyling on move
And use maximization on top border alone. Also, increase tile
threshold to 10 pixels.
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/moveresize.c | 29 +++--------------------------
1 file changed, 3 insertions(+), 26 deletions(-)
diff --git a/src/moveresize.c b/src/moveresize.c
index ddf8d6c..8fec776 100644
--- a/src/moveresize.c
+++ b/src/moveresize.c
@@ -55,7 +55,7 @@
ButtonReleaseMask | \
LeaveWindowMask
-#define TILE_DISTANCE 2
+#define TILE_DISTANCE 10
typedef struct _MoveResizeData MoveResizeData;
struct _MoveResizeData
@@ -799,13 +799,7 @@ clientMoveTile (Client *c, XMotionEvent *xevent)
if ((x >= disp_x - 1) && (x < disp_max_x + 1) &&
(y >= disp_y - 1) && (y < disp_y + dist))
{
- return clientTile (c, x, y, TILE_UP, !screen_info->params->box_move);
- }
-
- if ((x >= disp_x - 1) && (x < disp_max_x + 1) &&
- (y >= disp_max_y - dist) && (y < disp_max_y + 1))
- {
- return clientTile (c, x, y, TILE_DOWN, !screen_info->params->box_move);
+ return clientToggleMaximized (c, CLIENT_FLAG_MAXIMIZED, FALSE);
}
}
@@ -815,7 +809,6 @@ clientMoveTile (Client *c, XMotionEvent *xevent)
static eventFilterStatus
clientMoveEventFilter (XEvent * xevent, gpointer data)
{
- static gboolean toggled_maximize = FALSE;
ScreenInfo *screen_info;
DisplayInfo *display_info;
eventFilterStatus status = EVENT_FILTER_STOP;
@@ -954,10 +947,6 @@ clientMoveEventFilter (XEvent * xevent, gpointer data)
xratio = (xevent->xmotion.x_root - frameExtentX (c)) / (double) frameExtentWidth (c);
yratio = (xevent->xmotion.y_root - frameExtentY (c)) / (double) frameExtentHeight (c);
- if (FLAG_TEST_ALL(c->flags, CLIENT_FLAG_MAXIMIZED))
- {
- toggled_maximize = TRUE;
- }
if (clientToggleMaximized (c, c->flags & CLIENT_FLAG_MAXIMIZED, FALSE))
{
passdata->move_resized = TRUE;
@@ -990,18 +979,7 @@ clientMoveEventFilter (XEvent * xevent, gpointer data)
c->y = passdata->oy + (xevent->xmotion.y_root - passdata->my);
clientSnapPosition (c, prev_x, prev_y);
- /* This allows for moving fullscreen windows between monitors */
- if (toggled_maximize)
- {
- if ((clientConstrainPos (c, FALSE) & CLIENT_CONSTRAINED_TOP) &&
- clientToggleMaximized (c, CLIENT_FLAG_MAXIMIZED, FALSE))
- {
- passdata->configure_flags = CFG_FORCE_REDRAW;
- toggled_maximize = FALSE;
- passdata->move_resized = TRUE;
- }
- }
- else if (!clientMoveTile (c, (XMotionEvent *) xevent))
+ if (!clientMoveTile (c, (XMotionEvent *) xevent))
{
clientConstrainPos(c, FALSE);
}
@@ -1053,7 +1031,6 @@ clientMoveEventFilter (XEvent * xevent, gpointer data)
if (!moving)
{
TRACE ("event loop now finished");
- toggled_maximize = FALSE;
clientMoveWarp (c, NULL);
if (!FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list