e_service_launcher: flush queue of target ec after launch done 33/231733/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 23 Apr 2020 12:25:01 +0000 (21:25 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Fri, 24 Apr 2020 04:05:45 +0000 (13:05 +0900)
Change-Id: If76c085ea07f89f3a3196db5ed495f3880091c2b

src/bin/services/e_service_launcher.c

index 7dfe53a1d3f630880ca0dc9a8e85ac6d49581c0b..594e3809cca897d0add8931048087b8b03f5e9d1 100644 (file)
@@ -1,6 +1,7 @@
 #include "e.h"
 #include "e_policy_wl.h"
 #include <tzsh_server.h>
+#include <wayland-tbm-server.h>
 #include "services/e_service_launcher.h"
 
 typedef struct _E_Service_Launcher         E_Service_Launcher;
@@ -1047,6 +1048,24 @@ _launcher_cb_launching(struct wl_client *client EINA_UNUSED,
      }
 }
 
+static void
+_launcher_target_ec_queue_flush(E_Service_Launcher *lc)
+{
+   struct wayland_tbm_client_queue *cqueue;
+
+   if (!e_comp_wl) return;
+   if (!lc) return;
+   if (!lc->target.ec) return;
+   if (!lc->target.ec->comp_data) return;
+   if (!lc->target.ec->comp_data->wl_surface) return;
+   if (e_object_is_del(E_OBJECT(lc->target.ec))) return;
+
+   cqueue = wayland_tbm_server_client_queue_get(e_comp_wl->tbm.server,
+                                                lc->target.ec->comp_data->wl_surface);
+   if (cqueue)
+     wayland_tbm_server_client_queue_flush(cqueue);
+}
+
 static void
 _launcher_cb_launch_done(struct wl_client *client EINA_UNUSED,
                          struct wl_resource *res_tws_lc,
@@ -1100,6 +1119,7 @@ _launcher_cb_launch_done(struct wl_client *client EINA_UNUSED,
      }
    else //normal launcher
      {
+        _launcher_target_ec_queue_flush(lc);
         if (lc->direction == TWS_SERVICE_LAUNCHER_DIRECTION_FORWARD)
           _launcher_post_forward(lc, EINA_TRUE);
         else if (lc->direction == TWS_SERVICE_LAUNCHER_DIRECTION_BACKWARD)