Bug in gnomepager_applet?

I've compiled and built the very latest version of GNOME for Alpha running
OSF1. Everything seems to work fine except for gnomepager. When I try to add
it to my panel, it bombs telling me that it is not possible to create
windows of type GDK_WINDOW_ROOT.

I had a look at the code and traced through the GDK stuff and found what I
think is the problem. In this snippet of code from gnomepager_applet.c, the
'window_type' attribute is not initialised, yet the GDK code seems to expect
it to be initialised. What happens is that it somehow either defaults to
being GDK_WINDOW_ROOT or takes the value 0 (which is GDK_WINDOW_ROOT).

Either way, GDK bombs the 'gdk_window_new' request and the pager doesn't

  /* advertise to a WM that we exist and are here */
      GdkAtom atom;
      GdkWindow *win;
      GdkWindowAttr attr;
      Window ww;

      atom = gdk_atom_intern("_GNOME_PAGER_ACTIVE", FALSE);
      attr.x = -99;
      attr.y = -99;
      attr.width = 88;
      attr.height = 88;
      win = gdk_window_new(NULL, &attr, 0);
      ww = GDK_WINDOW_XWINDOW(win);
      gdk_property_change(GDK_ROOT_PARENT(), atom, (GdkAtom)XA_WINDOW, 32,
                          GDK_PROP_MODE_REPLACE, (guchar *)(&ww), 1);
      gdk_property_change(win, atom, (GdkAtom)XA_WINDOW, 32,
                          GDK_PROP_MODE_REPLACE, (guchar *)(&ww), 1);

My solution, knowing virtually nothing about GDK, was to insert the line:

      attr.window_type = GDK_WINDOW_CHILD;

This seemed to fix everything and the pager seems to run fine. I didn't know
what type of window to make it, but this seemed to work okay. Maybe there
would be some kind of hidden problems?

Is this really a pager bug, or is it to do with my OSF1 environment?

David Hulse

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