Replacing a direct accessing to the e_comp->wl.disp 80/320980/1
authorjinbong.lee <jinbong.lee@samsung.com>
Wed, 11 Sep 2024 08:15:34 +0000 (17:15 +0900)
committerduna.oh <duna.oh@samsung.com>
Tue, 26 Nov 2024 08:30:07 +0000 (17:30 +0900)
  - e_comp_display_get() is used instead of accessing e_comp->wl.disp directly.

Change-Id: I2726ba9817a07f56f8891d5dcbf45d1e12de97d6

src/e_devicemgr_embedded_compositor.c

index 4fb9225a5f2a2b1e902547939aefa3008344b3f3..5da35abd476bc2a2c591dd56f01fe7fa31bfe19d 100644 (file)
@@ -70,11 +70,12 @@ _e_tizen_embedded_compositor_cb_bind(struct wl_client *client, void *data, uint3
 int
 e_devicemgr_embedded_compositor_init(void)
 {
-   if (!e_comp_wl) return 0;
-   if (!e_comp_wl->wl.disp) return 0;
+   struct wl_display *comp_display;
+
+   if (!(comp_display = e_comp_wl_display_get())) return 0;
 
    /* try to add tizen_embedded_compositor to wayland globals */
-   if (!(e_embedded = wl_global_create(e_comp_wl->wl.disp, &tizen_embedded_compositor_interface, 1,
+   if (!(e_embedded = wl_global_create(comp_display, &tizen_embedded_compositor_interface, 1,
                          NULL, _e_tizen_embedded_compositor_cb_bind)))
      {
         ERR("Could not add tizen_embedded_compositor to wayland globals");