Re: _NET_WM_[GET_|TAKE_|REQUEST_]FOCUS & urgency



On 5/30/05, Robert McQueen <robot101 debian org> wrote:
> Lubos Lunak wrote:
> >  That said, if getting focus is just a configuration option in Gaim, then you
> > could use _NET_ACTIVE_MESSAGE with the source indication field saying it
> > comes from a tool that represent direct user action. Granted, in this case
> > saying those tools are taskbars, pagers and similar is somewhat imprecise,
> > but the logic stays - the option in Gaim is a kind of a direct user action.
> > Kopete does have such an option and does it this way.

Offering such an option would be a bug in Kopete, IMNSHO.  ;-)  It's
effectively a way for a client to say to the WM "I'm important--and
the way that you should notify the user that I'm important is to focus
my window".  WMs should decide policy (e.g. how important apps should
be handled and displayed to the user), not apps.  (Discussed further
below in the context of GAIM & raising)

> Gaim tended to use gtk_window_present for most of its new windows, but
> this caused focus stealing on everyone's WMs. Conversation windows (IMs
> and chats) were then modified to not use gtk_window_present, and instead
> merely show the window, which was a little better but not brilliant,
> because Metacity always focussed the new windows. Focus stealing
> prevention fixes this, which is cool.
> 
> Contrary to popular belief, Gaim does not raise conversation windows by
> default when messages arrive. There are options to raise conversation
> windows when messages arrive, and (used far more rarely) the buddy list
> whenever events take place such as buddies signing on or off. These
> default to off, but when on, call gdk_window_raise when the relevant
> event takes place.
> 
> As it stands, with Elijah's patch in #305882, the raise attempt will
> cause DEMANDS_ATTENTION to be set, with whatever associated notification
> (at least flashing in the taskbar). This means that from the user's
> point of view, who explicitly enabled window raising, GNOME 2.10/Gtk+
> 2.6 stops this option from working.

More precisely, metacity >= 2.9.13 no longer unconditionally follows
stacking configure requests. (gdk_window_raise() calls XRaiseWindow,
which results in the x server sending a stacking ConfigureRequest
event to Metacity)

> Is it the consensus of the list that in light of the fact this is the
> user explicitly asking for their focus to be stolen, these options
> should now cause Gaim to use _NET_ACTIVE_WINDOW with source indication 2
> (user) to *actually* raise the window as the preference says?

Not at all; I totally disagree with that sentiment.  My opinion is
that GAIM is buggy for offering such an option (though this is almost
certainly the fault of WMs & DEs that didn't support Urgency in the
past when they should have *cough*).  The description of Urgency
already explicitly lists raising the window as one possible thing that
a WM can do.  Apps shouldn't be specifying "I am important, and this
is how you should notify the user that I am import", they should
simply state "I am important, please notify the user."  The former
results in GAIM raising itself, app B focusing itself, app C focusing
and raising itself, app D having its button in the taskbar blink, app
E having some special applet present some kind of notification
message, etc., giving a totally inconsistent environment.  The latter
makes for a nice, consistent environment.  If the user doesn't like
how important apps are handled, they should complain to the WM/DE, NOT
to the application authors (unless, of course, apps are abusing or
neglecting or otherwise misusing the urgency or demands attention
hints).

I know that removing the GAIM option may not be desireable in the
short term (too many users with buggy WMs/DEs (i.e. all currently
deployed versions of Gnome)), but they could at least change the
option to read "request that the window be raised" or something
similar for now.

> The downside to this is that you lose the "free" blinking tasklist
> notification of messages arriving in your window, and have to fall back
> to the message notification plugin, which lets set the (now thankfully
> supported) URGENT hint, but this isn't much different to the pre 2.10
> situation.

...and the fact that it may result in people patching GAIM to fix the
bug that using _NET_ACTIVE_WINDOW would introduce, or patching
Metacity and other WMs to try to detect such buggy apps and ignoring
them.


Hope that helps,
Elijah



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