[vox-tech] "bring to front" X-window command
Peter Jay Salzman
p at dirac.org
Fri Sep 24 14:01:28 PDT 2004
On Fri 24 Sep 04, 1:44 PM, Mark K. Kim <lugod at cbreak.org> said:
> On Fri, 24 Sep 2004, Peter Jay Salzman wrote:
>
> > Mark, I think that is true. Window stacking is a function of the window
> > manager. Determining which part of a window needs to be refreshed when it
> > gets 'dirty', I think, is the responsibility of the wm.
>
> A window can request to the window manager for various things. Like where
> to be placed when it first comes up. So there's *some* facility for
> communication.
>
> > Also, my gimp doesn't bring the window to the foreground when I take a
> > screenshot.
>
> Got me curious I booted up Linux, and you're right -- it doesn't bring the
> window up. xv doesn't either. GIMP does bring window to the front under
> Windows but I guess that doesn't mean anything here.
>
> Try this instead: Fire up xmms, shuffle it to the back. Right-click on
> the program and it'll pop up a menu. From [Options], select "Always on
> Top". That'll bring the program to the front even if it's in the back.
>
> So there seems to be *some* facility for programs to request some sort of
> shuffling to the window manager. XMMS even knows how to move itself and
> detect screen edges, functions you'd think are only available to the
> window manger. It's doing it *somehow* in some generic X way without
> angering the window manager. I don't program X directly (not really,
> anyway) so I couldn't tell you how that happens, though.
>
> > But even if it did, how do you know that the request was made to
> > X and not the window manager?
>
> It would have to go through the window manager. I didn't say it didn't.
>
> > Maybe it sends signals to the window manager
> > via X.
>
> Which is what Jonathan was looking for -- a non-WM-specific way to bring a
> window to the front. Something that works with ALL window managers (or at
> least the nicely behaving ones) that isn't E-specific or KDE-specific or
> whatever. He doesn't care if the request goes through the window manager
> or not.
>
> -Mark
Yeah - I was thinking that it was a general mechanism for IPC rather than a
"low level xlib call". I thought you were advocating that there was a
specific xlib call for window stacking, which I didn't think was right.
Seems like that would be achived by a general IPC method.
However, it looks like I was *completely* wrong.
Jon, your xlib calls are:
XRaiseWindow(Display *display, Window w);
XLowerWindow(Display *display, Window w);
Pete
--
Make everything as simple as possible, but no simpler. -- Albert Einstein
GPG Instructions: http://www.dirac.org/linux/gpg
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
More information about the vox-tech
mailing list