Commit Graph

676 Commits

Author SHA1 Message Date
Chris Michael 2ed81b0948 ecore-wl2: Formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-08-30 09:10:55 -04:00
Mike Blumenkrantz 91f513f77d ecore-wl2: normalize axis event values
this is value * 10 from the compositor, so /= 10 to get real value

fix T5427

@fix
2017-08-25 14:48:11 -04:00
Derek Foreman 913e216ea3 ecore_wl2: Send configure complete when windows don't need configure
The intent of the "configure complete" event is to indicate that the
window is configured and ready to receive buffers.

For "windows" like mouse cursors, that's immediate - let them know.
2017-08-18 14:27:32 -05:00
Derek Foreman 9df39b5616 ecore_wl2: Refactor out code to send window configure complete event 2017-08-18 14:27:32 -05:00
Derek Foreman 51768ff62b ecore_wl2: Add ecore_wl2_window_buffer_attach API
Let ecore_wl2 track some buffer related state so we can more easily sync
things between ecore_evas and the evas_engines.
2017-08-18 14:27:32 -05:00
Derek Foreman 8f038b2591 ecore_wl2: Add new APIs ecore_wl2_window_frame_callback_add/del()
Abstract frame callbacks through ecore_wl2_window so we can add them in
multiple places without having the wayland compositor generate more than
one.

Also allows us to keep a callback registered over hide/unhide of a window
easily.
2017-08-18 14:27:32 -05:00
Derek Foreman b599b1b900 ecore_wl2: Add API ecore_wl2_window_pending_get()
Lets us test if a commit has been requested but the compositor hasn't
yet told use to draw new content for it.
2017-08-18 14:27:32 -05:00
Derek Foreman 11d3bf7939 ecore_wl2: Add API ecore_wl2_window_commit()
Abstract wl_surface commits in ecore_wl2_window.
2017-08-18 14:27:32 -05:00
Mike Blumenkrantz dc073c1ea3 wayland: fix num/caps lock handling in events
locks are not the same as modifiers, and the corresponding event flag must
be set based on whichever value(s) are set instead of yolo mixing and matching

@fix

ref T5737
2017-08-18 15:24:37 -04:00
Mike Blumenkrantz 5ffb7d423c wayland: set min/max size hints to surface before show
with deferred surface creation the first canvas change of hints may not
be able to trigger protocol methods for size hints, so ensure that hints are
set
2017-08-11 18:43:13 -04:00
Mike Blumenkrantz f00a49835d wayland: remove xdg5 support
this has not been used or tested since last year and there are no major
compositors which lack xdg6 support
2017-08-11 18:43:12 -04:00
Mike Blumenkrantz 398ffe40a3 wayland: fix xdg-shell popup windows
@fix
2017-08-11 18:43:12 -04:00
Chris Michael 42b082fe36 ecore-wl2: Add support for Window Iconify State Change
This patch adds support for the Window Iconify State Change event
structure and the ecore event type to support it.

'#divergence'

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-08-08 09:53:52 -04:00
Mike Blumenkrantz 9a189d29d0 wayland: add efl-hints protocol for setting aspect on surfaces
@feature
2017-08-04 16:15:43 -04:00
Mike Blumenkrantz f03028d22f wayland: fix min/max size setting
also don't set arbitrary hints on init

@fix
2017-08-04 16:10:42 -04:00
Mike Blumenkrantz 99b60390f4 ecore-wl2: sync aux hints after window creation
ensure hints are available when needed

@fix
2017-08-04 16:10:35 -04:00
Mike Blumenkrantz f2627d49c1 ecore-wl2: don't send null set_parent requests for every window
this is redundant

@fix
2017-08-04 16:10:34 -04:00
Mike Blumenkrantz cd7633ecbf ecore-wl2: make _ecore_wl2_display_sync_get() local instead of static 2017-08-04 16:10:34 -04:00
Mike Blumenkrantz ab2c330b27 ecore-wl2: simplify server pid detection 2017-08-04 16:10:34 -04:00
Mike Blumenkrantz 4e68271416 ecore-wl2: pass display to aux hint event_adds
fixes display refcounting

ref 6bb56b3f56

@fix
2017-08-04 16:10:31 -04:00
Chris Michael 0bd8259da8 ecore-wl2: Rename local function and make it static
As this function is not called from anywhere outside of
ecore_wl2_window.c file, this can be declared static.

NB: This patch also changes the function name to match the library
(ecore_wl2).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-08-03 10:15:41 -04:00
Mike Blumenkrantz 6bb56b3f56 ecore-wl2: implement support for aux hints
this is a direct copy of a feature from tizen git with no modifications other
than what was required for compilation and functionality

https://review.tizen.org/git/?p=platform/upstream/efl.git;a=commitdiff_plain;h=01e72b7e3484ece4b589f95315990ba2c366c231
https://review.tizen.org/git/?p=platform/upstream/efl.git;a=commitdiff;h=670d84b579f248ae0e3df48e9953fe8128da9468

fix T5780

@feature
2017-07-28 15:43:48 -04:00
Mike Blumenkrantz aae4d21b63 ecore-wl2: handle null offer drags more effectively
this is valid and refers to an offer with no types; a leave event
with no enter is a protocol error, however

fix T5770

@fix
2017-07-24 08:30:05 -04:00
Mike Blumenkrantz 451a93d9d2 Revert "ecore wl2 - dnd - handle NULL drags... shouldnt happen but does"
This reverts commit 85e5858466.

please do not randomly add null checks for the purpose of quickly closing tickets.
2017-07-24 08:29:45 -04:00
Carsten Haitzler 85e5858466 ecore wl2 - dnd - handle NULL drags... shouldnt happen but does
this should fix T5770

