ecore_evas/wayland: Call _ecore_evas_wayland_resize on window configure.
authorRafael Antognolli <rafael.antognolli@linux.intel.com>
Wed, 27 Feb 2013 22:12:58 +0000 (19:12 -0300)
committerRafael Antognolli <rafael.antognolli@linux.intel.com>
Thu, 28 Feb 2013 15:48:42 +0000 (12:48 -0300)
This will update the edges info inside the Evas_Engine_Info, and make it
correctly resize to the top/left if needed.

Also call ecore_wl_window_buffer_attach() on the egl engine, since it's
needed after the ecore_wl_window_update_size().

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c

index 45a5e1f..6af06db 100644 (file)
@@ -24,8 +24,10 @@ static Evas_Smart *_ecore_evas_wl_common_smart = NULL;
 static int _ecore_evas_wl_init_count = 0;
 static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[5];
 
-/* Frame listener */
+static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
 static void _ecore_evas_wl_frame_complete(void *data, struct wl_callback *callback, uint32_t tm);
+
+/* Frame listener */
 static const struct wl_callback_listener frame_listener =
 {
    _ecore_evas_wl_frame_complete,
@@ -186,6 +188,8 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
 
              win->server_allocation = win->allocation;
              ecore_wl_window_update_size(wdata->win, ev->w, ev->h);
+
+             _ecore_evas_wayland_resize(ee, win->edges);
           }
      }
 
index 0b3abfa..d2e7d99 100644 (file)
@@ -456,6 +456,7 @@ _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
              if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
                ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
           }
+        ecore_wl_window_buffer_attach(wdata->win, NULL, 0, 0);
 
         wdata->win->resizing = EINA_TRUE;
         evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
index 27e9865..efa0d66 100644 (file)
@@ -481,8 +481,12 @@ _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location)
    if (wdata->win) 
      {
         int fw, fh;
+        Evas_Engine_Info_Wayland_Shm *einfo;
         wdata->win->resizing = EINA_TRUE;
 
+        if ((einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas)))
+          einfo->info.edges = wdata->win->edges;
+
         evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
         ecore_wl_window_resize(wdata->win, ee->w + fw, ee->h + fh, location);
      }