Skip redundant custom_starting_coordinates set request 81/101081/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 30 Nov 2016 08:16:30 +0000 (17:16 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 30 Nov 2016 08:17:10 +0000 (17:17 +0900)
Change-Id: I2d86973ce2f07f0d6a4bbb3ca1154a1ca1809d66

scl/scluiimpl.cpp

index 4b390db..0f7e444 100644 (file)
@@ -715,9 +715,13 @@ CSCLUIImpl::set_custom_starting_coordinates(sclint x, sclint y)
         CSCLResourceCache *cache = CSCLResourceCache::get_instance();
         CSCLWindows *windows = CSCLWindows::get_instance();
         if (cache) {
-            cache->set_custom_starting_coordinates(x, y);
-            if (windows) {
-                cache->recompute_layout(windows->get_base_window());
+            SclPoint coords = cache->get_custom_starting_coordinates();
+            /* Do not proceed if the new coordinates are same with the values that we currently have */
+            if (x != coords.x || y != coords.y) {
+                cache->set_custom_starting_coordinates(x, y);
+                if (windows) {
+                    cache->recompute_layout(windows->get_base_window());
+                }
             }
         }
     }