ecore/wayland: Sync before assuming that there's no output. 95/3295/1
authorRafael Antognolli <rafael.antognolli@intel.com>
Mon, 8 Apr 2013 18:28:56 +0000 (15:28 -0300)
committerRafael Antognolli <rafael.antognolli@intel.com>
Mon, 8 Apr 2013 18:43:42 +0000 (15:43 -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 a5fbd27..24cb527 100644 (file)
@@ -314,6 +314,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)