elm_win: do deferred resize job first before calling rotation change callback 62/149562/4
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 12 Sep 2017 12:20:17 +0000 (21:20 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 14 Sep 2017 03:44:54 +0000 (03:44 +0000)
there was a bug that the elm_win didn't resize when an user called evas_object_resize
with previous width and height in "wm,rotation,changed" smart callback function.

Change-Id: I8ac58abbb51e4e4135ff742c1c8a77e0c246ac7d

src/lib/elm_win.c

index 4439b95c8fb90f1b9763a49a06dd807ed9385114..3af246bba9e9aeee453559be060a52e233e780e6 100644 (file)
@@ -1661,6 +1661,16 @@ _elm_win_state_change(Ecore_Evas *ee)
         _elm_win_xwin_update(sd);
 #endif
         elm_widget_orientation_set(obj, sd->rot);
+
+        /* if there are deferred resize job, do the job immediately
+           before calling rotation change callback */
+        if (sd->deferred_resize_job)
+          {
+             ecore_job_del(sd->deferred_resize_job);
+             sd->deferred_resize_job = NULL;
+             _elm_win_resize_job(obj);
+          }
+
         eo_do(obj, eo_event_callback_call
           (ELM_WIN_EVENT_ROTATION_CHANGED, NULL));
         eo_do(obj, eo_event_callback_call