keyrouter: Fix wrong return value 03/278203/1
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 3 Jun 2022 09:05:12 +0000 (18:05 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 18 Jul 2022 05:58:47 +0000 (14:58 +0900)
According to implementation of pepper keyrouter which is a reference of
libds keyrouter, keyrouter_grab_check_grabbed() is supposed to return
true if a list of MODE_EXCLUSIVE is not empty.

This error seems to have been introduced by mistake during the
migration from pepper.

Change-Id: Ibc0d35bb4b7ba2c6381c248ddc0c861c83f6c8c1

src/libds-tizen/keyrouter/keyrouter_grab.c

index f5467ae4a689aea3a166aa022a9406da7bd9e585..053b3e85eb41a1a48b77988b948db8038b09cf6c 100644 (file)
@@ -79,9 +79,9 @@ keyrouter_grab_check_grabbed(struct ds_tizen_keyrouter_grab *keyrouter_grab,
     switch(type) {
         case TIZEN_KEYROUTER_MODE_EXCLUSIVE:
             if (wl_list_empty(list) == false)
-                ret = false;
-            else
                 ret = true;
+            else
+                ret = false;
             break;
         case TIZEN_KEYROUTER_MODE_OVERRIDABLE_EXCLUSIVE:
             ret = keyrouter_grab_check_duplicated_data(list, data);