After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 111865 - no map-event signals generated when deiconifying a window
no map-event signals generated when deiconifying a window
Status: RESOLVED INCOMPLETE
Product: gtk+
Classification: Platform
Component: Backend: X11
1.3.x
Other Windows
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-04-29 19:21 UTC by cph
Modified: 2011-02-04 16:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description cph 2003-04-29 19:21:10 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);
}
Comment 1 cph 2003-04-29 19:31:57 UTC
I (cph) forgot to mention this bug could be reproduced in runtime
package gtk+-1.3.0-20030216.zip.
Comment 2 Tor Lillqvist 2003-04-29 22:09:56 UTC
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?
Comment 3 cph 2003-04-30 01:01:48 UTC
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.
Comment 4 Hans Breuer 2004-02-28 15:25:47 UTC
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. */

Comment 5 Javier Jardón (IRC: jjardon) 2010-10-29 16:49:16 UTC
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.
Comment 6 Fabio Durán Verdugo 2010-12-17 06:01:34 UTC
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!