Commit Graph

124 Commits

Author SHA1 Message Date
Marcel Hollerbach 28b0ce28ac e_bindings: do not crash when action is not found 2021-10-17 10:43:30 +02:00
Marcel Hollerbach 424a6a1930 move gesture recognition to e itself 2021-04-05 20:41:55 +02:00
Marcel Hollerbach ed5dcfbd60 gesture_recognition: Rework to use elput
With this:
- Support for gestures in X *and* wayland. Wayland does not require the
  libinput group hack
- Hotplugging support thanks to udev support

This requires a new rebuild of efl.
2021-04-01 15:15:11 +02:00
Christopher Michael a8eb8821f8 e_bindings: Remove unused variable 2020-08-22 14:41:07 -04:00
Marcel Hollerbach 4678fa60c2 Introduce gesture recognition
This is currently using libinputs gesture recognition. And offers a
config screen to setup new gestures.

1. No default gesture bindings are setup

2. When libinput is not available the module is not going to be loaded,
   and nothing is recognited.+

3. Only swipe gestures are recognized yet.

4. For now, you are required to be part of the input group, otherwise we cannot
   get the libinput events. (See Todo 1)

5. The visual representation is not really good. In terms of UI, it is
   visually showing a value coming from left to right, which is
   indicating a direction, which is not always the direction of the
   gesture, which is kind of bad. More improvements needed here.

Some things that still can be done:

1. The whole libinput things should be handled by elput, either with the
   input group hack, or logind, or simply by root. The ideal idea would
   be that e_sys is creating the elput context, which also listens for new
   devices etc.. When all this is done, and it recognizes a new device, it
   can simply sent a message from e_sys to e, that there is some new
   device, with a opened fd. (However, this all needs to be locked up in a
   way that e_sys cannot be abused)
2020-07-21 15:26:34 +02:00
Elyes HAOUAS 3524bc167c tree-wide: get rid of trailing whitespace (part 1)
Remove trailing white spaces.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11780
2020-05-14 12:30:31 +02:00
Mike Blumenkrantz fd4a942906 add e_binding function to return printable string of modifiers for mouse binding 2018-02-22 16:21:16 -05:00
Mike Blumenkrantz 92614d0c69 store the currently active key binding as an accessible variable 2017-09-21 13:31:01 -04:00
Mike Blumenkrantz 8cc46fb201 make e_bindings_modifiers_from_ecore() an externally usable function 2017-09-21 13:31:01 -04:00
Mike Blumenkrantz 98dbaa9090 fix clickable edge binding activation with other mouse buttons
check for the button specified in the binding, not whether the event
contains a click

fix T4510
2017-09-14 15:00:50 -04:00
Mike Blumenkrantz 8748b197fa implement action routing for wayland clients
this allows a wayland client to request that a given action name be bound
to the requested surface using a mode to restrict activation of the binding

modes include:
* shared
 - activated when any surface from the client has focus
* topmost
 - activated when the requested surface has focus and is the topmost client
* exclusive
 - activated when the requested surface has focus; blocks other action routes

 #SamsungFeatures

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-08-04 16:05:16 -04:00
Carsten Haitzler 011bb9711c e bindings - fix warning about uninitialized val
was not an actual bug, but compiler doesn't know better and we have
enough noise in warnings...
2017-08-04 14:51:50 +09:00
Derek Foreman 73aecd73ab Replace all timer_add with timer_loop_add
So yeah, I've literally used sed to replace every occurrence of
ecore_time_add() with ecore_timer_loop_add() because I'm reasonably
confident that no part of E has a legitimate need for timer based on the
exact current time.

It would be really nice if I'm not wrong. :)

The reason for this is the incredible spew of clock_gettime() calls I'm
seeing on an ARM system (that should have a vdso for gettime, but...)
This can amount to thousands of system calls per second.

 #YOLO
2017-02-03 15:52:28 -06:00
Chris Michael 92aa99b97a Use proper coordinate adjustment
This seems like just some copy/paste that was never corrected, however
when calculating coordinate adjustments we should be using the proper
values here. Previous code was using e_comp_canvas_x_root_adjust for
the Y value. This patch uses e_comp_canvas_y_root_adjust for Y
coordinates.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-12 10:44:23 -05:00
Carsten Haitzler 3903d44666 e - BLOODY BUILD AGAIN - DAMN FLOAT WARNINGS...
i swear ... all of this shit over a warning that CAUSED more bugs than
it eveer fixed? sersiously...

