summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-03-27 14:58:35 -0500
committerDerek Foreman <derekf@osg.samsung.com>2018-04-11 16:29:07 -0500
commit48e0c6ea90a337a3f422a658cb826f7a548f88fd (patch)
treeed5c76a446f21e95e549e98d067732a58967bdef
parentf560c76b528753ab8a478e5a6f314838eac02221 (diff)
downloadefl-48e0c6ea90a337a3f422a658cb826f7a548f88fd.tar.gz
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.
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c35
1 files changed, 1 insertions, 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