Re: proposal for a smarter behavior for raising windows on mouse click



On Tuesday 27 of January 2004 21:03, Martin Grimme wrote:
> Am Di, den 27.01.2004 schrieb Lubos Lunak um 20:24:
> >  Could you please explain step by step how this would work in the case of
> > drag&drop? Note that there exists something called start drag distance,
> > causing DND to be really initiated only after dragging for few pixels,
> > thus preventing unwanted DND, e.g. in case people are not too skilled
> > with the mouse. I sense few obstacles ahead.
>
> If the user drags the mouse with the button pressed, the wm should
> not raise the window.
>
> I played a bit with the metacity window manager and tried:
>
> - Store the mouse coords when receiving a ButtonPress event on a window
>   and focus the window.
> - Compare the current mouse coords with the stored ones when receiving
>   a ButtonRelease event and determine thus if the pointer has been
>   dragged. Raise the window only if the pointer motion is within a
>   threshold, e.g. 3 pixels.
>
> The problem that I had with this was that metacity did not receive
> ButtonRelease events when clicking on a widget which caught the event.
> In fact, only clicking on the status bar worked.

 That's why I asked. You're not going to get the ButtonRelease, since the app 
has the grab. And thus you can't do this kind of test. And you don't know if 
it's really going to be DND at the time of ButtonPress.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l lunak suse cz , l lunak kde org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]