[Xlib] Force Raise/Map/Focus a given Window

Daniel Stone daniel at fooishbar.org
Mon Aug 11 14:46:16 PDT 2008


On Mon, Aug 11, 2008 at 02:25:30PM -0500, Andrew Troschinetz wrote:
> I'm trying to force raise/present/focus a window in Gnome/Metacity  
> 2.18 (RHEL5) but it seems like a "don't steal focus" feature is  
> preventing me from doing so. The following code works in Gnome/ 
> Metacity 2.8 (RHEL4), but note quite in RHEL5.
> 
> What I mean is: If the window is minimized (unmapped) then the  
> following code will map, raise, and focus the window correctly in  
> either RHEL4 or RHEL5. But in RHEL5 only, if the window currently  
> doesn't have focus, but is mapped and raised (say another window has  
> focus and is ontop of the window I want to present), then the  
> following code only results in the taskbar item for the window blinking.
> 
> So my question is, is there a problem in my code? Is there a known  
> workaround for this, some Xlib function I should be calling here? Or  
> does anyone happen to know off the top of their head if this is a new  
> feature in RHEL5 that can be easily disabled?

No.  By design, the window manager has complete control over these kinds
of things.  Letting people subvert the 'don't steal my focus' mechanism
would utterly defeat the point of the 'don't steal my focus' mechanism.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20080812/d36b555a/attachment.pgp>


More information about the xorg mailing list