Re: How can i switch window between two GTK+ APP. ?

I'm not sure I understand you fully here, but regardless I'll explain both of
the things you might be asking here,

- If you will combine the two apps into one app and have the GtkWidget * to
both windows then you can raise either by doing a
gdk_window_raise(window->window); so whenever you need to see the main app
raise its window and whenever you need to see the checker, raise its window.

- If they'll be running seperately then a pipe between the two apps and a
function in idle/timeout to check / read that pipe for commands of raise /
lower is one solution.

- Or make one of them read IPC signals and send the right IPC signal to its PID
and according to the signal react as you wish.

for a pipe example, take a look at gtk-theme-switch (it talks to itself)
for an IPC example take a look at SkipStone - it reads a url from an IPC signal
from itself also..

Both can be found at


On Thu, 12 Apr 2001 16:31:17 +0800, godsatan said:

Dear Sirs,
 I have 2 GTK+ app. One is main app and another is EMAIL-checker, both have
 gtk_main() and designed for different tasks. Recently, i need to combine
 these two app. Initially, main app runs first and i want to trigger the
 email-checker running later by press some remote controller keys. Here is my
 problem. In my system, i don't have mouse and keyboard to choose whick app's
 window i want to see. So, how can i swtich window from main to email-cheker
 or form email-checker to main? In other words, how can i get the widget or
 window id form another app? Please feel free to give me some advise, i need
 your help. Thanks a lot!!
 Best Regards,
 Calvin Chen
 gtk-app-devel-list mailing list
 gtk-app-devel-list gnome org

-- -- muhri muhri net

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