Commit Graph

100 Commits

Author SHA1 Message Date
Mike Blumenkrantz b80ddda9fb update gadget runner to (stabilized) efl api
efl-wl -> efl-canvas-wl
2020-03-12 12:15:42 -04:00
Carsten Haitzler c1f73110ac wl input - use eina mkstemp to handle umask right
fix CID 1403927
2019-08-06 19:58:26 +01:00
Derek Foreman a037001031 Send unique keymap fds to clients
Summary:
Prevent wayland clients from being able to destroy the compositor's
singleton keymap by making individual copies for each client.

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: cedric

Tags: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D6861
2018-08-17 12:28:49 -05:00
Mike Blumenkrantz aba428d86c add missing efl-wl header from mismerged commit
ref 9a484d1b64
2018-02-06 11:00:09 -05:00
Mike Blumenkrantz 9a484d1b64 add generic handling for passing xkb objects to efl-wl objects under wayland
ensure that keymaps are effectively propagated to efl-wl clients and that key
presses are always propagated
2018-01-24 16:18:57 -05:00
Mike Blumenkrantz b8f8c42aec make wl_pointer cursor handling state-based to correctly handle cursor visuals
this fixes a lot of corner cases such as apps which set their cursor before
receiving pointer.enter events
2017-11-03 13:21:57 -04:00
Mike Blumenkrantz b24b68df77 set null input regions for surfaces upon calling set_cursor or start_drag
these surfaces have no input region according to spec
2017-10-20 13:40:20 -04:00
Derek Foreman 9566b72e86 Fix crash when processing a wayland client cursor set after death
It looks like the only way we can get here with NULL resource data
is when we explicitly cleared it in the del hook, meaning the client
is dead to us.  In this case it's ok to ignore the cursor set request.

ref T4988
2017-09-08 14:38:08 -05:00
Derek Foreman 022dd52cd9 Remove more pre-ecore-drm2 stuff
We no longer need a HAVE_DRM2 define since it's become synonymous with
HAVE_WL_DRM.
2017-08-10 13:32:15 -05:00
Mike Blumenkrantz fd2817df4a use seat0 as default seat name instead of default 2017-06-23 17:49:44 -04:00
Mike Blumenkrantz 15ea942ab8 update wl input to use new keyboard context/keymap api
fix keymap changes on compositor canvas
2017-05-25 18:37:25 -04:00
Mike Blumenkrantz 2297427514 remove unused struct members 2017-04-21 16:16:38 -04:00
Mike Blumenkrantz f6e332946c add flag for wl clients to determine ssd mouse-in vs client mouse-in
better handling for moving mouse into ssd region with xwl clients
2017-03-24 13:17:24 -04:00
Mike Blumenkrantz b91d224a4d add Return and Caps_Lock handling to wl key event generation 2017-03-03 10:49:33 -05:00
Mike Blumenkrantz b228c95dce make wl key input generator take keynames instead of keycodes 2017-02-24 14:15:38 -05:00
Mike Blumenkrantz 0d4a52a240 fix return code checking for errors when generating wl key events 2017-02-10 17:24:13 -05:00
Mike Blumenkrantz 0acea1a2b1 add specific handling for xwl cursor unsetting on mouse-out to ssd
xwl clients will attempt to unset the cursor when mousing out of the surface,
but this can happen after evas events are triggered for the ssd due to
latency

if the given surface has mouse.in set, but the mouse is not inside the surface
area, assume that the mouse has just entered the compositor canvas

 #TheDisappointer
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz 036bcc1f67 hide wl client cursors when set_pointer is passed a null surface 2017-02-03 15:13:45 -05:00
Mike Blumenkrantz e2f8d2ba69 implement pointer-constraints v1
xwayland nyi
2017-02-03 15:13:45 -05:00
Chris Michael d01509cf26 fix formatting
NB: No functional changes, just cleanup formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-17 08:43:21 -05:00
Mike Blumenkrantz 5f246e079b set wl pointer surfaces to E_LAYER_CLIENT_PRIO during setup
these later get overridden onto the pointer layer, but setting a layer
here ensures that the pointer surface will always be the client
returned by e_client_top_get()
2016-12-02 10:54:06 -05:00
Chris Michael 2970f4d76f Revert "don't crash is surface resource has no e_client"
This reverts commit fbb17af2d6.

This does not really fix the issue of crashes on internal windows :(
This was just a band-aid really...
2016-10-31 13:57:52 -04:00
Chris Michael fbb17af2d6 don't crash is surface resource has no e_client
wl_resource_get_user_data(surface_resource) could return NULL if the
surface resource has no user data set. This happens with Ecore_Wl2
Windows which are set to type 'None', so add check for valid e_client.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-31 09:25:51 -04:00
Marcel Hollerbach d1e700cb68 e_comp_wl: introduce api to set index of keymap
this commit introduces the setting of the index. Setting the index here
means that the layout with the id 0..n, out of the compiled keymap file
will be used. After a new index is set the modifiers are updated, that
the client are aware of the new resulting group.

If the api is called before the compositor is inited (this can happen
in e_xkb, so the drm can use the keymap at startup) then the index is
saved in between and will be flushed once the compositor does the init.
2016-06-30 20:19:33 +02:00
Chris Michael 0d2b6b047c port enlightenment to use drm2
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 09:53:41 -04:00
Mike Blumenkrantz c9e168460e ensure that wl keymap is initialized, even if no configuration exists
fixes no-config crash

ref 62440eb5fe
2016-04-11 14:53:52 -04:00
Mike Blumenkrantz 0cb7013cda block wl keyboard modifier updating during input grabs 2016-03-31 11:21:23 -04:00
Marcel Hollerbach 62440eb5fe e_comp_wl: let keymaps be set when compositor is not running
if someone tries to set a new file to the wl compositor and it is not
running the values are cached now and setted when the compositor is
running.
2016-03-24 20:54:03 +01:00
Marcel Hollerbach 7cfb6f3d3f e_comp_wl: remove useless params from keymap_set 2016-03-24 20:54:03 +01:00
Marcel Hollerbach ab4e4e17cb e_comp_wl: allow variants and options for keyboard settings
Also set options and variants to the rule names struct.
There is no need to use strdup here the values are just freed in the
end.
2016-03-24 20:54:03 +01:00
Chris Michael ccd867e6ff destroy seat resource when we get a release request
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-16 08:40:41 -04:00
Derek Foreman 33582859e2 Don't allow deleted wayland clients to set the cursor 2016-03-08 12:46:32 -05:00
Chris Michael dfce9c44fe add prototype function for missing wl_seat interface
As we require wayland 1.10 now, the wl_seat_interface implementation
was missing a function pointer for the 'release' request. This patch
just implements a function placeholder until we can implement it.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-01 10:45:21 -05:00
Mike Blumenkrantz d6772d8911 update xkb.cur_group and send event upon serializing an EFFECTIVE layout in wl input
according to xkbcommon, the group returned from serializing the EFFECTIVE layout
is the one which is currently active. this array index should match up with the
list used in the xkb part of E_Config
2016-01-25 16:33:49 -05:00
Mike Blumenkrantz 8678e01ce9 do not update keymap group in _e_comp_wl_input_keymap_update()
this state is dead, and any group changes which have been made should
be reapplied based on the new state
2016-01-25 16:33:49 -05:00
Mike Blumenkrantz 892c4a44ca add render updates for cursor clients if damages exist during set_cursor
this indicates a cursor surface which has been committed but could not be
rendered due to lack of shell interface and cursor hint
2016-01-20 17:05:46 -05:00
Mike Blumenkrantz fbedd9dcac automatically mark wayland cursor surfaces as visible during set_cursor
a cursor client should be shown/hidden as needed despite its lack of a
shell interface, and having a special flag to identify these types of
surfaces makes it easier to do that
2016-01-20 17:05:46 -05:00
Mike Blumenkrantz 40c1e796fe add function for wayland compositors to generate (fake) keyboard events
in automated testing scenarios, being able to generate input events is useful
for detecting regressions related to keyboard actions

this depends on an xkbcommon function which is expected to be in the 0.6.0
release, so dlsym here in order to make that a runtime dependency for now
since this is not going to be a widely-used feature

 #SamsungFeatures
2016-01-20 17:03:17 -05:00
Derek Foreman 3304ea7b6c Remove inappropriate usage of %m
Summary:
printf %m stringifies and prints errno.  This is actually hugely confusing
if used in error messages after failures that don't set errno.

You may get "Success", or you may get an errno that was harmless ages
ago.

Some of the functions followed by %m have only some error paths that
set errno, or make multiple system calls that can set errno
independently - knowing the errno at failure time is unlikely to be
useful in these cases.

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3571
2016-01-14 12:41:47 -05:00
JengHyun Kang bdb462e19f Set cached xkb context/keymap
Summary:
Set xkb context and keymap to Ecore_Drm.
         In enlightenment (used in wayland with drm backend), keymap is used only one.
         So for avoid unnecessary open keymap files, set cached context and keymap.
         But for this, enlightenment must compile keymap before init ecore_drm.
         So I changed booting sequence also.

Test Plan: Distinguish time between before and after during add a keyboard device.

Reviewers: raster, devilhorns, zmike

Subscribers: cedric, input.hacker, ohduna

Differential Revision: https://phab.enlightenment.org/D3504
2016-01-05 13:07:27 -05:00
Chris Michael 7733e873fd Add function to clear and reload keyboard modifiers
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-11 13:30:03 -05:00
Chris Michael 2bdd6762ad Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-09 13:16:48 -05:00
Mike Blumenkrantz e5e31a2501 remove e_comp_wl struct keyboard repeat members
duplicating these from e_config serves no purpose

ref D3364
2015-11-30 14:15:47 -05:00
Sung-Jin Park 6826608961 (1) e_config.c/e_comp_wl.c: add code for making repeat values configurable
(2) e.src(s): add keyboard.repeat_delay, keyboard.repeat_rate into e.src files

Summary:
As of now, the default values of repeat delay/rate are being set in e_comp_wl.c.
Those values need to be configurable and will be used in e_comp_wl_init().
The limit of each of the values is defined from -1 to 1000. (maximum 1s).
If one of the two is negative, it means default repeat delay/rate are going to be used.
(e.g. delay:400, rate:25)

Test Plan:
N/A

Signed-off-by: Sung-Jin Park <input.hacker@gmail.com>

Reviewers: raster, stefan_schmidt, gwanglim, devilhorns, zmike

Subscribers: Jeon, ohduna, cedric

Differential Revision: https://phab.enlightenment.org/D3364
2015-11-30 14:05:10 -05:00
Derek Foreman 81ff082e0d Stop using MIN macros when choosing versions for wayland resources
Summary:
libwayland-server.so will post an error if the requested version
is higher than the supported one anyway, so there's no point in
doing this.

Using MIN() to pick versions is a client side idiom.

 #kansas

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3385
2015-11-26 20:12:47 -05:00
Mike Blumenkrantz 28b022d033 append new keyboard resources for wayland focused-client to the focused list
fixes all cases where applications would fail to receive focus initially
and then be permanently broken
2015-10-21 14:06:31 -04:00
Mike Blumenkrantz a832bb8ded fix typo in wayland keyboard resource unbind list management 2015-10-21 14:06:31 -04:00
Seunghun Lee b44d4ad339 e-comp-wl-input: don't leak the initial keymap.
Summary: remove xkb_map_ref() for keymap in _e_comp_wl_input_keymap_update().

Test Plan: N/A

Reviewers: devilhorns, zmike

Subscribers: ManMower, cedric

Differential Revision: https://phab.enlightenment.org/D3173
2015-10-19 11:43:07 -04:00
Mike Blumenkrantz b9c4911374 s/EAPI/E_API/ ...again 2015-09-28 15:51:51 -04:00
Seunghun Lee 26d352f219 Add module "wl_text_input" for supporting *wl_text_input* and *wl_input_method* protocol in wayland.
Summary:
this patch allow to use virtual keyboard such as weston-keyboard.
it was tested in wayland verion 1.6.

Test Plan:
<prerequisite>
- Configure with --enable-wl-text-input
- edit configuration file, e.cfg to enable module wl_text_input.

1. run enlightenment as a wayland display server.
2. run weston-keyboard.
3. run weston-editor.

Reviewers: raster, Sergeant_Whitespace, devilhorns, zmike

Reviewed By: zmike

Subscribers: ManMower, Sergeant_Whitespace, cedric, jihoon

Differential Revision: https://phab.enlightenment.org/D2275
2015-08-20 14:55:55 -04:00