@fix
2017-07-24 18:53:33 +09:00
Chris Michael 1e694114d8 ecore-wl2: Formatting fixes
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-07-10 13:10:01 -04:00
Chris Michael 0c6aae1516 ecore-wl2: Add event handlers even if no data device manager exists
If we have no data device manager present, we would still like to
receive events when input devices get added or removed so these
handlers should be setup before we return from this function.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-07-10 13:02:43 -04:00
Chris Michael ff22abc4be ecore-wl2: Rename internal function
As we are in the Ecore_Wl2 library, lets use a function name that
reflects this.

NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-07-10 13:02:02 -04:00
Mike Blumenkrantz 38d18e559d ecore-wl2: create surfaces once compositor global is bound
it's expected that surfaces are created when a window exists

@fix
2017-07-07 15:22:23 -04:00
Mike Blumenkrantz 03d2c43018 ecore-wl2: don't leak display event pointers 2017-07-07 15:22:23 -04:00
Mike Blumenkrantz 9c639f6ec8 ecore-wl2: add display object refs for windows
ensure the display lifetime exceeds the window lifetime

@fix
2017-07-07 15:22:23 -04:00
Chris Michael 84788fdf6a ecore-wl2: Add more window types to Window Type enum
Small patch which adds more window types to the Window Type enum.
These window types may be used by various compositors in different
ways. This patch does not add or change any functionality, it just
extends the window type enum to include the ability to specify other
types of windows.

'#divergence'

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-27 11:14:26 -04:00
Chris Michael 2f7f232582 ecore-wl2: Add client-side event for Window Deactivate
This patch adds and sends a client-side event for when a window gets
deactivated.

'#divergence'

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-27 09:47:43 -04:00
Chris Michael 640caf1d9c ecore-wl2: Add client-side event for Window Activate
This patch adds and sends a client-side event when a window gets
activated.

'#divergence'

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-27 09:47:43 -04:00
Chris Michael b12b26d4c0 ecore-wl2: Add client-side event for Window Hide
Small patch to add and send a client-side event for when a window gets
hidden.

'#divergence'

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-27 09:47:43 -04:00
Chris Michael 873b917e9e ecore-wl2: Add client-side event for Window Show
Small patch to add and send a client-side event for when a window gets
shown.

'#divergence'

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-27 09:47:43 -04:00
Mike Blumenkrantz 3e2d62d408 ecore-wl2: use first seat to start move/resize op when none specified
don't do lookups by name, the default seat is the first one added
2017-06-26 10:32:44 -04:00
Mike Blumenkrantz 3d098097bf ecore-wl2: do not send exit event on disconnect if servers exist
this kills the compositor.

@fix
2017-06-23 17:43:44 -04:00
Chris Michael 52f35fde0c ecore-wl2: Fix issue(s) of setting wrong event device
As we may have both a pointer and touch device on a given system, we
need to accurately set event->device when sending mouse move, wheel,
down, and up events. Previous code here would always try to find a
mouse device first which could potentially end up setting the wrong
event->device (if a touch device also existed).

This patch fixes the issue by comparing the window used for the event
to our focused windows (either mouse or touch) and setting the proper
event->device based on that.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-20 11:59:36 -04:00
Chris Michael 632d6018d5 Revert "ecore-wl2: Add API to support setting window stack mode"
This commit reverts support for added API functions inside Ecore_Wl2
to support setting window stacking mode as per IRC discussion with
Cedric

This reverts commit 1359fc9e5f.
2017-06-15 13:09:34 -04:00
Chris Michael 1359fc9e5f ecore-wl2: Add API to support setting window stack mode
Small patch to add support for setting stack mode on a given window

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-15 11:34:50 -04:00
Chris Michael e3abac30f1 ecore-wl2: Add API to get/set if a window is in floating mode
Small patch to add API functions which allow getting/setting if a
window is in floating mode

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-15 11:07:48 -04:00
Chris Michael bdcf798dba ecore-wl2: Add API to set window role
Small patch to add support for setting a window role on a given window

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-15 10:54:30 -04:00
Chris Michael 689d77daf6 ecore-wl2: Add API to get if a window should ignore focus events
Small patch to add an API function which can be used to find out if a
given window is set to skip focus events.

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-15 10:35:45 -04:00
Chris Michael 9b76c284c9 ecore-wl2: Add API to set if a window should skip focus
Small patch to add an API function which can be called to set if a
window should skip focus.

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-15 10:32:25 -04:00
Chris Michael b13a73ae87 ecore-wl2: Group window functions together in header file
This patch just moves window related functions together in the
Ecore_Wl2_Window_Group

NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 13:23:54 -04:00
Chris Michael 1d453eece4 ecore-wl2: Free auxiliary window hints when we destroy a window
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 12:57:24 -04:00
Chris Michael b678382b8a ecore-wl2: Add API to support deleting auxiliary window hints
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 12:57:17 -04:00
Chris Michael 8b311aa27f ecore-wl2: Add API function to change auxiliary window hint
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 12:57:17 -04:00
Chris Michael daddaac7ec ecore-wl2: Add API to support adding auxiliary window hints
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 12:57:17 -04:00
Chris Michael e0454373f8 ecore-wl2: Add API function to get list of supported auxiliary hints
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 12:57:17 -04:00
Chris Michael 3e1ad4d45a ecore-wl2: Add event and structure for auxiliary hints
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 12:57:17 -04:00
Bryce Harrington 67295ed747 ecore_evas: Document ecore_evas Wayland operations
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4954
2017-06-12 11:54:06 +09:00
Chris Michael d47538dc0e ecore-wl2: Fix window rotation event structure and various typos
As these events will be raised to ecore_evas_wl and the handlers there
do not pass along the Ecore_Evas as 'data', we need to change the type
of variable passed along in the event struture so that
ecore_event_window_match can be called to find the Ecore_Evas.

