ecore/wayland: Sync before assuming that there's no output.
authorRafael Antognolli <rafael.antognolli@intel.com>
Fri, 5 Apr 2013 20:26:00 +0000 (17:26 -0300)
committerRafael Antognolli <rafael.antognolli@intel.com>
Fri, 5 Apr 2013 20:26:00 +0000 (17:26 -0300)
This will make the mainloop block waiting for the output info, if it's
not there yet, but it's better than just returning with no screen size.

src/lib/ecore_wayland/ecore_wl.c

index 97dfb6b..dd6829d 100644 (file)
@@ -220,6 +220,9 @@ ecore_wl_screen_size_get(int *w, int *h)
    if (w) *w = 0;
    if (h) *h = 0;
 
+   if (!_ecore_wl_disp->output)
+     ecore_wl_sync();
+
    if (!_ecore_wl_disp->output) return;
 
    switch (_ecore_wl_disp->output->transform)