window manager problem

Bernhard Walle Bernhard.Walle at gmx.de
Mon Jul 28 10:52:20 CEST 2003


On Sun, 27 Jul 2003 at 01:13 (+0200), Olivier Fourdan wrote:
> On Sat, 2003-07-26 at 17:08, Bernhard Walle wrote:
> > Another small question: Xfwm places windows initial with no space on the
> > left if left-aligned but with a few pixels on the right when right-aligned.  
> > Is this intentional?
> 
> Yes and no. It's a side effect.
>[...]

Why not correcting this after the best position is found? If the right
margin is less than 8 pixels than the window is placed on the right.

I attached a patch which would do this and which works here.


Regards,
Bernhard

-- 
-------------- next part --------------
--- client.c.orig	Mon Jul 28 10:05:10 2003
+++ client.c	Mon Jul 28 10:48:00 2003
@@ -2201,6 +2201,19 @@
     }
     c->x = best_x;
     c->y = best_y;
+    
+    {
+        int distance_right  = xmax - c->x;
+        int distance_bottom = ymax - c->y;
+        if (xmax - c->x <= 8) {
+            c->x += frameLeft (c) + distance_right; 
+        }
+        if (ymax - c->y <= 8) {
+            c->y += frameTop (c) + distance_bottom;
+        }
+    }
+
+    
     return;
 }
 


More information about the Xfce4-dev mailing list