Re: focus stealing prevention (was Re: _NET_ACTIVE_WINDOW, revisited)



Lubos Lunak (l lunak suse cz):

> On Wednesday 27 of July 2005 20:12, Billy Biggs wrote:
> > If the app asks for focus to be given to a button, and we don't
> > think the window with the button has focus, we call
> > gdk_window_focus().  This is what happens when a new dialog is
> > opened: we haven't yet got the event from GTK+ to tell us that the
> > dialog has focus.
> 
>  Qt has actually two independent focuses - it has QWidget::setFocus()
> and QWidget::activateWindow(), first one just setting the internal
> focus inside one toplevel window, the other one causing window
> activation and changing the X focus. If you want to focus something
> in a dialog, just setFocus() does the job, assuming the window also
> has or will get the X focus.  QWidget::activateWindow() is rarely
> used, as it means fighting the window manager policy.
> 
>  No idea how Gtk handles this, but I'd expect something similar.

  SWT also has a setActive()/forceActive() pair of methods on our window
class, but regardless setFocus() is defined to also activate the window,
and I think changing that at this point would almost undoubtedly break
code.  :(

  -Billy




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