From 690fe7a4191e25125ade1f1bb86e59a730e83a1d Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Mon, 17 Dec 2012 09:20:13 +0000 Subject: [PATCH] Ignore mouse events on cloned monitors. Ignore resize events on cloned monitors. Ignore rotate events on cloned monitors. Don't set the moving flag if this monitor is cloned. Signed-off-by: Christopher Michael SVN revision: 81095 --- src/modules/conf_randr/e_smart_monitor.c | 25 +++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/modules/conf_randr/e_smart_monitor.c b/src/modules/conf_randr/e_smart_monitor.c index 82a360f3d..f1cd081a6 100644 --- a/src/modules/conf_randr/e_smart_monitor.c +++ b/src/modules/conf_randr/e_smart_monitor.c @@ -1160,6 +1160,10 @@ _e_smart_monitor_move_event(E_Smart_Data *sd, Evas_Object *mon, void *event) /* check for valid smart data */ if (!sd) return; + /* if this monitor is cloned into another one, then do not process + * any mouse move events */ + if (sd->cloned) return; + ev = event; /* calculate the difference in mouse movement */ @@ -1173,7 +1177,7 @@ _e_smart_monitor_move_event(E_Smart_Data *sd, Evas_Object *mon, void *event) e_layout_coord_canvas_to_virtual(sd->layout.obj, (sd->layout.x + dx), (sd->layout.y + dy), &nx, &ny); - /* factor in mouse movement */ + /* factor monitor size into mouse movement */ nx += mx; ny += my; @@ -1221,6 +1225,13 @@ _e_smart_monitor_resize_event(E_Smart_Data *sd, Evas_Object *mon, void *event) Evas_Coord nw = 0, nh = 0; Ecore_X_Randr_Mode_Info *mode = NULL; + /* check for valid smart data */ + if (!sd) return; + + /* if this monitor is cloned into another one, then do not process + * any mouse move events */ + if (sd->cloned) return; + ev = event; /* factor in drag resistance to movement and if we have not moved the @@ -1353,9 +1364,15 @@ _e_smart_monitor_rotate_event(E_Smart_Data *sd, Evas_Object *mon EINA_UNUSED, vo Evas_Map *map; int rotation = 0; Evas_Coord fx = 0, fy = 0, fw = 0, fh = 0; - ev = event; - /* if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; */ + /* check for valid smart data */ + if (!sd) return; + + /* if this monitor is cloned into another one, then do not process + * any mouse move events */ + if (sd->cloned) return; + + ev = event; /* get amount of rotation from the mouse event */ rotation = _e_smart_monitor_rotation_amount_get(sd, ev); @@ -1408,8 +1425,6 @@ _e_smart_monitor_rotate_event(E_Smart_Data *sd, Evas_Object *mon EINA_UNUSED, vo /* update rotation value */ sd->current.rotation = rotation; - /* ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; */ - /* NB: The 'snapping' of this rotation (in relation to other monitors) * occurs in the randr widget so we will just * raise a signal here to tell it that we rotated */