viewport: check old type only if destination type is mode 82/174182/1
authorBoram Park <boram1288.park@samsung.com>
Thu, 29 Mar 2018 02:07:34 +0000 (11:07 +0900)
committerBoram Park <boram1288.park@samsung.com>
Thu, 29 Mar 2018 02:17:06 +0000 (11:17 +0900)
when destination type becomes mode(letterbox) -> rect -> mode(letterbox), second
mode(letterbox) setting was ignored because destination.mode.type is same with
first setting. So we have to check destination.mode.type only if destination type
is mode.

Change-Id: I6773745c077198c43ca11a818d62eb13d0a1e08a

src/bin/e_comp_wl_viewport.c

index 6b582e59bc8c8375a2da06c14e0eacabc7b156ff..c3e55f0a58b45972cf8117dc8df9dc9708c87f12 100644 (file)
@@ -344,11 +344,13 @@ _e_comp_wl_destination_mode_cb_set(struct wl_client *client,
         return;
      }
 
-   if (type != TIZEN_DESTINATION_MODE_TYPE_NONE)
-     viewport->type = DESTINATION_TYPE_MODE;
+   if (viewport->type == DESTINATION_TYPE_MODE && viewport->destination.mode.type == type)
+     {
+        PWR("skipped: set twice");
+        return;
+     }
 
-   if (viewport->destination.mode.type == type)
-     return;
+   viewport->type = DESTINATION_TYPE_MODE;
 
    PIN("type(%d)", type);