[fusion-commits] compiz mirror: Changes to 'master' (39e1058feab76e1d5ff063badb23efca80ed4d72)

compiz at server.beryl-project.org compiz at server.beryl-project.org
Wed Jul 11 01:09:06 CEST 2007


New commits:
commit 39e1058feab76e1d5ff063badb23efca80ed4d72
Author: Dennis Kasprzyk <onestone at opencompositing.org>
Date:   Wed Jul 11 01:07:54 2007 +0200

    Add input extents when placing window in "smart" mode to get correct position.

commit d8c119b183c9ff4edeb415f7b359a92a4807cdda
Author: Dennis Kasprzyk <onestone at opencompositing.org>
Date:   Wed Jul 11 01:05:40 2007 +0200

    Use correct input extents in "smart" mode calculation.


 plugins/place.c |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)


Modified: compiz/plugins/place.c
===================================================================
--- compiz/plugins/place.c
+++ compiz/plugins/place.c
@@ -873,12 +873,12 @@ placeSmart (CompWindow *window,
 				    CompWindowTypeDesktopMask)))
 		{
 
-		    xl = wi->attrib.x - window->input.left;
-		    yt = wi->attrib.y - window->input.top;
+		    xl = wi->attrib.x - wi->input.left;
+		    yt = wi->attrib.y - wi->input.top;
 		    xr = xl + get_window_width (wi) + window->input.left
-			+ window->input.right;
+			+ wi->input.right;
 		    yb = yt + get_window_height (wi) + window->input.top
-			+ window->input.bottom;
+			+ wi->input.bottom;
 
 		    /* if windows overlap, calc the overall overlapping */
 		    if ((cxl < xr) && (cxr > xl) &&
@@ -935,12 +935,12 @@ placeSmart (CompWindow *window,
 				    CompWindowTypeDesktopMask)))
 		{
 
-		    xl = wi->attrib.x - window->input.left;
-		    yt = wi->attrib.y - window->input.top;
-		    xr = xl + get_window_width (wi) + window->input.left
-			+ window->input.right;
-		    yb = yt + get_window_height (wi) + window->input.top
-			+ window->input.bottom;
+		    xl = wi->attrib.x - wi->input.left;
+		    yt = wi->attrib.y - wi->input.top;
+		    xr = xl + get_window_width (wi) + wi->input.left
+			+ wi->input.right;
+		    yb = yt + get_window_height (wi) + wi->input.top
+			+ wi->input.bottom;
 
 		    /* if not enough room above or under the current
 		     * client determine the first non-overlapped x position
@@ -974,12 +974,12 @@ placeSmart (CompWindow *window,
 		    !(wi->wmType & (CompWindowTypeDockMask |
 				    CompWindowTypeDesktopMask)))
 		{
-		    xl = wi->attrib.x - window->input.left;
-		    yt = wi->attrib.y - window->input.top;
-		    xr = xl + get_window_width (wi) + window->input.left
-			+ window->input.right;
-		    yb = yt + get_window_height (wi) + window->input.top
-			+ window->input.bottom;
+		    xl = wi->attrib.x - wi->input.left;
+		    yt = wi->attrib.y - wi->input.top;
+		    xr = xl + get_window_width (wi) + wi->input.left
+			+ wi->input.right;
+		    yb = yt + get_window_height (wi) + wi->input.top
+			+ wi->input.bottom;
 
 		    /* if not enough room to the left or right of the current
 		     * client determine the first non-overlapped y position
@@ -1001,8 +1001,8 @@ placeSmart (CompWindow *window,
     if (ch >= workarea->height)
 	yOptimal = workarea->y;
 
-    *x = xOptimal;
-    *y = yOptimal;
+    *x = xOptimal + window->input.left;
+    *y = yOptimal + window->input.top;
 }
 
 static void


More information about the commits mailing list