e_policy_wl: send tizen_position changed event while creating tizen_position resource 40/252940/1 accepted/tizen/6.0/unified/20210204.012131 submit/tizen_6.0/20210203.080807
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 3 Feb 2021 07:20:17 +0000 (16:20 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Wed, 3 Feb 2021 07:43:46 +0000 (16:43 +0900)
If the ec's position is not same to client's geometry which set by client,
then e send tizen_position changed event to the client to notice new position.

There was a bug that the window's position was not changed in below case.
"Hide -> Unset user geometry -> Show -> Set user geometry -> Move -> Resize".
This was because the ec's position was not same to the client's position.
In this case, ec's position was (0,0) and client's position was not (0, 0).

Change-Id: I53074b2de3bb98cb0aeff629a89776bcf1d380cb

src/bin/e_policy_wl.c

index d2537cfad227162b14a602e61ef1b5ca036f4c13..b799fb8d5f16b64a90c8d71164e6ee67bd8a7f61 100644 (file)
@@ -1277,6 +1277,15 @@ _tzpol_iface_cb_pos_get(struct wl_client *client, struct wl_resource *res_tzpol,
                                   _tzpol_iface_cb_pos_destroy);
 
    psurf->poslist = eina_list_append(psurf->poslist, res_tzpos);
+
+   // if ec's pos is not same to client's geometry (ec->comp_data->shell.window),
+   // then send tizen_position changed event
+   if (ec->comp_data)
+     {
+        if ((ec->x != ec->comp_data->shell.window.x) ||
+            (ec->y != ec->comp_data->shell.window.y))
+          e_policy_wl_position_send(ec);
+     }
 }
 
 void