changeset 4299:e3c3c884cce1

RT-31119 Gtk: Wrong screen depth reported from native
author Alexander Zvegintsev
date Tue, 16 Jul 2013 15:07:54 +0400
parents a24be2f5230e
children 71b246b6efa0
files modules/graphics/src/main/native-glass/gtk/GlassApplication.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/native-glass/gtk/GlassApplication.cpp	Tue Jul 16 13:49:30 2013 +0300
+++ b/modules/graphics/src/main/native-glass/gtk/GlassApplication.cpp	Tue Jul 16 15:07:54 2013 +0400
@@ -71,13 +71,16 @@
     LOG4("[x: %d y: %d w: %d h: %d]\n",
             monitor_geometry.x, monitor_geometry.y,
             monitor_geometry.width, monitor_geometry.height)
+
+    GdkVisual* visual = gdk_screen_get_system_visual(screen);
+
     GdkRectangle working_monitor_geometry;
     gdk_rectangle_intersect(&workArea, &monitor_geometry, &working_monitor_geometry);
 
     jobject jScreen = env->NewObject(jScreenCls, jScreenInit,
                                     (jlong)monitor_idx,
 
-                                    gdk_screen_get_number(screen),
+                                    visual ? visual->depth : 0,
 
                                     monitor_geometry.x,
                                     monitor_geometry.y,