Relative window positioning

70 views
Skip to first unread message

yg.oe...@gmail.com

unread,
Jan 21, 2013, 3:52:54 PM1/21/13
to devil...@googlegroups.com
Hi!

I've installed Devil's pie 2 two days ago, and I'm already missing a feature: relative window positioning.
With "systrayed" apps, like music players, I prefer to align windows on right edge.

I wrote a quick and dirty patch (my C skills are quite old) so that set_window_geometry() accepts negative X and Y coordinates.

There's still something strange about Y positioning: window moves down as I open and close it even if I use Y from the get_window_geometry function.

Maybe you'll find this patch useful.

PS: my english is not as good as I'd whish :)

Regards, Y.
devilspie2-0.27-relative.patch

Andreas Rönnquist

unread,
Jan 22, 2013, 2:35:09 PM1/22/13
to devil...@googlegroups.com
> Hi!
>
> I've installed Devil's pie 2 two days ago, and I'm already missing a
> feature: relative window positioning.
> With "systrayed" apps, like music players, I prefer to align windows
> on right edge.
>
> I wrote a quick *and dirty* patch (my C skills are quite old) so that
> set_window_geometry() accepts negative X and Y coordinates.
>
> There's still something strange about Y positioning: window moves
> down as I open and close it even if I use Y from the
> get_window_geometry function.
>
> Maybe you'll find this patch useful.
>
> PS: my english is not as good as I'd whish :)
>
> Regards, Y.

Thanks - I haven't had time to look at the patch, but regarding the
Y-positioning problem - could you try out set_window_position2 which I
implemented a while ago - manual description is

"Set the position of a window - Compared to set_window_position, this
function uses XMoveWindow instead of wnck_window_set_geometry which
gives a slightly different result.
(Available from version 0.21)"

I might be something worth checking out - However, in the standard
get_window_position and set_window_position I use the libwnck functions
for setting and getting positions, so it is rather strange that getting
and setting the same values should give different results...

-- Andreas Rönnquist
gus...@gusnan.se
signature.asc

Andreas Rönnquist

unread,
Jan 23, 2013, 9:46:00 AM1/23/13
to devil...@googlegroups.com
> Hi!
>
> I've installed Devil's pie 2 two days ago, and I'm already missing a
> feature: relative window positioning.
> With "systrayed" apps, like music players, I prefer to align windows
> on right edge.
>
> I wrote a quick *and dirty* patch (my C skills are quite old) so that
> set_window_geometry() accepts negative X and Y coordinates.
>
> There's still something strange about Y positioning: window moves
> down as I open and close it even if I use Y from the
> get_window_geometry function.
>
> Maybe you'll find this patch useful.
>
> PS: my english is not as good as I'd whish :)
>
> Regards, Y.

I have applied the patch to git. Thanks!

Would you mind if I would put your name and email in the credit list?

best regards
-- Andreas Rönnquist
gus...@gusnan.se
signature.asc

Ynherag

unread,
Jan 23, 2013, 2:59:28 PM1/23/13
to devil...@googlegroups.com
> Would you mind if I would put your name and email in the credit list?
Of course not :) I'm Laurent Brachet.
Thx.
Reply all
Reply to author
Forward
0 new messages