Re: window iconification



Hi,

z2274394 student unsw edu au wrote:
I had a look at it. It seems it doesnt handle the "restore" event. Ie,  when it
is "un-minimized". Does anybody know how to catch this? 

I am not sure if there are different signals for catching minimize and
maximize event states. According to the comments in gtkwindow.c file, we
can track iconification/maximization through "window_state_event" signal
only. 

Also is there anyway to  retrieve wheather a window state is inconfied?

ie some function like
gboolean gtk_widget_is_iconfiied(GtkWindow *)
would be useful.

Guess, you can try using gdk_window_get_state(), which will return
window state bitfield. For example,

        GdkWindowState state;
        if (widget->window) {
                state = gdk_window_get_state (widget->window);
                if (state & GDK_WINDOW_STATE_ICONIFIED) {
                        //Window is in iconified state.
                }
        }
                
Thanks,
Narayana

Quoting Narayana Pattipati <narayana pattipati wipro com>:


Hi,

You can catch "window_state_event" and know the window states
(iconified, maximised etc.)

Have a look at gtk+/tests/testgtk.c on how to use it.

Regards,
Narayana

z2274394 student unsw edu au wrote:

Dear Noble Gtk Developers.

1) How do I attach a callback when user minimizes a top level window?
2) How do I attach a callback when user restores a top level window?

Thank you for you contribution
Johnson
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Confidentiality Notice

The information contained in this electronic message and any attachments to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
Mailadmin wipro com immediately
and destroy all copies of this message and any attachments.


----- End forwarded message -----

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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