ecore_wl2: Don't set up callbacks on initial commit
authorDerek Foreman <derekf@osg.samsung.com>
Fri, 1 Sep 2017 17:03:49 +0000 (12:03 -0500)
committerDerek Foreman <derekf@osg.samsung.com>
Fri, 1 Sep 2017 17:29:05 +0000 (12:29 -0500)
We don't want to do frame callbacks until after we can actually draw stuff

src/lib/ecore_wl2/ecore_wl2_window.c

index f916ccf..afffdfd 100644 (file)
@@ -1394,10 +1394,12 @@ ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush)
    if (window->commit_pending)
      ERR("Commit before previous commit processed");
 
-   window->commit_pending = EINA_TRUE;
-   window->callback = wl_surface_frame(window->surface);
-   wl_callback_add_listener(window->callback, &_frame_listener, window);
-
+   if (!window->pending.configure)
+     {
+        window->commit_pending = EINA_TRUE;
+        window->callback = wl_surface_frame(window->surface);
+        wl_callback_add_listener(window->callback, &_frame_listener, window);
+     }
    if (flush)
      {
         wl_surface_commit(window->surface);