Raising a GTK window that has been iconified



Hello all,

I have a GTK+ 1.2 app that I am maintaining.

When an operator presses certain buttons, we open new windows and display running information in them. Currently, when an operator presses a button for a data display that is already open, nothing happens. This is annoying when the window in question is iconified or hidden, because the operator has to then hunt through all their windows to find the correct one. It would be much nicer if the window popped to the top when the button was pressed.

From 18-Oct-2001 there was the following message:


/************ Quoted *************/

"Freivald, Joseph AT., GOVMK" <jfreivald att com> writes:
> gdk_window_raise(gtk_widget_get_parent_window(GTK_WIDGET(GTK_BIN(w_ptr)->child)));

Yes, what's all that. ;-)

Just do this:
 gdk_window_show (GTK_WIDGET (w_ptr)->window);

Havoc

/************ Unquote **************/


When I tried to do exactly that, it worked fine, but the side effect was that the destroy [X] button in the window titlebar became insensitive. This is undesireable.

I also tried to use instead gdk_window_raise(with same args), but that only worked if the window was not iconified. Worked fine if the window was hidden by other windows.

So, I have a few questions:

1) Is the behavior with gdk_window_show() not unusual, and I should simply connect to the destroy signal again? Or somehow otherwise work-around it?

2) Is there something else I can do to de-iconify a window before _raise()'ing it?

3) Are either or both of these behaviors likely to be caused by my window manager, and if so, what settings/behaviors should I try to change?


TIA,

Eric M. Monsler




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