wcore-wayland - fix screen size get
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 26 Aug 2014 10:26:19 +0000 (19:26 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 26 Aug 2014 10:39:39 +0000 (19:39 +0900)
based on https://review.tizen.org/gerrit/#/c/26077/ - but with
comments, formatting changes and so on.

src/lib/ecore_wayland/ecore_wl.c

index 9b63f2e2c3db5cede39293e5fb8ed35e54a29c2d..6d4b25363f5c37e8f4b70380e6d9c3314064ec53 100644 (file)
@@ -317,6 +317,15 @@ ecore_wl_screen_size_get(int *w, int *h)
 
    _ecore_wl_init_wait();
 
+   // XXX: this code is dumb - screen size doesnt allow for > 1 output.
+   // the first sync is in case registry replies are not back yet
+   if (!_ecore_wl_disp->output)
+     {
+        // second sync is in case bound object replies in registry are not back
+        ecore_wl_sync();
+        if (!_ecore_wl_disp->output) ecore_wl_sync();
+     }
+
    if (!_ecore_wl_disp->output) return;
 
    switch (_ecore_wl_disp->output->transform)