This patch also fixes some typos discovered during compile

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:42 -04:00
Chris Michael 498691d5a3 ecore-wl2: Add event type for window rotate events
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:42 -04:00
Chris Michael b897780189 ecore-wl2: Add API and Event for window rotation change done
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:42 -04:00
Chris Michael 1eaaab93b1 ecore-wl2: Add API and Event for window rotation change request
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:42 -04:00
Chris Michael 3087f02ef2 ecore-wl2: Add API and Event for window rotation change prepare done
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:42 -04:00
Chris Michael 92d214d8f9 ecore-wl2: Add API and event for window rotation change prepare
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:42 -04:00
Chris Michael 9930929dbb ecore-wl2: Add API to return window available rotations
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:41 -04:00
Chris Michael b1584c9054 ecore-wl2: Add API to set window available rotations
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:41 -04:00
Chris Michael fa7f8d25b2 ecore-wl2: Add API to return a windows preferred rotation
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:41 -04:00
Chris Michael 8b685a4d54 ecore-wl2: Add API to set window preferred rotation
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:41 -04:00
Chris Michael 258c75e641 ecore-wl2: Add API to get if an application has set window rotation
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:41 -04:00
Chris Michael c23a0d080d ecore-wl2: Add API to set if an application has rotation a window
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:29:25 -04:00
Chris Michael e12077adfa ecore-wl2: Add API to get if window manager rotation is supported
This patch adds an API function which can be called to determine if
window manager rotation is supported.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:29:25 -04:00
Chris Michael 8f9163aaa1 ecore-wl2: Add API function to set if wm rotation is supported
Small patch to add an API function which can be called to set if
window manager rotation is supported.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:29:25 -04:00
Chris Michael c7da93c1de ecore-wl2: Use output height when calculating dpi
When calculating output dpi, we should also be considering output
height in the calculation.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-07 11:21:19 -04:00
Chris Michael 5ee913426d ecore-wl2: Add API function to set surface buffer transform
Small patch to add an API function which can be called to set a buffer
transformation on a given window.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-07 11:09:58 -04:00
Chris Michael 5b84bf2c24 ecore-wl2: Add API function to return an output transformation
Small patch to add a new API function that can be used to retrieve the
current transform value for a given output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-07 11:09:58 -04:00
Chris Michael b69060ab88 ecore-wl2: Add missing doxygen groups for documentation
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-07 11:09:58 -04:00
Chris Michael 70a345005b ecore-wl2: Add API function to find an output for given window
Small patch which adds an API function that can be used to find the
output where a given window resides.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-07 11:09:58 -04:00
Chris Michael a9e0148c62 ecore-wl2: Add event for output transformation
Some servers may need to do special animations or other effects when
an output transformation happens, so raise an event in the output
geometry callback when this happens.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-07 11:08:48 -04:00
Cedric BAIL 183c45d35a ecore_wl2: silence gcc warning.
Code is correct, but gcc can not follow the branch if and believe it
is worth triggering a warning.
2017-06-05 12:07:57 -07:00
Bryce Harrington e1fbde9e5b elput: fix sp. usefull
Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4935

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:04:43 -07:00
Mike Blumenkrantz f61e2636a5 ecore-wl2: change safety null check to regular null check on surface create
this is a normal case during async init
2017-06-02 18:23:42 -04:00
Mike Blumenkrantz c60fbea89f ecore-wl2: add null checks for xkb compose pointers
somehow these can fail to be created
2017-06-02 18:23:42 -04:00
Mike Blumenkrantz d61453be22 ecore-wl2: do not unref non-matching input device upon removal
this is how you avoid crashing

@fix
2017-06-02 18:23:42 -04:00
Mike Blumenkrantz fbe5ff0104 ecore-wl2: implement compose keys
@feature

ref T5006
2017-05-26 16:27:42 -04:00
Mike Blumenkrantz d1c35171c1 ecore-wl2: add weston copyright notice to ecore_wl2_input.c
this file contains code copied from weston
2017-05-26 16:27:42 -04:00
Mike Blumenkrantz fb082484b0 ecore-wl2: permit null drag icon window in ecore_wl2_dnd_drag_start()
this is explicitly allowed in the spec

@fix
2017-05-19 15:53:52 -04:00
Mike Blumenkrantz 771d8803dd ecore-wl2: block key->string translation when appropriate
copied from libX11.

I don't understand what's going on here but this fixes input bugs such
as, e.g., holding ctrl and pressing shift affecting cursor position in
terminology

@fix
2017-05-19 13:17:31 -04:00
Mike Blumenkrantz 2b2367b6ff ecore-wl2: add copyright info to code copied from libX11
this code has been slightly modified, but it was originally taken without
attribution from libX11/src/KeyBind.c

ref 08c804f5bb

@fix
2017-05-19 13:17:30 -04:00
Mike Blumenkrantz f4ad162eef ecore-wl2: remove ecore_wl2_window_input_get()
this function does not make sense within the context of wayland and seats,
since a surface does not own and is not owned by a seat, nor is there a 1:1
association between surfaces and seats
2017-05-19 13:17:30 -04:00
Mike Blumenkrantz 13cf5a1d43 ecore-wl2: do not attempt to call zxdg_surface_v6.get_popup without a parent
this is a protocol error so ensure that it can never occur

