< prev index next >

modules/graphics/src/main/native-glass/gtk/GlassRobot.cpp

Print this page
rev 9734 : 8087516: Conditional support for GTK 3 on Linux
Reviewed-by:

@@ -245,12 +245,11 @@
     (void)obj;
 
     GdkPixbuf *screenshot, *tmp;
     GdkWindow *root_window = gdk_get_default_root_window();
 
-    tmp = gdk_pixbuf_get_from_drawable (NULL, root_window, NULL,
-                                           x, y, 0, 0, width, height);
+    tmp = glass_pixbuf_from_window(root_window, x, y, width, height);
     screenshot = gdk_pixbuf_add_alpha(tmp, FALSE, 0, 0, 0);
     g_object_unref(tmp);
 
     jint *pixels = (jint *)convert_BGRA_to_RGBA((int*)gdk_pixbuf_get_pixels(screenshot), width * 4, height);
     env->SetIntArrayRegion(data, 0, height * width, pixels);
< prev index next >