Re: [Patch] object_under_pointer

2008-12-05 Thread Julien Danjou
At 1228491660 time_t, Gregor Best wrote: > Since mouse.object_under_pointer() was the only function having problems with > widget_getbycoords(), adding two lines of code to make the cursor position in > object_under_pointer() relative to the wibox we are checking, solves the > problem without the n

Re: [Patch] object_under_pointer

2008-12-05 Thread Gregor Best
I have an alternate proposal: Since mouse.object_under_pointer() was the only function having problems with widget_getbycoords(), adding two lines of code to make the cursor position in object_under_pointer() relative to the wibox we are checking, solves the problem without the neccessity to modif

Re: [Patch] object_under_pointer

2008-12-05 Thread Julien Danjou
At 1228482146 time_t, Gregor Best wrote: > You mean as in, just return query_pointer_r and let the caller decide what > values to get from that reply? Sounds reasonable. I'm not sure whether I'll > get > around to implementing that today, but by tomorrow, I should've done it. This is what I exact

Re: [Patch] object_under_pointer

2008-12-05 Thread Gregor Best
At Thu, 4 Dec 2008 23:40:58 +0100 Julien Danjou wrote: > [...] > Your fix is good but I think you should directly enhance: > mouse_query_pointer() to get its win_x and win_y fields. > > The problem is that then mouse_query_pointer will have 10 parameters, > which is too big. > > I suggest we cha

Re: [Patch] object_under_pointer

2008-12-04 Thread Julien Danjou
At 1228414940 time_t, Gregor Best wrote: > I just noticed, the previous version of the patch crippled mouse buttons on > widgets which are not on screen 1. The attached version fixes that, while > still > allowing to pass container_x and container_y to widget_getbycoords() so > object_under_cursor

Re: [Patch] object_under_pointer

2008-12-04 Thread Gregor Best
I just noticed, the previous version of the patch crippled mouse buttons on widgets which are not on screen 1. The attached version fixes that, while still allowing to pass container_x and container_y to widget_getbycoords() so object_under_cursor() works for multiple screens. Thus, the patch only

Re: [Patch] object_under_pointer

2008-12-04 Thread Gregor Best
Hi people, while playing around with awful.mouse.widget_under_pointer(), I noticed that widgets on the second screen of my XRandR setup don't get recognized. The reason for that were bad coordinates for the widgets (the offset induced by wibox->geometry.x / wibox->geometry.y was not considered). A

Re: [Patch] object_under_pointer

2008-12-03 Thread Julien Danjou
At 1228340472 time_t, Gregor Best wrote: > during the past days, I worked on getting a object_under_pointer method to > work > for capi.mouse. The old client_under_pointer went to awful.mouse, likewise did > the two new functions wibox_under_pointer and widget_under_pointer. > > A thing to improv

[Patch] object_under_pointer

2008-12-03 Thread Gregor Best
Hi people, during the past days, I worked on getting a object_under_pointer method to work for capi.mouse. The old client_under_pointer went to awful.mouse, likewise did the two new functions wibox_under_pointer and widget_under_pointer. A thing to improve is also returning a wibox in object_unde