0

I can do vice-versa using below api

Visual *gdk_x11_visual_get_xvisual (GdkVisual *visual);

but i don't find any api which can provide me GdkVisual* out of Visual*

Naseeb Panghal
  • 159
  • 1
  • 11
  • Use gdk_x11_screen_lookup_visual with visual ID from visual via XVisualIDFromVisual – n. m. could be an AI Apr 23 '18 at 07:22
  • Thanks @n.m. this is what i was looking for. Any idea to set particular GdkVisual from configuration file rather then coding? – Naseeb Panghal Apr 23 '18 at 09:31
  • No idea, it would probably be the wrong thing to do. An app should always find an appropriate visual dynamically, or just use the default one if it doesn't care. Setting e.g. a visual id in a config file means you are now tied to your particular x11 configuration and may have to edit your config with any change to x11, probably even when attaching a different monitor. – n. m. could be an AI Apr 23 '18 at 09:50

0 Answers0