@fix
2017-05-19 13:17:15 -04:00
Mike Blumenkrantz 7caf3b88ce ecore-wl2: add ecore_wl2_window_popup_input_set()
this is a function for explicitly setting the seat which will be used
for popup grabs

@feature
2017-05-19 12:41:17 -04:00
Mike Blumenkrantz 2fe7878235 wayland: move pointer-related functions to ecore_wl2_input namespace
windows do not have pointers or cursors under wayland, seats do. due to
lack of multiseat support, most components simply use the "default" seat
with these functions, but this should make the corresponding code more
easily adaptable
2017-05-19 12:41:17 -04:00
Mike Blumenkrantz 55cfc97455 wayland: send focus in/out events when receiving/losing keyboard focus
since this is typically what efl defines as "focus"

@fix
2017-05-19 12:41:17 -04:00
Mike Blumenkrantz 5ebdf8f341 wayland: use shell activated state to indicate focus in csd
the current (v6) xdg-shell spec reads as follows:

	  Client window decorations should be painted as if the window is
	  active. Do not assume this means that the window actually has
	  keyboard or pointer focus.

so this is not equivalent to receiving/losing input focus and should not
be propagated as such

@fix
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 704a22d1c9 ecore-wl2: add ecore_wl2_window_activated_get()
this is specifically for returning the shell surface's activation state
which is NOT equivalent to the window having input focus

@feature
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 1bc837c3de ecore-wl2: redo ecore_wl2_window_move() to take a seat instead of coords
this triggers a move operation and is seat-dependent
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz d7d3c9adab ecore-wl2: redo ecore_wl2_window_resize() to take a seat instead of size
this triggers a resize operation and is seat-dependent
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 871e0c8de8 ecore-wl2: add ecore_wl2_display_input_find_by_name()
@feature
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 0b10aa7f19 ecore-wl2: use nonblocking event flush when disconnecting a client
roundtrip will deadlock if called in a compositor process

@fix
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz a08f8e7bbf ecore-wl2: add ecore_wl2_display_name_get()
@feature
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 047118c6e2 ecore-wl2: add ecore_wl2_display_input_find()
for finding seat using hw id

@feature
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 68a3f43d1e ecore-wl2: add functions for proxying a selection receive externally
in some cases (e.g,, x11 bridged selections) it is necessary to use
alternate means when transferring a selection, and so performing the
entire piped receive is not necessary. instead, extend the lifetime
of the data offer until the proxied receive has completed

@feature
2017-05-12 12:08:26 -04:00
Mike Blumenkrantz 8afdbaba48 ecore-wl2: add function for setting a drag source's actions without a drag
in some cases it may be desired to have a drag data source without ever
initiating a drag, so ensure that it's possible to set the actions of the
source which will be passed for drag operations in this case

@feature
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz f6964f50e3 ecore-wl2: add function for accepting a single mime type
@feature
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 9f69882211 ecore-wl2: do not offer a null mime first in ecore_wl2_offer_mimes_set()
this seems to have been done to account for the case where no mimes were
passed, but sending null in this way is bad behavior for a client. the
spec indicates that null should be sent only when no mimes are accepted

@fix
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 2e5251b364 ecore-wl2: add events for changes in keymap, selection, and kbd repeat rate
@feature
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz d119fdded9 ecore-wl2: add 'cancelled' to Ecore_Wl2_Event_Data_Source_End
it's impossible to know the result of a drag operation without this
member
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 05fd3771e7 ecore-wl2: add display object to all events
this is required in order to determine which connection an event originated
from
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 1a7279f72e ecore-wl2: add const to internal function param 2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 4f2a8b8679 ecore-wl2: add seat id to most events
seat id is required in order to handle multiseat environments
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 37ff7b43f1 ecore-wl2: emit serials in selection-related events
these allow apps to match the serial of their selection to the related
event in order to avoid mangling selections from other components
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz d51252a69e ecore-wl2: change selection setting apis to return the serial of the request
in the case where multiple places in an app may be handling selections, this
is necessary in order to manage the selections accurately

@feature
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 5869767355 ecore-wl2: remove ERR when trying to find the focused window id
this can trigger in the case where a selection transfer occurs and
no input resource has received an enter (e.g., the window is not focused)

@fix
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 00da1a771a ecore-wl2: correctly refcount display objects during events
ensure lifetime of display object is longer than events in which
the object is passed

@fix
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 8b6526eb7a ecore-wl2: add safety check in ecore_wl2_display_inputs_get()
ensure this is not called on server displays
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz ba2a76d7ab ecore-wl2: handle case where session recovery listener triggers on dead surface
@fix
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz f32cb9ea00 ecore-wl2: add function for checking if a client connection sync is done
@feature
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 7c9e3d2dbd ecore-wl2: add some accessors for useful Ecore_Wl2_Input struct members
@feature
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 44f22a250e ecore-wl2: split data offers into selection and drag
these are distinct objects and can coexist simultaneously; a drag
source should not overwrite an existing selection source

