PDA

View Full Version : For people not reading mailing list...


gnumdk
February 7th, 2007, 10:09 PM
http://puffy.homelinux.org/~gnumdk/compiz/patch/place.patch

Here is a patch to enable new placement methods in compiz.

Key in gconf is:
/apps/compiz/plugins/place/screen0/options/place_mode

Values are:
-Cascade
-Centered
-Random
-LeftCorner
-Maximized
-Smart

Compiz now have all placement methods available in kwin ;)

FunkyM
February 8th, 2007, 12:42 AM
This is missing in the patch:
--- compiz/plugins/compiz.schemas.in
+++ compiz/plugins/compiz.schemas.in
@@ -19120,6 +19120,18 @@
</locale>
</schema>

+ <schema>
+ <key>/schemas/apps/compiz/plugins/place/screen0/options/place_mode</key>
+ <applyto>/apps/compiz/plugins/place/screen0/options/place_mode</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Cascade</default>
+ <locale name="C">
+ <short>Placement Mode</short>
+ <long>Way to place windows (Cascade, Centered, LeftCorner, Smart, Maximize, Random)</long>
+ </locale>
+ </schema>
+


<schema>
It appears to almost work good here. Dual-head appears to work as expected (despite I hate that the current head is somehow determined by the focused window and not the mouse pointer location in general).

The centered mode does not work correctly and windows appear just vertically centered and aligned to an output edge horizontally. I assume this is a compiz bug since the center placement code is insanely simple. ;)

gnumdk
February 8th, 2007, 07:22 AM
The centered mode does not work correctly and windows appear just vertically centered and aligned to an output edge horizontally. I assume this is a compiz bug since the center placement code is insanely simple. ;)

Do you think it's due to multihead?
I can't test here :(

mcook
February 8th, 2007, 08:44 PM
I think the problem is your code is using on screen->workArea, which is the single workarea over all heads. So when a window is centered on two monitors, it would end up overlapping the gap, so Compiz moves the window to one side of the gap so it's not split. You might instead be able to use screen->outputDev[screen->currentOutputDev].workArea, or possibly use the current output's dimensions and manually handle avoiding struts (such as docks).

On the topic, and partly referring to FunkyM's comment, I'd like to see a "Follow" option which will try to place the window near where the current mouse pointer is (not just the same output, but actually near the pointer, so I don't have to move clear across the screen). Maybe I'll see about implementing that one myself, since I'm asking. ;)

...MC

gnumdk
February 8th, 2007, 10:31 PM
Ok, thanks for you help ;)

It now should work !

mcook
February 8th, 2007, 11:28 PM
Hm, seems "Smart" causes Compiz to hang for me on multi-head if I'm on the right of two monitors. I'm guessing the loop doesn't properly terminate, but haven't had a chance to debug it just yet.

mikedee
February 13th, 2007, 05:14 PM
FunkyM (and anyone else interested) : You do not need to prepare patches for the schemas, they are automatically generated when needed.