Re: How to keep (force) window focus?



"David J. Topper" <topper virginia edu> writes:
> > I don't understand why they're moving to the back - is your window
> > manager using focus-follows-mouse and raise-on-focus?
> 
> Exactly right.  This is a problem in other applications too.  But I've seen
> some get around it (eg., KDEs desktop background color selector).  It at
> least won't drop behind the calling application.  Something like that would
> be fine ... but I'm not sure how to do it.

Perhaps they set the TRANSIENT_FOR hint
(gtk_window_set_transient_for()), many WM's will keep transients on
top of their parents.

> Maybe a callback for the window in question ... to check if it's raised or
> lowered ... or of that status has changed?  Then just always raise
> it?

That would produce a nice flicker effect, and maybe even an infinite
loop as you fought with the window manager. ;-) You generally don't
want to get into "try to undo what the WM is doing" mode, better to
just rethink the GUI or live with the problem or something.

My opinion is that the focus-follows-mouse/raise-on-focus combination
is a somewhat broken window management policy, but I'm sure reasonable
people will disagree.

Havoc





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