@fix
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 8afe0a7a6c ecore-wl2: store names for inputs and add api for retrieving name
@feature
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz 6fc8ea3c4b ecore-wl2: add checks for a valid display object in ecore_wl2_input fns
no display = invalid object, so this needs checking
2017-05-12 12:08:25 -04:00
Mike Blumenkrantz eb9a5165f4 ecore-wl2: move ecore_wl2_display_inputs_get() into ecore_wl2_display.c 2017-04-21 16:16:12 -04:00
Jean-Philippe Andre a33815eeef ecore wl2: Fix compilation 2017-04-21 10:08:52 +09:00
Derek Foreman f45b63edbd ecore_wl2: Don't crash when drag and drop is unsupported by compositor
Check for presence of data device manager so we don't crash if it's not
there.
2017-04-20 14:41:54 -05:00
Derek Foreman 30cd3f8615 ecore_wl2: destroy dmabuf global at shutdown
Fixes a small memory leak.
2017-04-19 16:45:34 -05:00
Derek Foreman 9d3eaac080 ecore_wl2: refactor global cleanup in shutdown paths
Both session recovery and regular disconnect do this, so make
it a function to ensure they stay in sync.
2017-04-19 16:40:17 -05:00
Derek Foreman 6319f3831a ecore_wl2: Remove unused code
ecore_wl2 contains a bunch of code for compositor side seat handling.
There's really no need for a client to do this, and E does the
compositor side seat stuff internally, so this code will never
be used.

This removes the unused code.
2017-04-17 14:45:14 -05:00
Mike Blumenkrantz aab3cca0be ecore-wl2: do not reconnect on protocol error for non-server processes
this is not a recoverable state

@fix
2017-04-07 16:06:41 -04:00
Mike Blumenkrantz fc0c66675e ecore-wl2: create window surfaces immediately when windows are created 2017-04-07 16:06:41 -04:00
Mike Blumenkrantz bc7fb14a9c ecore-wl2: stop setting all windows as toplevels on creation
this is not a valid assumption since toplevel is a shell-specific concept and
it's possible to run a shell which does not implement such windows

@fix
2017-04-07 16:06:40 -04:00
Mike Blumenkrantz cb58baf400 ecore-wl2: CRI when attempting to create a window from a server display object 2017-04-07 16:06:40 -04:00
Cedric BAIL 81adcf8107 ecore_wl2: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Derek Foreman 5e7456a315 ecore_wl2: Fix up xdgv6 ack_configures
We've been immediately acking configure with the correct serial number, then
later at commit time sending an incorrect serial (generating a new one).

Remove the extra ack, and save that serial for later, and don't overwrite
it with a current serial when we get a toplevel configure.

Oddly, compositors were letting us get away with this behaviour, so this
probably looks functionally the same as before.
2017-03-09 16:11:56 -06:00
Derek Foreman 4f1c858928 ecore_wl2: Fix initial maximized/fullscreen state
This defers the fullscreen/maximized states if we don't have a shell
surface, and sets them in the first shell surface commit.

ref T5044
2017-03-09 12:21:09 -06:00
Derek Foreman aedf55073a ecore_wl2: Rename badly named API
Oops, I broke naming convention with this, but it's unreleased and beta so
I hope nobody notices as long as I change it now...
2017-03-09 12:21:09 -06:00
Derek Foreman e1ffb46a0e ecore_wl2: Remove wl_shell client support
We're never going to encounter a compositor without at least xdg v5
support, so remove wl_shell support.
2017-03-09 12:21:08 -06:00
Bryce Harrington 8ed9aec49b ecore-wl2: Clarify post-condition for global lookup in _ecore_wl2_shell_bind
Summary:
The !global test is a post-condition that _ecore_wl2_global_find
provided valid data, so the code is clearer if this is kept separate
from the subsequent if chain for looking up the shell.  Since this
post-condition returns from the function on error, it can stand alone.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4690
2017-03-08 14:13:01 -06:00
Chris Michael 927dc167ec ecore-wl2: Remove some debugging printouts
These prints were left over from
5b9374583e and should not have been pushed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-07 08:19:26 -05:00
Derek Foreman 16a1f8f188 ecore_wl2: Fix a wayland session recovery breaker... again
We need to bind a shell on reconnect, but dfb2af697 made sure
we only bind a single shell per wayland display for the life of
the display object - which lives longer than the connection.

That means when session recovery tries to reconnect it never bothers
to bind a shell, so the client can never post buffers.

ref https://phab.enlightenment.org/T5226
ref https://phab.enlightenment.org/T5005

@fix
2017-03-01 13:49:02 -06:00
Chris Michael cb39bd158e Revert "ecore-wl2: Send surface_commit after ack_configure"
Reverting this as apparently one source says to send a commit after
ack_configure, and another source says its wrong...

This reverts commit 1187035fe6.
2017-03-01 13:14:50 -05:00
Chris Michael 5ec4715b9d ecore-wl2: Fix efl apps crashing on close in wayland
Commit c6b59be1da ensured display cleanup after roundtrips, however we
cannot call the display_cleanup function After the display has been
disconnected ... oopsie. Essentially the call to the cleanup function
was in the wrong place here so fix.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-01 12:08:09 -05:00
Chris Michael 1187035fe6 ecore-wl2: Send surface_commit after ack_configure
Small patch to ensure we send a surface commit after sending the
ack_configure. This fixes an issue where E-WL internal windows would
not maximize.

Fixes T5192

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-01 10:25:35 -05:00
Chris Michael c6b59be1da ecore-wl2: Ensure display cleanup after roundtrips
Commit ee52a28d04 added a roundtrip to
ensure and pending wl events were handled before we disconnected the
display. While this ensures some things like session recovery destroy
work again, it lead to an issue where the _ecore_wl2_display_cleanup
function was called BEFORE we processed pending events. This (in turn)
causes crashes due to processing of pending events that relied on
things like Ecore_Wl2_Input existing. As the display cleanup function
clears inputs & outputs, we need to defer calling that until the
display_roundtrip has dispatched and handled pending events.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-01 08:32:18 -05:00
Chris Michael da22b6fc66 ecore-wl2: Cleanup function for finding global
As per Mike, the iterator macro already does the casting for us, so we
can cleanup the code here and not do casting, plus we can remove an
extra variable...bonus ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-28 12:36:05 -05:00
Chris Michael b0bd191f7b ecore-wl2: Use EINA_ITERATOR_FOREACH macro
Small patch to change from while (iterator) to using the
EINA_ITERATOR_FOREACH macro...that I had forgotten about...thanks Mike
;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-28 12:28:02 -05:00
Chris Michael dfb2af6974 ecore-wl2: Ensure we only bind one wayland shell
This patch adds prioritizing to our wayland shell binding code so that
we only bind One shell that the compositor advertises. During the
global_add callback, the shells get added to the 'globals' hash, and
when sync is done, we will search for shells to bind based on priority
so that we can ensure we always bind to the latest supported shell.

