derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=48e0c6ea90a337a3f422a658cb826f7a548f88fd

commit 48e0c6ea90a337a3f422a658cb826f7a548f88fd
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Tue Mar 27 14:58:35 2018 -0500

    ecore_wl2: Fix ecore_wl2_window_output_find
    
    Window geometry x, y are the offset from the top left corner of the
    buffer, and not screen co-ordinates, so has nothing to do with output
    geometry and can't be used to determine which window we're on.
    
    Now that we track surface enter/leave events we can just give the first
    output in the list of outputs we know we're on.
---
 src/lib/ecore_wl2/ecore_wl2_window.c | 35 +----------------------------------
 1 file changed, 1 insertion(+), 34 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 4398ffd824..031287500a 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1187,42 +1187,9 @@ ecore_wl2_window_activated_get(const Ecore_Wl2_Window 
*window)
 EAPI Ecore_Wl2_Output *
 ecore_wl2_window_output_find(Ecore_Wl2_Window *window)
 {
-   Ecore_Wl2_Output *out;
-   Eina_Inlist *tmp;
-   int x = 0, y = 0;
-
    EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL);
 
-   x = window->set_config.geometry.x;
-   y = window->set_config.geometry.y;
-
-   EINA_INLIST_FOREACH_SAFE(window->display->outputs, tmp, out)
-     {
-        int ox, oy, ow, oh;
-
-        ox = out->geometry.x;
-        oy = out->geometry.y;
-
-        switch (out->transform)
-          {
-           case WL_OUTPUT_TRANSFORM_90:
-           case WL_OUTPUT_TRANSFORM_270:
-           case WL_OUTPUT_TRANSFORM_FLIPPED_90:
-           case WL_OUTPUT_TRANSFORM_FLIPPED_270:
-             ow = out->geometry.h;
-             oh = out->geometry.w;
-             break;
-           default:
-             ow = out->geometry.w;
-             oh = out->geometry.h;
-             break;
-          }
-
-        if (((x >= ox) && (x < ow)) && ((y >= oy) && (y < oh)))
-          return out;
-     }
-
-   return NULL;
+   return eina_list_data_get(window->outputs);
 }
 
 EAPI void

-- 


Reply via email to