ARGH!
2017-01-07 14:05:17 +09:00
Mike Blumenkrantz 7264ac9e96 resolve binding+action float-equal warnings
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-01-06 12:57:34 -05:00
Mike Blumenkrantz 6f1f165d32 resolve certain double/float comparisons in with increased correctness
ref 03d0f1d2dc

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-01-06 12:57:28 -05:00
Carsten Haitzler a1541f9a40 e bindings - fix warnings about possible use of undefined var 2016-12-28 20:16:29 +09:00
Carsten Haitzler 03d0f1d2dc e - fix float warnings cmp where they actually may cause issues 2016-12-28 19:55:20 +09:00
Mike Blumenkrantz a1d0f97968 do not perform x11 mouse/wheel grabs for ANY binding contexts
these are traditionally compositor-only actions which may filter through
many different objects but are not meant to activate on window contents

resolves issues where some related mouse bindings were blocking input on windows
under x11

 #thingsthatneeddocs
2016-04-18 12:55:30 -04:00
Mike Blumenkrantz d4996e2db3 trigger mouse binding end callbacks on mouse up
broken by copy/paste errors last month

ref fe5d2e6e61
2016-03-04 13:08:09 -05:00
Derek Foreman 7063aa3bb8 Initialize pointer before passing to e_wheel_bindings_find()
It's going to dereference it, so init it to NULL.
2016-02-18 12:31:31 -06:00
Derek Foreman cd3a071519 Initialize pointer before calling e_bindings_mouse_button_find()
The pointer is dereferenced, so it should have an initialized value.
2016-02-18 11:50:18 -06:00
Mike Blumenkrantz 3f82a7f1fb return no binding found when trying to incrementally resolve end-of-list mousebinds
in the case where every binding until the end of the binding list has been rejected,
returning NULL must happen in order to inform callers that there is no more resolving
to be done, breaking out of an otherwise infinite resolve loop

ref fe5d2e6e61
2016-02-17 12:36:34 -05:00
Mike Blumenkrantz fe5d2e6e61 add bool return for mouse-based E_Action callbacks
in many cases, a mouse action's callback will fail to execute as a result of multiple
objects being under the pointer at the time of the event. in this case,
the callback should be able to determine whether action callback processing should
continue.

as an example, when attempting to execute an action which only activates for
client objects, if the passed object is not a client then the callback should return
false to indicate that it was not able to perform the action for the given object,
allowing further actions to be attempted on this object
2016-02-03 18:09:18 -05:00
Mike Blumenkrantz 39c6f1c33a ignore subsequent bindings with ANY context after finding a previous ANY binding
if multiple ANY bindings exist for a given event, return the first one found
2016-02-03 18:09:18 -05:00
Mike Blumenkrantz b5103ac3e2 compare key OR keyname in e_bindings_key_event_find()
keys such as tab will have different names in key and keyname, eg.
"Tab" vs "ISO_Left_Tab", and both names are valid for comparisons

thanks to @billiob for pointing out this regression
2016-02-01 11:31:57 -05:00
Mike Blumenkrantz 6544ae2c65 add back binding key->keyname check in e_bindings_key_event_find()
second copy/paste failure of the day...
2016-01-25 16:56:52 -05:00
Mike Blumenkrantz 6a20006ac2 prefer specific context activation for bindings over generic context
in the case where an ANY context action exists and a SPECIFIC context action
also exists for the exact same binding (eg. alt+click), the action which was
added to the config first would be activated

this is unreliable and confusing since it's impossible for users to determine
the order without either manually examining the config or clearing all bindings
and starting over, and this presupposes that the user is even aware of such an
issue

instead, now the most specific binding context will be chosen, with ANY used only
as a fallback in the case where no other binding could be activated for a given
scenario
2016-01-25 13:10:03 -05:00
Mike Blumenkrantz 37394b26c3 use event-finding functions to simplify key/edge binding handlers 2016-01-25 13:00:11 -05:00
Mike Blumenkrantz 93b106f17e add edge binding event find function
similar to key/mouse/wheel functions
2016-01-25 12:51:56 -05:00
Mike Blumenkrantz 6e3b9763b0 remove e_bindings_key_up_event_find, rename other one to e_bindings_key_event_find
key up and key down are identical, having two functions here is misleading
2016-01-25 12:38:45 -05:00
Mike Blumenkrantz c637c70f1c add extra param to e_bindings_key_down_event_find() to return found binding
this should match the corresponding mouse binding function
2016-01-25 12:27:54 -05:00
Mike Blumenkrantz 8500517e34 add function for disabling mouse/key/wheel/signal bindings
currently there are a lot of workarounds for inhibiting these bindings,
but it's getting harder to keep track of all the conditions and cases
where bindings need to be worked around

