diff options
author | Sebastian Dransfeld <sd@tango.flipp.net> | 2013-11-04 11:14:20 +0100 |
---|---|---|
committer | Sebastian Dransfeld <sd@tango.flipp.net> | 2013-11-04 11:16:05 +0100 |
commit | 51a7ff2847b364cbba9e9e311851cf8c7d7e4d4a (patch) | |
tree | 6c70cd5704d7e10ea418516a0fbc5a86179dbc1a /src/modules/conf_randr | |
parent | b67f6d64b1703b680484e52c583b0f9f8b616b37 (diff) | |
download | enlightenment-51a7ff2847b364cbba9e9e311851cf8c7d7e4d4a.tar.gz |
e/randr: lower monitor on middle click
If monitors are stacked above each other it is diffiult to find the
monitor below.
Diffstat (limited to 'src/modules/conf_randr')
-rw-r--r-- | src/modules/conf_randr/e_smart_monitor.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/src/modules/conf_randr/e_smart_monitor.c b/src/modules/conf_randr/e_smart_monitor.c index 080ed94c9e..131963c0c0 100644 --- a/src/modules/conf_randr/e_smart_monitor.c +++ b/src/modules/conf_randr/e_smart_monitor.c @@ -1720,31 +1720,38 @@ _e_smart_monitor_thumb_cb_mouse_down(void *data, Evas *evas EINA_UNUSED, Evas_Ob LOGFN(__FILE__, __LINE__, __FUNCTION__); ev = event; - if (ev->button != 1) return; /* try to get the monitor object */ if (!(mon = data)) return; - /* try to get the monitor smart data */ - if (!(sd = evas_object_smart_data_get(mon))) return; + if (ev->button == 1) + { + /* try to get the monitor smart data */ + if (!(sd = evas_object_smart_data_get(mon))) return; - /* set mouse pointer */ - _e_smart_monitor_pointer_push(sd->o_thumb, "move"); + /* set mouse pointer */ + _e_smart_monitor_pointer_push(sd->o_thumb, "move"); - /* set moving flag */ - sd->moving = EINA_TRUE; + /* set moving flag */ + sd->moving = EINA_TRUE; - /* record the clicked position */ - sd->mx = ev->canvas.x; - sd->my = ev->canvas.y; + /* record the clicked position */ + sd->mx = ev->canvas.x; + sd->my = ev->canvas.y; - /* record current size of monitor */ - evas_object_grid_pack_get(sd->grid.obj, mon, - &sd->prev.x, &sd->prev.y, - &sd->prev.w, &sd->prev.h); + /* record current size of monitor */ + evas_object_grid_pack_get(sd->grid.obj, mon, + &sd->prev.x, &sd->prev.y, + &sd->prev.w, &sd->prev.h); - /* raise the monitor */ - evas_object_raise(mon); + /* raise the monitor */ + evas_object_raise(mon); + } + else if (ev->button == 2) + { + /* lower the monitor */ + evas_object_lower(mon); + } } static void |