--- compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/gnome/window-decorator/gnome-window-decorator.c.positioning	2006-09-15 16:43:33.000000000 -0400
+++ compiz-3173a142efe5e7af83ebb534a074d9d2a0c67a86/gnome/window-decorator/gnome-window-decorator.c	2006-09-15 22:17:40.000000000 -0400
@@ -285,25 +285,25 @@
 
 static struct _pos {
     int x, y, w, h;
-    int xw, yh, ww, hh;
+    int xw, yh, ww, hh, yth, hth;
 } pos[3][3] = {
     {
-	{  0,  0, 10, 21,   0, 0, 0, 0 },
-	{ 10,  0, -8,  6,   0, 0, 1, 0 },
-	{  2,  0, 10, 21,   1, 0, 0, 0 }
+	{  0,  0, 10, 21,   0, 0, 0, 0, 0, 1 },
+	{ 10,  0, -8,  6,   0, 0, 1, 0, 0, 1 },
+	{  2,  0, 10, 21,   1, 0, 0, 0, 0, 1 }
     }, {
-	{  0, 10,  6, 11,   0, 0, 0, 1 },
-	{  6,  6,  0, 15,   0, 0, 1, 0 },
-	{  6, 10,  6, 11,   1, 0, 0, 1 }
+	{  0, 10,  6, 11,   0, 0, 0, 1, 1, 0 },
+	{  6,  6,  0, 15,   0, 0, 1, 0, 0, 1 },
+	{  6, 10,  6, 11,   1, 0, 0, 1, 1, 0 }
     }, {
-	{  0, 17, 10, 10,   0, 1, 0, 0 },
-	{ 10, 21, -8,  6,   0, 1, 1, 0 },
-	{  2, 17, 10, 10,   1, 1, 0, 0 }
+	{  0, 17, 10, 10,   0, 1, 0, 0, 1, 0 },
+	{ 10, 21, -8,  6,   0, 1, 1, 0, 1, 0 },
+	{  2, 17, 10, 10,   1, 1, 0, 0, 1, 0 }
     }
 }, bpos[3] = {
-    { 0, 6, 16, 16,   1, 0, 0, 0 },
-    { 0, 6, 16, 16,   1, 0, 0, 0 },
-    { 0, 6, 16, 16,   1, 0, 0, 0 }
+    { 0, 6, 16, 16,   1, 0, 0, 0, 0, 0 },
+    { 0, 6, 16, 16,   1, 0, 0, 0, 0, 0 },
+    { 0, 6, 16, 16,   1, 0, 0, 0, 0, 0 }
 };
 
 typedef struct _decor_color {
@@ -2419,9 +2419,9 @@
 	    if (d->actions & event_window_actions[i][j] && i >= k && i <= l)
 	    {
 		x = pos[i][j].x + pos[i][j].xw * width;
-		y = pos[i][j].y + pos[i][j].yh * height;
+		y = pos[i][j].y + pos[i][j].yh * height + pos[i][j].yth * (titlebar_height - 17);
 		w = pos[i][j].w + pos[i][j].ww * width;
-		h = pos[i][j].h + pos[i][j].hh * height;
+		h = pos[i][j].h + pos[i][j].hh * height + pos[i][j].hth * (titlebar_height - 17);
 
 		XMapWindow (xdisplay, d->event_windows[i][j]);
 		XMoveResizeWindow (xdisplay, d->event_windows[i][j],
@@ -2445,9 +2445,9 @@
 	if (d->actions & button_actions[i])
 	{
 	    x = bpos[i].x + bpos[i].xw * width;
-	    y = bpos[i].y + bpos[i].yh * height;
+	    y = bpos[i].y + bpos[i].yh * height + bpos[i].yth * (titlebar_height - 17);
 	    w = bpos[i].w + bpos[i].ww * width;
-	    h = bpos[i].h + bpos[i].hh * height;
+	    h = bpos[i].h + bpos[i].hh * height + bpos[i].hth + (titlebar_height - 17);
 
 	    x -= button_x;
 	    button_x += 16;
