Re: GtkWindow Z-order Issue



On Fri, 2009-01-30 at 08:19 -0800, Sundaram wrote:
Hi Larry,
Yeah, I know of this func. gtk_window_set_keep_above(). But this will
make the window stay 'Always on Top', which will get annoying, as this
is not a conscious decision by the user. The GTK+ API doc. warns us of
this as "Note that, according to the Extended Window Manager Hints
specification, the above state is mainly meant for user preferences
and should not be used by applications". Is there a way to achieve it
without setting the window's 'Always on Top' property?



How about:
gtk_window_set_keep_above(window, 1);
gtk_window_set_keep_above(window, 0);

This should bring it forward, then remove the requirement that it stay
there.

Alternatively, there is:
gdk_window_raise(gtk_widget_get_window(GTK_WIDGET (window)));
which is probably the best way to go.

-Larry
<larry yrral net>


______________________________________________________________________
From: Larry Reaves <larry yrral net>
To: Sundaram <legends2k yahoo com>
Cc: GTK+ DevList <gtk-app-devel-list gnome org>
Sent: Friday, January 30, 2009 8:48:06 PM
Subject: Re: GtkWindow Z-order Issue

On Fri, 2009-01-30 at 03:59 -0800, Sundaram wrote:
Hi,
I have written a thesaurus using GTK+. It registers itself for a
event callback with X Server for
a set hot key combination. When I get the call from X, I pop up the
thesaurus' main window with the word looked up. Everything works
fine,
but to pop up the window from the system tray, I call the
gtk_window_present() with my window handle, some times the app's
GtkWindow comes in front, above all windows. But most times, it
comes
up from the sys. tray, but is hidden behind some other window of
other
applications. What do I do to make sure its Z-order is the top most
when the user summons with the hot key?

Google says:

gtk_window_set_keep_above ()



Thanks!

Best Regards,
Sundaram




-Larry
<larry yrral net>

Best Regards,
Sundaram






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