Re: [gtk-list] unknown window



On Mon, 28 Jun 1999, Harold Campbell wrote:

> I'm using the following code to catch substructure events off the root
> window:
> 
> 	rootwin = gdk_window_foreign_new(GDK_ROOT_WINDOW());
> 	gdk_window_add_filter(rootwin, rootwin_filter, tv);
> 	XSelectInput(GDK_DISPLAY(), GDK_ROOT_WINDOW(), SubstructureNotifyMask);
> 
> It yields me the following error when I minimize a window:
> 
> Gdk-Message: Got event for unknown window: 0x4c0001c
> 
> The window number of course changes depending on what was minimized.
> Under certain conditions I was getting BadWindow instead and crashing my
> program. I've fixed that, but I'm left with the above. How can I get rid
> of these errors?

this warning and the occasional ConfigureNotify event reordering that Gdk
currently does will be fixed in gtk+-1.2.4.
for now, you can only patch your current tree, eliminate the
"Got event for unknown window" warning from gdkevents.c and change:

[line 1666:]
    case ConfigureNotify:
      /* Print debugging info.
       */
-      while (XPending (gdk_display) > 0 &&
+      while (0 && /* don't reorder ConfigureNotify events at all */
+            XPending (gdk_display) > 0 &&
             XCheckTypedWindowEvent (gdk_display, xevent->xany.window,
                                     ConfigureNotify, xevent))
        {
          GdkFilterReturn result;


> 
> --
> Harold
> 

---
ciaoTJ



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