send conformant area according to next angle when rotation begins 73/114473/4
authorDuna Oh <duna.oh@samsung.com>
Mon, 13 Feb 2017 11:07:58 +0000 (20:07 +0900)
committerDuna Oh <duna.oh@samsung.com>
Tue, 14 Feb 2017 00:10:19 +0000 (16:10 -0800)
Signed-off-by: Duna Oh <duna.oh@samsung.com>
Change-Id: Id92430c6933dcefa55d22668f18eb913465a6c59

src/bin/e_policy_conformant.c

index d4c0aa9f59ea27df398e57675120bc1fdccf0977..fca28725f0e4f0a6c931c7a4d86bf836ffc52a91 100644 (file)
@@ -621,12 +621,33 @@ _conf_cb_client_rot_change_begin(void *data, int evtype EINA_UNUSED, void *event
 {
    E_Event_Client *ev;
    Conformant_Type type;
+   E_Client *ec;
+   int i = -1;
+   int angle;
 
    ev = event;
+   ec = ev->ec;
 
    type = _conf_client_type_get(ev->ec);
    if (type >= CONFORMANT_TYPE_MAX)
      goto end;
+   if (!ec)
+     goto end;
+
+   if (g_conf->part[type].state.visible && type == CONFORMANT_TYPE_KEYBOARD)
+     {
+        angle = ec->e.state.rot.ang.next;
+        if ((angle % 90 != 0) || (angle / 90 > 3) || (angle < 0))
+          goto end;
+
+        i = angle / 90;
+        _conf_state_update(type,
+                           EINA_TRUE,
+                           ec->e.state.rot.geom[i].x,
+                           ec->e.state.rot.geom[i].y,
+                           ec->e.state.rot.geom[i].w,
+                           ec->e.state.rot.geom[i].h);
+     }
 
 end:
    return ECORE_CALLBACK_PASS_ON;