fix: XSetErrorHandler wrong position 2.1b_release accepted/tizen_2.1/20130425.024316 submit/tizen_2.1/20130424.234757
authorBoram Park <boram1288.park@samsung.com>
Thu, 11 Apr 2013 10:07:04 +0000 (19:07 +0900)
committerBoram Park <boram1288.park@samsung.com>
Thu, 11 Apr 2013 10:14:20 +0000 (19:14 +0900)
Change-Id: Ib54c05da6abf5b35c7cd0f60c10f3706cb23d8b6

packaging/libslp-utilx.spec
x11.c

index 4fbfd0f..d5c581c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libslp-utilx
 Summary:    utilX
-Version:    0.1.21
+Version:    0.1.22
 Release:    1.1
 Group:      UI Framework/Libraries
 License:    Apache-2.0
diff --git a/x11.c b/x11.c
index b4b2e70..b3622fa 100644 (file)
--- a/x11.c
+++ b/x11.c
@@ -1897,9 +1897,6 @@ utilx_create_screen_shot (Display* dpy, int width, int height)
 
     XSync (dpy, 0);
 
-    x_error_caught = False;
-    old_handler = XSetErrorHandler (_screen_shot_x_error_handle);
-
     info = _init_screen_shot (dpy, width, height);
 
     if (!info)
@@ -1908,6 +1905,11 @@ utilx_create_screen_shot (Display* dpy, int width, int height)
         return NULL;
     }
 
+    XSync (dpy, 0);
+
+    x_error_caught = False;
+    old_handler = XSetErrorHandler (_screen_shot_x_error_handle);
+
     XvGetStill (info->dpy, info->port, info->pixmap, info->gc,
                 0, 0, info->width, info->height,
                 0, 0, info->width, info->height);