Date: Wed, 15 Mar 1995 16:32:16 MST From: Warner Losh <imp@boulder.openware.com> To: David Ngai <ngaid@pcsdnfs1.eq.gs.com> Cc: oi-users@freefall.cdrom.com Subject: Re: Bringing a window to the top. Message-ID: <199503152332.QAA04570@marvin.boulder.openware.com> In-Reply-To: Your message of Wed, 15 Mar 1995 15:34:16 EST
index | next in thread | raw e-mail
: Does anybody know a way to make an obscurred window
: rise to the top?
:
: or to "always" stay on top?
Well, in general, you don't want to do this because you are fighting
with the window manager.
However, if you want to pick that fight, here's how :-) Basically,
you put a visibility notify on the outside X window, and when it
becomes obscured, you raise that window. This is from a program I
wrote where 'top' is an override redirect window (think toolbar menu),
but it should work with non-override redirect windows as well.
void
raise_me( const XEvent *ep, void *argp )
{
if (ep->xany.type == VisibilityNotify && ep->xvisibility.state != VisibilityUnobscured)
XRaiseWindow( ((OI_d_tech *) argp)->display(), ((OI_d_tech *)argp)->outside_X_window());
}
int
main( int argc, char ** argv )
{
// ...
top = oi_create_box( "top", 1, 1 );
cp->dispatch_insert( top->outside_X_window(), VisibilityNotify, VisibilityChangeMask, &raise_me, (void *) top );
// ...
}
Warner
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503152332.QAA04570>
