rotation: check ec's rotating state before sending E_EVENT_CLIENT_ROTATION_CHANGE_BEG... 26/125126/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Fri, 14 Apr 2017 02:09:29 +0000 (11:09 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Fri, 14 Apr 2017 02:09:32 +0000 (11:09 +0900)
There was a bug that the E_EVENT_CLIENT_ROTATION_CHANGE_BEGIN event is sent twice, but
E_EVENT_CLIENT_ROTATION_CHANGE_CANCEL or E_EVENT_CLIENT_ROTATION_CHANGE_END is sent just once.

Change-Id: Ica751c2e613d85ab13e2ac74556e4563af545477

src/rotation/e_mod_rotation_wl.c

index 640f996..dd054ab 100644 (file)
@@ -1709,7 +1709,10 @@ e_client_rotation_set(E_Client *ec, int rotation)
      }
    eina_list_free(list);
 
-   _e_client_event_client_rotation_change_begin_send(ec);
+   if (e_client_rotation_is_progress(ec))
+     {
+        _e_client_event_client_rotation_change_begin_send(ec);
+     }
 
    ec->e.state.rot.pending_change_request = 0;
    ec->e.state.rot.ang.next = rotation;