Ian Zimmerman | 1 Jun 2011 04:28
Gravatar

Re: [Patch] Least overlap placement

On Tue, 31 May 2011 17:56:21 +0200
Mikael Magnusson <mikachu@...> wrote:

Ian> Here is an improved version that handles multi-head.  I think!  I
Ian> have just 1 monitor myself, so I can't really test that part.
Ian> Someone help me with that please :)

Mikael> --debug-xinerama was added for just that purpose :).

It seems to work.  Consider this the ready-to-merge version.

--

-- 
Ian Zimmerman
gpg public key: 1024D/C6FF61AD 
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
Rule 420: All persons more than eight miles high to leave the court.
_______________________________________________
openbox mailing list
openbox@...
http://icculus.org/mailman/listinfo/openbox

David Vogt | 1 Jun 2011 09:42
Picon

Re: [Patch] Least overlap placement

On 31/05/11 17:54, Ian Zimmerman wrote:
> [...]
> Here is an improved version that handles multi-head.  I think!  I have
> just 1 monitor myself, so I can't really test that part.  Someone help
> me with that please :)

I'd love to test it, but unfortunately it doesn't apply to git master, 
which I'm running.

I'll attempt to port it to master in the next few days.

Dave

--

-- 
David Vogt, Project Manager & Software Developer
adfinis GmbH, Brückfeldstrasse 21, 3012 Bern (Switzerland)
Email: dv@..., Web: http://www.adfinis.com
Jabber/XMPP: dv@...,  Phone: +41 31 381 70 47
_______________________________________________
openbox mailing list
openbox@...
http://icculus.org/mailman/listinfo/openbox

David Vogt | 2 Jun 2011 00:36
Picon

Re: [Patch] Least overlap placement

On 06/01/2011 09:42 AM, David Vogt wrote:
> On 31/05/11 17:54, Ian Zimmerman wrote:
>> [...]
>> Here is an improved version that handles multi-head. I think! I have
>> just 1 monitor myself, so I can't really test that part. Someone help
>> me with that please :)
>
> I'd love to test it, but unfortunately it doesn't apply to git master,
> which I'm running.
>
> I'll attempt to port it to master in the next few days.

.. which I did now (see the attached patch). However, while it does 
compile, it segfaults on the first try to actually place a window. The 
second attachment is a gdb log with backtrace. I'll investigate further, 
but if anyone has input, i'd be happy as well! My C days are long ago :/

Dave
>From c0e9b143cce8db88e96cf40b8b1a1dbef2c03805 Mon Sep 17 00:00:00 2001
From: David Vogt <dv@...>
Date: Wed, 1 Jun 2011 23:46:06 +0200
Subject: [PATCH] Porting Ian Zimmerman's least-overlap-placing to master

---
 Makefile.am       |    2 +
 data/rc.xsd       |    1 +
 openbox/config.c  |    7 ++-
 openbox/geom.h    |    4 +
(Continue reading)

David Vogt | 2 Jun 2011 01:16
Picon

Re: [Patch] Least overlap placement

On 06/02/2011 12:36 AM, David Vogt wrote:
> On 06/01/2011 09:42 AM, David Vogt wrote:
>> On 31/05/11 17:54, Ian Zimmerman wrote:
>>> [...]
>>> Here is an improved version that handles multi-head. I think! I have
>>> just 1 monitor myself, so I can't really test that part. Someone help
>>> me with that please :)
>>
>> I'd love to test it, but unfortunately it doesn't apply to git master,
>> which I'm running.
>>
>> I'll attempt to port it to master in the next few days.
>
> .. which I did now (see the attached patch). However, while it does
> compile, it segfaults on the first try to actually place a window. The
> second attachment is a gdb log with backtrace. I'll investigate further,
> but if anyone has input, i'd be happy as well! My C days are long ago :/

This is what happens if you don't go to bed as planned. Here's a patch 
that seems to work. I had to change a few things in 
place_least_overlap() regarding Rect **heads. I'm really not sure that 
this doesn't leak. Also I'm wondering why it's **heads instead of *heads 
if there's only one item in it?

Dave

--

-- 
David Vogt, Project Manager & Software Developer
adfinis GmbH, Brückfeldstrasse 21, 3012 Bern (Switzerland)
Email: dv@..., Web: http://www.adfinis.com
(Continue reading)

Ian Zimmerman | 2 Jun 2011 03:08
Gravatar

Re: [Patch] Least overlap placement

On Thu, 02 Jun 2011 01:16:43 +0200
David Vogt <dv@...> wrote:

> +    /* add the monitor */
> +    const Rect *heads[1] = { pick_head(c, foreground)};
> +

