classpath
[Top][All Lists]
Advanced

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

Re: Problems running GTK-peers on Nokia-770


From: Clemens Eisserer
Subject: Re: Problems running GTK-peers on Nokia-770
Date: Sun, 6 Nov 2005 15:00:31 +0000

> The strange thing is that I wrote a small test-sample myself which
> does succeed in both cases with a 16 and a 24 bit pixmap, also
> colormap creation works for both depths, I don't have any clue why it
> fails inside of classpath's peers.
Sorry for the confusion it was a bug in my simple test-program where I
requested the colormap both times from the same pixmap, it actually
turned out the it only works when creating a 16-bit pixmap.

This is the code I used for testing:
  printf("\nDepth: %d", gdk_rgb_get_visual()->depth);
  GdkPixmap* pix = gdk_pixmap_new (NULL, 10, 10, 16);
  void* cm = gdk_drawable_get_colormap ((GdkDrawable *)pix);
  printf("\nIt returned with 16-bit depth: %d", cm);
  fflush(stdout);

  GdkPixmap* pix2 = gdk_pixmap_new (NULL, 10, 10, gdk_rgb_get_visual()->depth);
  void* cm2 = gdk_drawable_get_colormap ((GdkDrawable *)pix2);
  printf("\nIt returned with gdk_rgb_get_visual()->depth: %d\n", cm2);
  fflush(stdout);

And it prints the following output running on my Nokia770:
Depth: 24
It returned with 16-bit depth: <Some valid integer>
It returned with gdk_rgb_get_visual()->depth: 0

On my Xorg-6.8.2 system powered by a nvidia card runnig in 24-bit mode
its different of course:
Depth: 24
It returned with 16-bit depth: 0
It returned with gdk_rgb_get_visual()->depth: <Some valid integer>

So could this be a bug in the GTK version used on the 770 or is
classpath just using GTK in a way which is not always guaranteed to
work?

Sorry for nerving that much and thank you in advance, lg Clemens




reply via email to

[Prev in Thread] Current Thread [Next in Thread]