Re: Still need a hint for undecorated windows



On Fri, 01 Jul 2005 09:53:20 -0400 Havoc Pennington <hp redhat com> babbled:

> On Fri, 2005-07-01 at 12:21 +0200, Philipp Lohmann - Sun Germany - ham02
> - Hamburg wrote:
> > We're mixing two things here. As you correctly say the original popup
> > implementation without grabbing had its drawbacks in "focus strictly
> > under mouse" case, because leaving the window even when entering just
> > the override redirect popup would cause the WM to take the focus out of
> > the app window. Still i got the focus into the popup which was IMHO a
> > bug in the WM (metacity in that case).
> 
> It's not a bug in the WM that I see, except for the fact that "focus
> strictly under mouse" is inherently a bug ;-) The difference between

i would disagree myself on that point as well written handling of these events
will work :)

> strictly and sloppy is that in strict mouse focus you unfocus on
> LeaveNotify (and popups do cause a LeaveNotify). Is there some easy fix
> other WMs use?

check the mode and detail members of the leave notify - they indicate WHY it
left. ie left to a parent or sibling or child, and why - a mouse grab, ungrab
etc. ie i abort handling the out event in the following cases (early on in
checking if the event is for this window etc.)
        if ((ev->mode == ECORE_X_EVENT_MODE_UNGRAB) &&
            (ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR))
          return 1;
        if (ev->mode == ECORE_X_EVENT_MODE_GRAB)
          return 1;
        if ((ev->mode == ECORE_X_EVENT_MODE_NORMAL) &&
            (ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR))
          return 1;

works well for ooo... though firefox is nasty. it keeps manually grabbing and
ungrabbing the mouse betwene each top-level menu on the menu bar instead of just
retaining the grab once, thus my moue enter handling keeps thinking the mouse
goes in as it should normally on a notify on an ungrab anyway...

> I firmly believe that mouse focus modes can't be made to work correctly,
> and that apps can't sanely be written to work well with all focus modes
> at once, and that a sane platform would therefore hardcode click to
> focus mode and be done with it so apps could be designed well, but I
> have these modes in metacity anyway due to extensive whining ;-)

i think they can. if we removed all focus modes except for passive focus life
would be easier.  the x focus policies have an in-built race condition as far as
take focus goes already. i know at least 75& of all my users would kill me if i
hard-coded to click to focus - they'd skin me alive. click to focus is less
efficient and much more painful (imho) than pointer or sloppy focus. declaring a
lowest common denominator in the name of simplicity is just taking the easy way
out and reducing usability in the long run. :)

> Havoc
> 
> 
> _______________________________________________
> wm-spec-list mailing list
> wm-spec-list gnome org
> http://mail.gnome.org/mailman/listinfo/wm-spec-list
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster rasterman com
裸好多                              raster deephackmode org
Tokyo, Japan (東京 日本)



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