Re: Visual bell
- From: Bill Haneman <bill haneman sun com>
- To: Havoc Pennington <hp redhat com>
- Cc: Owen Taylor <otaylor redhat com>, desktop-devel-list gnome org
- Subject: Re: Visual bell
- Date: 23 Oct 2002 10:24:28 +0100
On Wed, 2002-10-23 at 07:22, Havoc Pennington wrote:
>
> Owen Taylor <otaylor redhat com> writes:
> >
> > I'm a little lost here about how we are going to decide what window
> > border to flash when an app calls gdk_beep() ... we could always
> > flash the focused window, but that would be confusing if some other
> > app/window is actually the one beeping...
If gdk_beep() were changed to pass the gdk _application_'s currently
focussed window to XkbBell (when XKB is available), then at worst the
wrong window would flash, but never the wrong application. I think that
would be a big step forward. I agree with Havoc that gdk_window_beep ()
would be a "Good Thing", and ideally we would deprecate gdk_beep (). Of
course we would still allow gdk_window_beep() with a NULL window param,
and do something consistent there.
But alas, it's not really always the focussed app that beeps at you, so
things that call plain old XBell() will have this potential consistency
issue.
Personally I think it's still worth the consistency cost in order to get
a "nicer looking" (and more performant) visual bell that Metacity could
provide via window decoration, and the potential for accurate beep
localization in the future (with gdk_window_beep() and a patched
gdk_beep() that uses XkbBell with the app's currently-focussed window).
If others agree, then I propose that we implement this, I can provide a
skeleton patch for Metacity (providing the notifications) and Havoc can
re-jig it to connect to whatever visual indication seems best. I also
think we should support the "flash the whole screen" option as a
configurable gconf setting.
This would mean of course that sawfish users would not have a visual
bell, but that's probably OK since I don't think the GNOME WM situation
is as heterogeneous in practice as it is in theory.
-Bill
> Xkb has an API that lets you pass in a window to the beep.
> When we aren't using that we just have to assume the focused window is
> beeping (this is almost always going to be true - the only thing I can
> think of that beeps is vi anyway, and it will beep when you type in
> it...).
>
> We should perhaps add gdk_window_beep()/gtk_window_beep() sometime.
>
> Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]