ref T5226

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-28 12:17:02 -05:00
Chris Michael 3d81843a3b Revert "ecore-wl2: Only bind one shell"
Reverting this in favor of a better approach (using a priority list)
as discussed on IRC.

This reverts commit 0e93f03636.
2017-02-28 11:37:15 -05:00
Chris Michael 5b9374583e ecore-wl2: Actually update input/opaque regions
Previous commit f8f71d05cd to avoid resetting
opaque & input regions was not totally complete as it did not update
the actual values...small patch to fix that.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-28 10:12:31 -05:00
Chris Michael f8f71d05cd ecore-wl2: Avoid resetting opaque & input regions if they match
Small patch to avoid setting the same opaque/input regions if they
already match what is being requested.

ref T5226

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-28 08:51:21 -05:00
Chris Michael 0e93f03636 ecore-wl2: Only bind one shell
Since we only ever use One shell at a time, let's not bind all of them
as that is useless.

ref T5226

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-28 08:40:26 -05:00
Chris Michael 515c2d0374 ecore-wl2: Fix setting input region on a window
Previous code here would store incorrect values into the
window->input rectangle. These values should be what is actually
getting set in the wl_region. This code also fixes an issue when
setting input region for transparent/alpha windows by clearing out
any pending input region (wl_surface_set_input_region(surface, null)).

Reviewed-By: Derek Foreman <derekf@osg.samsung.com>

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-14 13:36:13 -05:00
Chris Michael 559490d756 ecore-wl2: Fix setting opaque region on a window
Previous code here would store incorrect values into the
window->opaque rectangle. These values should be what is actually
getting set in the wl_region. This code also fixes an issue when
setting opaque region for transparent/alpha windows by clearing out
any pending opaque region (wl_surface_set_opaque_region(surface, null)).

Reviewed-By: Derek Foreman <derekf@osg.samsung.com>

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-14 13:36:03 -05:00
Mike Blumenkrantz ee52a28d04 ecore-wl2: roundtrip during client disconnect
ensure all pending requests are processed by the compositor and fixes
session recovery destroy

@fix
2017-02-10 17:23:33 -05:00
Derek Foreman 3dd19f16cb ecore_wl2: Update compositor bind now that damage_buffer is released
We had to do some weird special case stuff when binding wl_compositor
because we implemented damage buffer before depending on a wayland
release that provided it.

Now our wayland dep is newer than damage buffer, so the test can be
more conventional.

Should have no functional change.
2017-02-10 10:25:53 -06:00
Chris Michael 4d62761759 ecore-wl2: Support sending focus for wl_shell
wl_shell does not use a surface state for activation, so we still need
to send the focus in/out for that based on keyboard enter/leave.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-08 12:30:10 -05:00
Chris Michael 4b2188103d ecore-wl2: Don't send focus in/out events based on keyboard enter/leave
We should not be sending focus events based on keyboard behaviour, but
rather send them according to xdg shell activate status. This makes
our focus behaviour more "standards" compliant.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-08 11:54:07 -05:00
Derek Foreman 5097ba893b ecore_wl2: Make www events opt-in
Now we must set EFL_WAYLAND_ENABLE_WWW to turn on www.  (Note:
this does NOT re-enable any visual effect, it merely controls
the event infrastructure that can be used to let a client
know when its window is mapped or moving)

This wasn't really disabled properly earlier, so disable it now
for a slight performance win when dragging windows (and a major
reduction in log chatter when debugging wayland)
2017-02-01 16:21:34 -06:00
Chris Michael a306cba6c3 ecore-wl2: Don't set opaque or input regions if already set
If the window opaque/input regions already match what is being
requested (to be set), then no need for the compositor to create
regions and set them.

@optimize
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-25 12:02:35 -05:00
Derek Foreman 0669ca31ff wayland: Try not to draw into surfaces without roles
xdg v6 will barf if we attach a buffer to the surface before
we receive a configure - even if we attach before trying to
make a shell surface.

So we need to prevent any drawing into surfaces until we've
decided what kind of surface they'll ultimately be.

Fix T5090
2017-01-19 15:25:17 -06:00
Derek Foreman f162f47297 ecore_wl2: Auto generate www protocol
Needed to copy the protocol file from Enlightenment.
2017-01-18 13:04:48 -06:00
Derek Foreman 2aa8b5acad ecore_wl2: Auto generate teamwork protocol
The name was non-standard and we didn't have the xml in tree,
xml has been copied from Enlightenment.
2017-01-18 13:04:48 -06:00
Derek Foreman 5b25ff3281 ecore_wl2: Auto generate xdg v6 protocol
Mostly trivial, needed to update private header as we'd used a
non-standard name for our generated copy.
2017-01-18 13:04:47 -06:00
Derek Foreman 50883f7a6f ecore_wl2: Auto generate xdg v5 protocol
Remove our generated copies, also rename the XDG_VERSION macro
so it's not quite so confusing now that we support v5 and v6.
2017-01-18 13:04:47 -06:00
Derek Foreman dc84374d45 ecore_wl2: Remove private copy of subsurface protocol
This became core wayland functionality a long time ago, and we
now depend on wayland new enough to have it, so we should never
need the stale copy we had in tree.
2017-01-18 13:04:47 -06:00
Derek Foreman 163a7bb76c ecore_wl2: Auto generate dmabuf protocol
Remove the server protocol file as we don't need it here.

Generally a trivial change as we have a recent version in tree with
no weird changes.
2017-01-18 13:04:47 -06:00
Derek Foreman 26ec54c169 ecore_wl2: Auto generate session-recovery protocol
Check in the latest session-recovery xml and remove the checked
in generated files.
2017-01-18 13:04:47 -06:00
Chris Michael 2e0dc2a1f9 ecore-wl2: Add function to get touch device
When we are sending input events, if we have no pointer device then we
should be setting ev->dev to a touch device (as touch events are
treated as pointer events inside EFL).

NB: This allows EFL clients to get touch events in Enlightenment.
There are still some small hiccups here (can't close terminology by
pressing the 'x' in the corner, cannot scroll elm_test srollbar, etc).

Likely EFL needs to change wrt all this...perhaps adding events for
touch that are separate from pointer ?...

ref T5094

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-17 12:31:01 -05:00
Mike Blumenkrantz de1a6d6f42 ecore-wl2: make session recovery listener global
global proxies have a single instance and do not work with
multiple listeners

@fix
2017-01-13 11:33:59 -05:00
Chris Michael 83defff028 ecore-wl2: Use input serial for move and resize functions
This is a partial revert of 2bd880c6c7 which changed to use
wl_display_get_serial function. When can do that for most things,
however things like window move/resize need to use the input serial
which started the move/resize.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-13 09:53:52 -05:00
Chris Michael 755c50a84e ecore-wl2: Add event to raise when window configure is completed.
Small patch to create and raise a new event letting ecore_evas know
when the window has been configured. With the addition of xdg_shell v6
support, we cannot commit a surface with an existing buffer until the
surface has been configured. This patch allows us to raise an event to
ecore_evas when the surface has been configured, so we can then attach
a buffer to it.

ref T5090

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:33 -05:00
Chris Michael 4bb9038b67 ecore-wl2: Minor formatting fixes
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:27 -05:00
Chris Michael 41ff3c9d94 ecore-wl2: Mark window as pending configure when showing popup
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 12:00:39 -05:00
Chris Michael 07433065aa ecore-wl2: Remove incorrect EINA_UNUSED
These parameters are actually used inside this function so remove the
EINA_UNUSED

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 11:49:10 -05:00
Chris Michael 2bd880c6c7 ecore-wl2: Use 'serial' directly from wayland call
As we cannot rely on window->display->serial to be accurate (it is
only set when there is input going on), we should be getting the
'serial' values here directly from a wayland function call.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 11:48:18 -05:00
Chris Michael 101c772412 ecore-wl2: Add flag to indicate pending configure
With the change to xdg_shell v6 we need to indicate that a window has
a pending configure event, and not show the window if a configure is
pending. In order to handle this, we add a flag to the window
structure and can check it inside ecore_evas.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 11:27:10 -05:00
Chris Michael 90ab99cba6 ecore-wl2: Use correct serial value
When we get a configure event, we should be using the current display
serial to set as the window configure serial value. Previous code
would always end up setting the window configure_serial to 0 as
win->display->serial was not getting updated.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 08:51:33 -05:00
Derek Foreman bc000f3ad2 ecore_wl2: Fix accidental re-use of tmp var
Oops, same tmp var for a nested inlist traverse.  That won't end well.
2017-01-05 13:40:31 -06:00
Derek Foreman df72ddf43c ecore_wl2: Don't request shell surfaces for all window types
Now that cursors are "windows", this results in a mess.  So skip at least
NONE and DND for now.
2017-01-05 13:40:31 -06:00
Derek Foreman 120063ad76 ecore_wl2: Prevent use after free on input deletion
Window structs keep inputs around, so we should sweep through them
and NULL out any stale ones on a delete.
2017-01-05 13:40:31 -06:00
Derek Foreman 8328d4db89 ecore_wl2: Remove the rest of the cursor frame callback
Oops, I made a clean spot, now I need to clean up the rest of this.

ref 641dfab516
2017-01-05 13:40:31 -06:00
Chris Michael d86b296813 ecore-wl2: Add support for xdg shell version 6
This patch adds support (client-side) for xdg_shell version 6.
Enlightenment is currently using this version as it's desktop shell,
so we need to support it client-side also.

fixes T4998

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 14:25:18 -05:00
Chris Michael 4ba4efb8fc ecore-wl2: Fix formatting
NB: No functional changes, just cleaning up formatting before the
serious work begins.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 11:08:49 -05:00
Derek Foreman 641dfab516 wayland: Fix cursor surface frame calls
The common code was skipping frame callback when no shell surface was
present - cursors aren't shell surfaces.