this should greatly simplify the process of toggling binding activation
in cases where such behavior is undesirable

acpi bindings are always allowed since they are unlikely to interfere with
operations where direct-input bindings would be harmful
2016-01-22 12:49:05 -05:00
Chris Michael 0a94e8ba71 enlightenment: Make E build again with EFL from git
sed -i 's/EAPI/E_API/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 15:13:10 -04:00
Mike Blumenkrantz 58447e9508 completely remove E_Manager
the final step in flattening all the canvas/screen apis
2015-03-19 16:53:32 -04:00
Mike Blumenkrantz 1fe1c94245 comp canvas functions no longer require an E_Comp param 2015-03-13 16:07:08 -04:00
Stefan Schmidt 8c60f2e02c e_bindings: de-e_comp_get()ify 2015-01-23 13:38:28 +01:00
Chris Michael 6dff3365e7 clean compiler warnings when building for wayland-only
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-03 13:28:42 -04:00
Mike Blumenkrantz 358ba0f36f e_bindings_key_allowed() handles NULL param
CID 1191998
2014-04-04 15:04:27 -04:00
Mike Blumenkrantz 6e72796544 check key events for both key and keyname bindings
fix T1119
2014-03-27 16:47:19 -04:00
Chris Michael 915f8f0613 @bugfix: Fix building for WAYLAND_ONLY by using the proper define
sed -i 's/WAYLAND_ONLY/HAVE_WAYLAND_ONLY/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-18 07:43:04 +00:00
Mike Blumenkrantz 4b58fa9a4e replace ev->keyname with ev->key
see efl 5ae4cfd1923e502731f4d8fc2bf67b1f536a9216
2014-03-13 13:03:34 -04:00
Mike Blumenkrantz 86656e4df9 compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.

* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.

** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes

** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects

** protocol-specific window management and compositor functionality is now kept exclusively in backend files

** e_pixmap api provides generic client finding and rendering api

** screen/xinerama screens are now provided directly by compositor on startup and re-set on change

** e_comp_render_update finally replaced with eina_tiler

** wayland compositor no longer creates X windows

** compositor e_layout removed entirely

* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra

* e_manager is just for screensaver and keybind stuff now, possibly remove later?

* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor

** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.

*** do NOT set interceptors on a client's comp_object. seriously.

* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor

* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get

* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas

* deskmirror is (more) broken for now

* illume is totally fucked

* Ecore_X_Window replaced with Ecore_Window in most cases

* edge binding XWindows replaced with regular canvas objects

* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result

comp files and descriptions:

e_comp.c - overall compositor functions, rendering/update loop, shape cutting

e_comp_x.c - X window management and compositor functionality

e_comp_wl.c - Wayland surface management and compositor functionality

e_comp_canvas.c - general compositor canvas functions and utilities

e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems

additional authors: ivan.briano@intel.com

feature: new compositor

removal: e_border, e_container, e_popup
2014-01-14 20:22:02 -05:00
Sebastian Dransfeld e818c83322 e: ignore signals with no signal
A signal needs a name to be handled.

CID 1040147
2013-12-10 20:31:26 +01:00
Carsten Haitzler 8462dc3c04 put in "key allowed" call in e_bindings for keys to filter out
problematic key binds. :)
2013-06-13 20:10:52 +09:00
Mike Blumenkrantz aa6a2d173d giant comp rejiggering commit because anything smaller would have broken something:
* remove xwin for container canvas: now drawn directly on the compositor canvas

* added SHAPE_DEBUG define for bored developers

* bindings now use new e struct for mouse/wheel events

* container+zone now get mouse events from smart callbacks instead of x events

* rename comp api namespace

* change comp underlay theme to have a swallow for the wallpaper

* add names to all zone/container/comp objects to make debugging much easier

* some minor related updates to go along with this

SVN revision: 83752
2013-02-07 13:20:07 +00:00
Mike Blumenkrantz 41759238cd a much requested feature: drag-only edge bindings
ticket #281


SVN revision: 83628
2013-02-05 13:13:33 +00:00
Mike Blumenkrantz c48fd0b06d giant commit that wipes all bindi^W^W^Wsplits out binding configs into a separate config domain so they can be more easily copied and so they won't be wiped in the event that primary config is wiped
also splits all binding lists out of e_config: they are now conveniently located in the global "e_bindings" struct


SVN revision: 83544
2013-02-01 10:21:54 +00:00
Mike Blumenkrantz 9e8e755cdf formatting: all at once
SVN revision: 82625
2013-01-11 10:34:29 +00:00