Patch for Win gravity: Diff between ICCCM spec and EWMH - any objectsions ?



Sasha Vasko wrote:

Davor Buvinic wrote:

I have a question regards window gravity manipulation:

The ICCCM spec (section 4.1.2.3) states the coordinates used to calculate the win gravity reference point. The explanation is (I think) clear.

But in the implementation notes of the EWMH document (draft January 2003), the author of the second table apparently is assuming that the coordinate system is with respect to the inner border of the client window, i.e. for a configure request that the window manager gets, its need to asume the inner border is at (x, y). With this, the coordinates of the outer border is (x-bw, y-bw).


The ICCCM says :

 The [x,y] location of the window's upper left-outer corner.

therefore you are right and I am wrong.

Here is the patch :

Index: wm-spec.xml
===================================================================
RCS file: /cvs/icccm-extensions/wm-spec/wm-spec.xml,v
retrieving revision 1.6
diff -u -r1.6 wm-spec.xml
--- wm-spec.xml	29 Jul 2003 18:08:38 -0000	1.6
+++ wm-spec.xml	10 Oct 2003 15:33:07 -0000
@@ -1563,53 +1563,53 @@
 		</row>
 		<row>
 		  <entry>StaticGravity</entry>
-		  <entry>x</entry>
-		  <entry>y</entry>
+		  <entry>x+bw</entry>
+		  <entry>y+bw</entry>
 		</row>
 		<row>
 		  <entry>NorthWestGravity</entry>
-		  <entry>x-bw</entry>
-		  <entry>y-bw</entry>
+		  <entry>x</entry>
+		  <entry>y</entry>
 		</row>
 		<row>
 		  <entry>NorthGravity</entry>
-		  <entry>x+(width/2)</entry>
-		  <entry>y-bw</entry>
+		  <entry>x+bw+(width/2)</entry>
+		  <entry>y</entry>
 		</row>
 		<row>
 		  <entry>NorthEastGravity</entry>
-		  <entry>x+width+bw</entry>
-		  <entry>y-bw</entry>
+		  <entry>x+bw+width+bw</entry>
+		  <entry>y</entry>
 		</row>
 		<row>
 		  <entry>EastGravity</entry>
-		  <entry>x+width+bw</entry>
-		  <entry>y+(height/2)</entry>
+		  <entry>x+bw+width+bw</entry>
+		  <entry>y+bw+(height/2)</entry>
 		</row>
 		<row>
 		  <entry>SouthEastGravity</entry>
-		  <entry>x+width+bw</entry>
-		  <entry>y+height+bw</entry>
+		  <entry>x+bw+width+bw</entry>
+		  <entry>y+bw+height+bw</entry>
 		</row>
 		<row>
 		  <entry>SouthGravity</entry>
-		  <entry>x+(width/2)</entry>
-		  <entry>y+height+bw</entry>
+		  <entry>x+bw+(width/2)</entry>
+		  <entry>y+bw+height+bw</entry>
 		</row>
 		<row>
 		  <entry>SouthWestGravity</entry>
-		  <entry>x-bw</entry>
-		  <entry>y+height+bw</entry>
+		  <entry>x</entry>
+		  <entry>y+bw+height+bw</entry>
 		</row>
 		<row>
 		  <entry>WestGravity</entry>
-		  <entry>x-bw</entry>
-		  <entry>y+(height/2)</entry>
+		  <entry>x</entry>
+		  <entry>y+bw+(height/2)</entry>
 		</row>
 		<row>
 		  <entry>CenterGravity</entry>
-		  <entry>x+(width/2)</entry>
-		  <entry>y+(height/2)</entry>
+		  <entry>x+bw+(width/2)</entry>
+		  <entry>y+bw+(height/2)</entry>
 		</row>
 	      </tbody>
 	    </tgroup>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]