GNOME Bugzilla – Bug 111865
no map-event signals generated when deiconifying a window
Last modified: 2011-02-04 16:20:32 UTC
On Linux machines, I'll get a map-event signal when I deiconify a window. I do not get any map-event signal when I deiconify a window on MS Windows machines. Attached is the code I use to find out what signals are generated when I iconify/deiconify a window. Thank you. #include <gtk/gtk.h> void callback2 (GtkWidget *widget, gpointer data) { g_print ("%s\n", (char *) data); } void callback3 (GtkWidget *widget, GdkEvent *event, gpointer data) { g_print ("%s\n", (char *) data); } int main( int argc, char *argv[] ) { GtkWidget *window; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_signal_connect (GTK_OBJECT (window), "map-event", GTK_SIGNAL_FUNC(callback3), "map-event"); gtk_signal_connect (GTK_OBJECT (window), "unmap-event", GTK_SIGNAL_FUNC(callback3), "unmap-event"); gtk_signal_connect (GTK_OBJECT (window), "map", GTK_SIGNAL_FUNC(callback2), "map"); gtk_signal_connect (GTK_OBJECT (window), "unmap", GTK_SIGNAL_FUNC(callback2), "unmap"); gtk_signal_connect (GTK_OBJECT (window), "show", GTK_SIGNAL_FUNC(callback2), "show"); gtk_signal_connect (GTK_OBJECT (window), "hide", GTK_SIGNAL_FUNC(callback2), "hide"); gtk_signal_connect (GTK_OBJECT (window), "realize", GTK_SIGNAL_FUNC(callback2), "realize"); gtk_signal_connect (GTK_OBJECT (window), "unrealize", GTK_SIGNAL_FUNC(callback2), "unrealize"); gtk_signal_connect (GTK_OBJECT (window), "property-notify-event", GTK_SIGNAL_FUNC(callback3), "property-notify-event"); gtk_signal_connect (GTK_OBJECT (window), "visibility-notify-event", GTK_SIGNAL_FUNC(callback3), "visibility-notify-event"); gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC(gtk_main_quit), NULL); gtk_widget_show (window); gtk_main (); return(0); }
I (cph) forgot to mention this bug could be reproduced in runtime package gtk+-1.3.0-20030216.zip.
GTK+ 1.3.0 (the special branch for Win32) isn't really getting much attention these days. (As long as GIMP 1.2 works well enough with it.) Have you checked the behaviour with GTK+ 2.2.1?
I just installed all the necessary GTK+ 2.2.1 stuff available at www.gimp.org/win32 as of 29 April 2003. The test result in GTK+ 2.2.1 is worse than that in GTK+ 1.3.0. GTK+ 2.2.1 does not signal any map-event upon a window's deiconification; nor does it signal any unmap-event when a window is iconified.
At the place in gdkevents-win32.c where this would be implemented there is a it would be wrong, so I guess this is just a WONTFIX or NOTABUG (not that I could claim to know the differnce between unmap and iconifying) : case WM_SIZE: GDK_NOTE (EVENTS, g_print (" %s %dx%d", (msg->wParam == SIZE_MAXHIDE ? "MAXHIDE" : (msg->wParam == SIZE_MAXIMIZED ? "MAXIMIZED" : (msg->wParam == SIZE_MAXSHOW ? "MAXSHOW" : (msg->wParam == SIZE_MINIMIZED ? "MINIMIZED" : (msg->wParam == SIZE_RESTORED ? "RESTORED" : "?"))))), LOWORD (msg->lParam), HIWORD (msg->lParam))); if (msg->wParam == SIZE_MINIMIZED) { /* Don't generate any GDK event. This is *not* an UNMAP. */
Thank you for taking the time to report this bug and helping to make GTK+ better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in GTK+ since that time you reported the bug and your problem may have been fixed with some of the updates. It would help us a lot if you could test a current, supported, GTK+ version (2.22 or, even better, current master). If you can test it, and it is still an issue, we would appreciate if you could upload any log / test case that are relevant for this particular issue.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!