This is not my code .. so I don't know why there's only 1 item 8-P

My code has:

    /* add the monitor */
    Rect **heads = pick_head(c);

Maybe you forgot you changed that, in your sleepy state?

--

-- 
Ian Zimmerman
gpg public key: 1024D/C6FF61AD 
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
Rule 420: All persons more than eight miles high to leave the court.
_______________________________________________
openbox mailing list
openbox@...
http://icculus.org/mailman/listinfo/openbox

David Vogt | 2 Jun 2011 14:58
Picon

Re: [Patch] Least overlap placement

On 02/06/11 03:08, Ian Zimmerman wrote:
> On Thu, 02 Jun 2011 01:16:43 +0200
> David Vogt<dv@...>  wrote:
>
>> +    /* add the monitor */
>> +    const Rect *heads[1] = { pick_head(c, foreground)};
>> +
>
> This is not my code .. so I don't know why there's only 1 item 8-P
>
> My code has:
>
>      /* add the monitor */
>      Rect **heads = pick_head(c);
>
> Maybe you forgot you changed that, in your sleepy state?

Hehe. Actually, this is not far from the truth. I did change that code, 
but didn't realize that the return type of pick_head() changed from 3.4 
to master, so my attemt to "fix" it resulted in the code above.

The return type changed from Rect** to Rect*. Being awake now, the 
change is simpler than I thought last night. See the attached patch :)

Dave

--

-- 
David Vogt, Project Manager & Software Developer
adfinis GmbH, Brückfeldstrasse 21, 3012 Bern (Switzerland)
Email: dv@..., Web: http://www.adfinis.com
(Continue reading)

Ian Zimmerman | 2 Jun 2011 18:23
Gravatar

Re: [Patch] Least overlap placement

On Thu, 02 Jun 2011 14:58:14 +0200
David Vogt <dv@...> wrote:

David>  Hehe. Actually, this is not far from the truth. I did change
David> that code, but didn't realize that the return type of pick_head()
David> changed from 3.4 to master, so my attempt to "fix" it resulted in
David> the code above.

David>  The return type changed from Rect** to Rect*. Being awake now,
David> the change is simpler than I thought last night. See the attached
David> patch :)

Thanks for your help!

To my naked eye, it looks like the Rect* returned by pick_head() could
leak, but I haven't inspected the rest of place.c in git head, maybe it
is static or something.

--

-- 
Ian Zimmerman
gpg public key: 1024D/C6FF61AD 
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
Rule 420: All persons more than eight miles high to leave the court.
_______________________________________________
openbox mailing list
openbox@...
http://icculus.org/mailman/listinfo/openbox

David Vogt | 3 Jun 2011 09:02
Picon

Re: [Patch] Least overlap placement

On 06/02/2011 06:23 PM, Ian Zimmerman wrote:
> [...]
>
> Thanks for your help!

Glad I could!

> To my naked eye, it looks like the Rect* returned by pick_head() could
> leak, but I haven't inspected the rest of place.c in git head, maybe it
> is static or something.

You're right. pick_head() gets the value from screen_area(), which in 
turn creates it using g_slice_new(). This would also explain the SIGABRT 
I was getting when I naively used g_free().

Looking at place_client(), I see that it already fetches the same data. 
So why not use that instead? This way, we get a little less overhead.

I've put the patches on github to avoid sending out modified versions of 
the same patch over and over again:

https://github.com/winged/openbox/tree/least-overlap-placement

Dave

--

-- 
David Vogt, Project Manager & Software Developer
adfinis GmbH, Brückfeldstrasse 21, 3012 Bern (Switzerland)
Email: dv@..., Web: http://www.adfinis.com
Jabber/XMPP: dv@...,  Phone: +41 31 381 70 47
(Continue reading)

Johan Vromans | 3 Jun 2011 16:11
Picon
Favicon
Gravatar

Gnome 3 shell

Anyone tried running openbox under / with the Gnome 3 shell?

-- Johan
_______________________________________________
openbox mailing list
openbox@...
http://icculus.org/mailman/listinfo/openbox

Jeremy Nickurak | 3 Jun 2011 16:27
Picon

Re: Gnome 3 shell

On Fri, Jun 3, 2011 at 08:11, Johan Vromans <jvromans <at> squirrel.nl> wrote:
Anyone tried running openbox under / with the Gnome 3 shell?
 
Gnome-shell is a combination window-manager/panel,  so this is impossible.


--
Jeremy Nickurak -= Email/XMPP: -= jeremy-iodxjTzQX3csA/PxXw9srA@public.gmane.org =- 

_______________________________________________
openbox mailing list
openbox@...
http://icculus.org/mailman/listinfo/openbox

Gmane