Re: Gdk GC and Associated Colormap

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

 



Is the same color depth is used on each display?

On 10/16/07, Richard Boaz <riboaz@xxxxxxxxx> wrote:
Hi,

I'm having a bit of a strange problem and wonder if anyone has any advice
on how to track it down further.

I have the following code (snippet) (this has been executing fine for the
last 2 years on various LINUX flavors, MAC OS X, and Solaris):

=====
gc = gdk_gc_new(da->window);
gdk_gc_set_rgb_fg_color (gc, fg);
gdk_gc_set_rgb_bg_color (gc, bg);
=====

where da is a previously created drawing area, and fg and bg are
appropriately defined and set.

But now, given the following two machines:
Machine A: OS = Opensuse 10.3, GTK+ = 2.12.0
Machine B: OS = Opensuse 10.1, GTK+ = 2.8.10

I am having problems displaying to machine A.

Execution and Display Combinations return the following:
1) Execute on Machine A, same display, returns the following error (twice)

Gdk-WARNING **: gdk_gc_set_rgb_fg_color() and gdk_gc_set_rgb_bg_color()
can only be used on GC's with a colormap. A GC will have a colormap if it
is created for a drawable with a colormap, or if a colormap has been set
explicitly with gdk_gc_set_colormap.

followed by a single X11 error message (asynchronously reported, of course):
...
The error was BadMatch (invalid parameter attributes)
error_code 8 request_code 70 minor_code 0
...

2) Execute on Machine B, same display
Program executes fine

3) Execute on Machine A, display to Machine B
Program executes fine

4) Execute on machine B, display to Machine A
I receive the same warning/error as in 1) above.

The conclusions I draw from this:
1) on machine A, the call to gdk_gc_new() does return a gc, but this gc
does not end up having a colormap associated with it for some reason.
2) since the same program on machine A displays fine on machine B, this
has something to do with the display, or X11, or ...?
3) some call to X11 fails and, I think, causes all other downstream
problems.  (what is request_code = 70?)

Does anybody have any idea what this could relate to and why this would be
happening?  Is it possible that a drawing area can be created, the window
for it defined, while a colormap is not created for a gc's definition?
(fyi: other display programs using color, e.g. firefox, display fine on
machine A.)

Any pointers or advice as to how I can track this down would be appreciated.

cheers,

richard boaz

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list



--
http://www.socsurveys.org/
http://blogger.socsurveys.org/
http://del.icio.us/hdon
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux