[fusion-commits] Compiz mirror: Changes to 'master' (8b7d26177eea34cf1cdf4bdbb19e7b56a318d11c)

compiz at server.opencompositing.org compiz at server.opencompositing.org
Fri May 9 16:32:07 CEST 2008


New commits:
commit 8b7d26177eea34cf1cdf4bdbb19e7b56a318d11c
Merge: 3b56af24b61187cd1d4427823a7aae25fb000f5d 5ca38167d04e1a42782a0a00198975e967e0615a
Author: Danny Baumann <dannybaumann at web.de>
Date:   Fri May 9 16:30:47 2008 +0200

    Merge branch 'master' of git+ssh://maniac@git.freedesktop.org/git/xorg/app/compiz

commit 3b56af24b61187cd1d4427823a7aae25fb000f5d
Author: Danny Baumann <dannybaumann at web.de>
Date:   Fri May 9 15:01:48 2008 +0200

    Make corner resize behaviour consistent to Metacity.

commit 36a5911337f499c544ffe04aa08efe211c4b9333
Author: Danny Baumann <dannybaumann at web.de>
Date:   Fri May 9 15:00:31 2008 +0200

    Allow keyboard and window menu initiated resize being ended by a mouse button.

commit d87e199a87117392c9b861b1ca015089d6f424dc
Author: Danny Baumann <dannybaumann at web.de>
Date:   Fri May 9 14:58:28 2008 +0200

    Initialize starting position correctly.


 gtk/window-decorator/gtk-window-decorator.c |   46 +++++++++++++++-----------
 plugins/resize.c                            |   12 ++-----
 2 files changed, 29 insertions(+), 29 deletions(-)


Modified: compiz/gtk/window-decorator/gtk-window-decorator.c
===================================================================
--- compiz/gtk/window-decorator/gtk-window-decorator.c
+++ compiz/gtk/window-decorator/gtk-window-decorator.c
@@ -2806,6 +2806,8 @@ get_button_position (decor_t *d,
 #ifdef USE_METACITY
 
 #define TOP_RESIZE_HEIGHT 2
+#define RESIZE_EXTENDS 15
+
 static void
 meta_get_event_window_position (decor_t *d,
 				gint    i,
@@ -2835,23 +2837,24 @@ meta_get_event_window_position (decor_t *d,
     case 2: /* bottom */
 	switch (j) {
 	case 2: /* bottom right */
-	    *x = width - fgeom.right_width;
-	    *y = height - fgeom.bottom_height;
-	    *w = fgeom.right_width;
-	    *h = fgeom.bottom_height;
+	    *x = width - fgeom.right_width - RESIZE_EXTENDS;
+	    *y = height - fgeom.bottom_height - RESIZE_EXTENDS;
+	    *w = fgeom.right_width + RESIZE_EXTENDS;
+	    *h = fgeom.bottom_height + RESIZE_EXTENDS;
 	    break;
 	case 1: /* bottom */
-	    *x = fgeom.left_width;
+	    *x = fgeom.left_width + RESIZE_EXTENDS;
 	    *y = height - fgeom.bottom_height;
-	    *w = width - fgeom.left_width - fgeom.right_width;
+	    *w = width - fgeom.left_width - fgeom.right_width -
+		 (2 * RESIZE_EXTENDS);
 	    *h = fgeom.bottom_height;
 	    break;
 	case 0: /* bottom left */
 	default:
 	    *x = 0;
-	    *y = height - fgeom.bottom_height;
-	    *w = fgeom.left_width;
-	    *h = fgeom.bottom_height;
+	    *y = height - fgeom.bottom_height - RESIZE_EXTENDS;
+	    *w = fgeom.left_width + RESIZE_EXTENDS;
+	    *h = fgeom.bottom_height + RESIZE_EXTENDS;
 	    break;
 	}
 	break;
@@ -2859,9 +2862,10 @@ meta_get_event_window_position (decor_t *d,
 	switch (j) {
 	case 2: /* right */
 	    *x = width - fgeom.right_width;
-	    *y = fgeom.top_height;
+	    *y = fgeom.top_height + RESIZE_EXTENDS;
 	    *w = fgeom.right_width;
-	    *h = height - fgeom.top_height - fgeom.bottom_height;
+	    *h = height - fgeom.top_height - fgeom.bottom_height -
+		 (2 * RESIZE_EXTENDS);
 	    break;
 	case 1: /* middle */
 	    *x = fgeom.left_width;
@@ -2872,9 +2876,10 @@ meta_get_event_window_position (decor_t *d,
 	case 0: /* left */
 	default:
 	    *x = 0;
-	    *y = fgeom.top_height;
+	    *y = fgeom.top_height + RESIZE_EXTENDS;
 	    *w = fgeom.left_width;
-	    *h = height - fgeom.top_height - fgeom.bottom_height;
+	    *h = height - fgeom.top_height - fgeom.bottom_height -
+		 (2 * RESIZE_EXTENDS);
 	    break;
 	}
 	break;
@@ -2882,23 +2887,24 @@ meta_get_event_window_position (decor_t *d,
     default:
 	switch (j) {
 	case 2: /* top right */
-	    *x = width - fgeom.right_width;
+	    *x = width - fgeom.right_width - RESIZE_EXTENDS;
 	    *y = 0;
-	    *w = fgeom.right_width;
-	    *h = fgeom.top_height;
+	    *w = fgeom.right_width + RESIZE_EXTENDS;
+	    *h = fgeom.top_height + RESIZE_EXTENDS;
 	    break;
 	case 1: /* top */
-	    *x = fgeom.left_width;
+	    *x = fgeom.left_width + RESIZE_EXTENDS;
 	    *y = 0;
-	    *w = width - fgeom.left_width - fgeom.right_width;
+	    *w = width - fgeom.left_width - fgeom.right_width -
+		 (2 * RESIZE_EXTENDS);
 	    *h = fgeom.title_rect.y + TOP_RESIZE_HEIGHT;
 	    break;
 	case 0: /* top left */
 	default:
 	    *x = 0;
 	    *y = 0;
-	    *w = fgeom.left_width;
-	    *h = fgeom.top_height;
+	    *w = fgeom.left_width + RESIZE_EXTENDS;
+	    *h = fgeom.top_height + RESIZE_EXTENDS;
 	    break;
 	}
     }

Modified: compiz/plugins/resize.c
===================================================================
--- compiz/plugins/resize.c
+++ compiz/plugins/resize.c
@@ -331,10 +331,8 @@ resizeInitiate (CompDisplay     *d,
 
 	RESIZE_SCREEN (w->screen);
 
-	x = getIntOptionNamed (option, nOption, "x",
-			       w->serverX + (w->serverWidth / 2));
-	y = getIntOptionNamed (option, nOption, "y",
-			       w->serverY + (w->serverHeight / 2));
+	x = getIntOptionNamed (option, nOption, "x", pointerX);
+	y = getIntOptionNamed (option, nOption, "y", pointerY);
 
 	button = getIntOptionNamed (option, nOption, "button", -1);
 
@@ -866,13 +864,9 @@ resizeHandleEvent (CompDisplay *d,
 		    {
 			option = RESIZE_DISPLAY_OPTION_INITIATE_KEY;
 
-			o[1].type    = CompOptionTypeInt;
-			o[1].name    = "button";
-			o[1].value.i = 0;
-
 			resizeInitiate (d, &rd->opt[option].value.action,
 					CompActionStateInitKey,
-					o, 2);
+					o, 1);
 		    }
 		    else
 		    {


More information about the commits mailing list