xpra icon
Bug tracker and wiki

Opened 5 years ago

Closed 3 years ago

#698 closed task (worksforme)

gtk is confused about some win32 screen settings

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: minor Milestone: 2.0
Component: client Version: trunk
Keywords: gtk Cc:

Description (last modified by Antoine Martin)

It reports 42 bits per pixel on my screen.

As can be seen here in the gdk visual for win32 source (dead link - thanks gnome!)

https://git.gnome.org/browse/gtk+/tree/gdk/win32/gdkvisual-win32.c#n208

It says:

    g_error ("_gdk_visual_init: unsupported BITSPIXEL: %d\n", bitspixel);

  system_visual->depth = bitspixel;
  system_visual->byte_order = GDK_LSB_FIRST;
  system_visual->bits_per_rgb = 42; /* Not used? */

Now, I don't see the warning at all... but at least it doesn't crash.
We don't use the bits_per_rgb value for anything either, not yet anyway. But we should fix this before something bad happens.

For the record, on my system:

  • GetDeviceCaps(SIZEPALETTE) returns 0
  • GetDeviceCaps(BITSPIXEL) returns 32

No idea why we end up in the codepath that sets it to 42...

Change History (4)

comment:1 Changed 5 years ago by Antoine Martin

Milestone: 1.0
Owner: changed from Antoine Martin to Antoine Martin
Status: newassigned

Note: GTK3 is also affected..

Not the first time that GTK gets confused about pixel depth either: #654.

Last edited 5 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 3 years ago by Antoine Martin

Milestone: 1.01.1

Milestone renamed

comment:3 Changed 3 years ago by Antoine Martin

Milestone: 1.12.0

Milestone renamed

comment:4 Changed 3 years ago by Antoine Martin

Description: modified (diff)
Resolution: worksforme
Status: assignedclosed

Can no longer reproduce.

Note: See TracTickets for help on using tickets.