On 13.01.2012 15:17, Anurag Priyam wrote:
> On Thu, Jan 12, 2012 at 8:04 PM, Uli Schlachter <psyc...@znc.in> wrote:
>> On 12.01.2012 10:27, Anurag Priyam wrote:
>>>     self.wibox.screen = mouse.screen
> [...]
>>> How would you explain that?
>>
>>
>> Meh. You are using git master.
>>
>> commit 08cd44dda71b2c62d441941c50c64e1165975d7b
>> Author: Uli Schlachter <psyc...@znc.in>
>> Date:   Sun Mar 27 16:21:49 2011 +0200
>>
>>    drawin: Remove screen property
> 
> That essentially means awful.tooltip and awful.mouse.finder are broken
> (in git master). Doesn't look like it has anything to do with my
> particular setup. I will see if I can fix it later.

Looking through awful.mouse.finder, I can only find one place where .screen is
still used and that can just be dropped.

Then I looked into awful.tooltip. Same there. That variable is only ever written
to and that line can just be dropped. However, this now means raises the
question on where the bug is.

A quick look at awful.tooltip.place finds that it uses
awful.placement.under_mouse and no_offscreen to place a wibox, however those
functions expect a client to be passed in.

Since duplicating code is ugly (and having a tooltip appear in-between two
screens is ugly, too), I guess that means that the Best Fix (tm) would be to
patch awful.placement so that it (again) works with non-clients. For that I'd
suggest something like:

 local screen = c.screen or calculate_screen(c:geometry())

(Where calculate_screen() figures out on which screen the point given by arg.x
and arg.y is, this is just what the "old" screen property did, too)

Alternatively someone could come up with a magic way to modify
common/luaobject.c so that lua code can add arbitrary properties to an object.
That'd be nicer, but I don't see that happening any time soon. :-(


Uli

-- 
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

-- 
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to