Console button
- From: Carlos Pereira <carlos pehoe civil ist utl pt>
- To: gtk-app-devel-list gnome org
- Subject: Console button
- Date: Thu, 7 Sep 2000 23:45:56 +0100
I use the following code to raise/lower the xterm from
where I launch my app. When the user presses a button
the parent xterm comes up, so the user can see stdout
messages and so, when she/he presses the button again the
xterm goes down.
This works great in Linux RH5.2 but in RH 6.0 with Gnome
apparently I am not so lucky. Anyway this WINDOWID variable
seems a poor, unsafe, way of getting the information I want.
What is the clean, solid, way of achieving this? In particular,
how to get the Window identification of the parent xterm, used
to launch the app and to write stdout? Xlib solutions are welcome.
Thanks!
Carlos
windowid = (char *) getenv ("WINDOWID"); /* console win */
Window console = (Window) atoi (windowid);
Display *display = GDK_WINDOW_XDISPLAY (window->window); /* app win */
XRaiseWindow(display, console);
XLowerWindow(display, console);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]