changeset 6561:85e8ec504bff

RT-36375: Monocle, fix order of operations with Buffer in capture Reviewed-by: dblaukopf
author ddhill
date Tue, 25 Mar 2014 17:40:51 -0400
parents e260e71603ca
children 14580ce9a75e
files modules/graphics/src/main/java/com/sun/glass/ui/monocle/MonocleRobot.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/monocle/MonocleRobot.java	Tue Mar 25 13:43:32 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/monocle/MonocleRobot.java	Tue Mar 25 17:40:51 2014 -0400
@@ -181,8 +181,8 @@
             IntBuffer selection = IntBuffer.allocate(width * height);
             for (int i = 0; i < height; i++) {
                 int srcPos = x + (y + i) * screen.getWidth();
+                buffer.limit(srcPos + width);
                 buffer.position(srcPos);
-                buffer.limit(srcPos + width);
                 selection.put(buffer);
             }
             selection.clear();