aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-04-16 12:35:36 -0400
committerChris Michael <cp.michael@samsung.com>2015-04-16 12:35:36 -0400
commitb41ed6a6f837d78f99beef3255c2d0be79c6d2dc (patch)
tree4ab8adc1ac02b21d40b15320d5e47f8edf76e9ea
parentecore-drm: Fix hotplugging of outputs (diff)
downloadefl-b41ed6a6f837d78f99beef3255c2d0be79c6d2dc.tar.gz
ecore-drm: Fix mouse movement across multiple outputs
Summary: When running E-Wl with multiple outputs, we could not previously move the mouse pointer across to the second output. This commit fixes that issue. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_drm/ecore_drm_evdev.c29
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c2
2 files changed, 11 insertions, 20 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c
index cbf58f3d4e..363c05c476 100644
--- a/src/lib/ecore_drm/ecore_drm_evdev.c
+++ b/src/lib/ecore_drm/ecore_drm_evdev.c
@@ -345,30 +345,23 @@ _device_pointer_motion(Ecore_Drm_Evdev *edev, struct libinput_event_pointer *eve
{
Ecore_Drm_Input *input;
Ecore_Event_Mouse_Move *ev;
- Ecore_Drm_Output *output;
+ int x, y, w, h;
if (!(input = edev->seat->input)) return;
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)))) return;
- if ((output = edev->output))
- {
- if (edev->mouse.ix < output->x)
- edev->mouse.dx = edev->mouse.ix = output->x;
- else if (edev->mouse.ix >= (output->x + output->current_mode->width))
- {
- edev->mouse.dx =
- edev->mouse.ix = (output->x + output->current_mode->width - 1);
- }
+ ecore_drm_outputs_geometry_get(input->dev, &x, &y, &w, &h);
- if (edev->mouse.iy < output->y)
- edev->mouse.dy = edev->mouse.iy = output->y;
- else if (edev->mouse.iy >= (output->y + output->current_mode->height))
- {
- edev->mouse.dy =
- edev->mouse.iy = (output->y + output->current_mode->height - 1);
- }
- }
+ if (edev->mouse.ix < x)
+ edev->mouse.dx = edev->mouse.ix = x;
+ else if (edev->mouse.ix >= (x + w))
+ edev->mouse.dx = edev->mouse.ix = (x + w - 1);
+
+ if (edev->mouse.iy < y)
+ edev->mouse.dy = edev->mouse.iy = y;
+ else if (edev->mouse.iy >= (y + h))
+ edev->mouse.dy = edev->mouse.iy = (y + h - 1);
ev->window = (Ecore_Window)input->dev->window;
ev->event_window = (Ecore_Window)input->dev->window;
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index 67bd68f56d..b59a66b73c 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -969,8 +969,6 @@ ecore_drm_outputs_geometry_get(Ecore_Drm_Device *dev, int *x, int *y, int *w, in
EINA_LIST_FOREACH(dev->outputs, l, output)
{
if (output->cloned) continue;
- ox += output->x;
- oy += output->y;
ow += MAX(ow, output->current_mode->width);
oh = MAX(oh, output->current_mode->height);
}