Add the frame callback to the common path and remove the bespoke callback
from the cursor code.
2017-01-03 16:40:21 -06:00
Guilherme Iscaro 133b4fa65b Ecore Wl2: Add ecore_wl2_window_pointer_device_xy_get() API.
This commit adds a Wayland specific function to fetch a mouse
position.
2016-12-20 18:34:39 -02:00
Mike Blumenkrantz b4740389f9 ecore-wl2: restore previous session recovery behavior on hide
ref 9492ee21df
2016-12-14 11:44:13 -05:00
Chris Michael b66324644c ecore-wl2: Minor formatting fix
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-08 14:32:22 -05:00
Chris Michael 6dca94d8bf ecore-wl2: No need to call hide inside the free function
When we are freeing an Ecore_Wl2_Window, there is no need to call
ecore_wl2_window_hide anymore because inside the free function we are
destroying subsurfaces, surfaces, etc, etc so no need to even unmap
them.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-05 09:27:11 -05:00
Chris Michael 4c7ff57cb2 ecore-wl2: When we hide a window, attach a NULL buffer to the surface
This patch essentially makes sure that the surface gets a NULL buffer
attached to it when we are hiding.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-05 09:22:26 -05:00
Chris Michael 4c140180d1 ecore-wl2: Don't destroy surfaces on window hide
In order to hide a window (via wayland) we can actually assign a NULL
buffer to the surface, so there is no need to destroy the window's
wl_surface during a hide request.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Chris Michael 80df180157 ecore-wl2: Add warning if a wl_surface_frame callback failes to get created
There could be situations where wl_surface_frame fails to create a
callback. In those cases, we should not be trying to add a wl_callback
listener for a non-existant callback.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-30 12:12:38 -05:00
Guilherme Iscaro 6b95c4c2ec Ecore Wl2 Input: Canvas focus IN/OUT events should contain the seat.
This provides the information about which seat originated the event.
2016-11-28 13:57:55 -02:00
Guilherme Iscaro 9f8e2e0d9c Ecore Wayland: Remove ECORE_WL2_SEAT_CAPABILITIES_NO_SEAT.
Summary:
It's not possible to have an Ecore_Wl2_Input without a seat.

Ecore Evas Wayland: Remove seat existence check.

At this point every seat advertised is considered new, therefore
it will not be in the devices list.

Reviewers: barbieri, jpeg, cedric, bdilly

Reviewed By: bdilly

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4408
2016-11-16 17:50:32 -02:00
Bruno Dilly 6f66c6e676 ecore_wl2: ref / unref evas devices on ecore events
Summary:
It should avoid issues when device is removed after the ecore
event addition but before listeners are called (so pointer
would be invalid).

Reviewers: iscaro

Reviewed By: iscaro

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4407
2016-11-16 17:01:24 -02:00
Guilherme Iscaro 9ba11c5cd0 Ecore Evas Wayland: Create the devices during Ecore_Evas setup.
Summary:
When launching an Elementary App using Wayland the elm_config will
automatically connect to the Wayland's display server and all events
regarding seats are lost, since by the time that Ecore_Evas is created
the global events were already dispatched. To fix this problem,
everytime an Ecore_Evas is created, the code must check if there
are any seat capabilities available, if so, the devices will be created.

Reviewers: bdilly, barbieri, cedric, jpeg

Subscribers: devilhorns, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4390
2016-11-16 18:26:25 +09:00
Chris Michael e3f02acc93 ecore-wl2: Update cursor regardless of cursor surface
If a NULL surface gets passed into ecore_wl2_window_pointer_set that
would mean we are unsetting the cursor surface, so we should still be
calling wl_pointer_set_cursor even with a NULL surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-02 12:13:09 -04:00
Bruno Dilly 8bf74da7bc ecore_wl2: associate evas devices to input ecore events
So users would be able to differentiate between source
seats.
2016-11-01 16:06:19 -02:00
Bruno Dilly 7aab35961f ecore_wl2: add ecore event for seat capabilities change
So when mouse / keyboard are present or not it will
generate events.

ecore_evas/wayland will handle that creating or
deleting evas devices for each one (seat device
will be used as parent).
2016-11-01 16:06:19 -02:00
Bruno Dilly d7b1a5dfeb ecore_wl2: add ecore event for seat name change
And handle it on ecore_evas/wayland, properly
setting the evas device names.
2016-11-01 16:06:19 -02:00
Chris Michael f3240f630b ecore-wl2: Unify surface creation code
As we call the same code during ecore_wl2_window_surface_get and
ecore_wl2_window_show functions that basically create the wl_surface
for a given window we can unify that code into one function that can
be called from various places. This also fixes an issue inside
ecore_wl2_window_show where the window surface_id may not have been
getting filled properly.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-31 14:05:13 -04:00
Chris Michael 72f2ac2c3a ecore-wl2: Only call pointer_update_stop once
As we already call _ecore_wl2_input_cursor_update_stop above, we
actually don't need to call it a second time.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 12:35:12 -04:00
Chris Michael d4a483c40b ecore-wl2: Disable pointer frame callback if no cursor surface
If we have no cursor surface, then we don't need the pointer frame
callback anymore so call cursor_update_stop which will delete the
pointer frame callback

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 09:55:27 -04:00
Chris Michael f39e0ad20d ecore-wl2: Don't create cursor frame callback if there is no cursor
surface

In the event that we have no cursor surface, then we should not be
creating a cursor frame callback.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 09:55:27 -04:00
Mike Blumenkrantz 1cdeff1c42 ecore-wl2: only update pointer frame if there is a pointer surface
fix T4777, T4776
2016-10-28 09:53:29 -04:00
Chris Michael f5da8d2068 ecore-wl2: Remove erroneous cursor structure from Ecore_Wl2_Pointer
These fields in Ecore_Wl2_Pointer were never used, so remove them.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-26 11:01:13 -04:00
Chris Michael 59bf99eda2 ecore-wl2: Ensure we remove the proper pointer frame callback
During the pointer frame callback, if we had a 'callback' but did not
have an input->cursor.frame_cb then we would have ended up deleting
the callback here anyway. Let's add a comparison of the callback to
the pointer frame callback to ensure we are removing the proper
callback.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-26 11:01:13 -04:00