Commit Graph

696 Commits

Author SHA1 Message Date
Derek Foreman e3a3e02042 ecore_wl2: Add API for querying buffer lock status and use it
Since surfaces will be managed by plug-ins, we need to make sure they
don't rely on internal structures.
2018-01-26 15:53:59 -06:00
Derek Foreman 1c2bb7bda7 ecore_wl2: Make the surface interface a pointer 2018-01-26 15:53:59 -06:00
Derek Foreman b87606775f ecore_wl2: Move surface manager interface into public API
So people can write plug-ins for this stuff.
2018-01-26 15:53:59 -06:00
Derek Foreman 84f703cf67 ecore_wl2: Call check function through a pointer
We'll need this in the function array when we make surface managers
modular.
2018-01-26 15:53:59 -06:00
Derek Foreman bf4b828cb6 ecore_wl2: Move dmabuf surface specific tests into their own function
Refactoring to allow non-dmabuf surface managers.
2018-01-26 15:53:59 -06:00
Derek Foreman 601f9cc484 ecore_wl2: Make session recovery more robust
Clear out the window callback when doing session recovery, and
make sure we have a valid on if we get a double commit.

This should stop a session recovery crash, and fix a small leak per
recovery.
2018-01-26 15:51:44 -06:00
Mike Blumenkrantz d555c6c903 ecore-wl2: correctly translate spacebar keyname into key events
fix T6620

@fix
2018-01-22 13:04:15 -05:00
Derek Foreman 520821e432 wayland: Reduce number of unneccessary display flushes
b48781aa6c fixed multiple bugs where the
display wasn't flushed correctly, however it was a little overzealous.

Some of the flushes were added after calls that only updated internal
state, some in internal functions in which the caller was already going
to flush, and some were after wayland protocol calls that are double
buffered anyway and won't do anything until a following commit.

Also, I've removes at least one long standing flush where the recently
added flush is in a better location than the original.
2018-01-19 12:40:40 -06:00
Mike Blumenkrantz b48781aa6c wayland: always flush client display when protocol sends are pending
in the case where a connection was not actively rendering, there was nothing
which would trigger a display flush, leading to applications potentially
deadlocking

@fix
2018-01-17 17:06:13 -05:00
Mike Blumenkrantz ffa276fce3 wayland: add xdg-shell vfinal support for client-side
@feature
2018-01-10 11:39:52 -05:00
Jean-Philippe Andre ff24ac2d6d efl: Reset ecore event types on init
This fixes cycles of init/shutdown/init where ecore event types would
become invalid, since they are now stored in a dynamic array rather than
a statically stored array.

The risk here is that if a module of EFL tends to init/shutdown in a
"normal" scenario then the event type array will grow in a leaking
manner. This could be fixed by resetting those event ID's only when the
loop actually exits (EFL_EVENT_DEL on the main loop). I'm not using
EFL_EVENT_DEL in this patch as this would add too many event callbacks
to the main loop object, which may result in slightly slower event calls
to it, affecting the overall performance.
2017-12-19 11:14:37 +09:00
Derek Foreman 51599fe86c ecore_wl2: Better handling of extra commit
Discard the old callback so it can't fire later - which can happen after
the window's deleted in certain cases.
2017-12-13 16:34:10 -06:00
Jean-Philippe Andre b867b6aa24 ecore_wl2: Fix a warning 2017-12-05 15:06:34 +09:00
Derek Foreman 7658fc101f ecore_wl2: Add API ecore_wl2_window_surface_flush
This allows something that only has the Ecore_Wl2_Window (ie: something
that isn't engine code) to force dropping of all the buffers.

This should be safe to call at any time as the buffer handling logic
will properly cleanup the buffers when async render is done with them
or the compositor releases them.

This will eventually be used when a wayland client receives a
wl_output.leave events to indicate it isn't displayed on any outputs.
2017-12-01 10:59:51 -06:00
Derek Foreman c48ca81026 ecore_wl2: Add ecore_wl2_surface_flush
This removes all buffers from a surface.
2017-12-01 10:58:44 -06:00
Derek Foreman fdd05f8028 ecore_wl2: add Ecore_Wl2_Surface to Ecore_Wl2_Window
Track the surface of a window and only allow one.

Eventually this might be worthwhile to apply to subsurfaces, but for today
lazy is the way.
2017-12-01 10:58:44 -06:00
Derek Foreman 4f63f327b0 ecore_wl2: Make Ecore_Wl2_Buffer struct private
Nothing needs these members anymore.  If need arises in the future then
proper getter/setter functions can be added.
2017-12-01 10:58:44 -06:00
Derek Foreman 8a3b983c53 ecore_wl2 wayland_shm: Move surface functions into ecore_wl2
Finish pushing these all into ecore_wl2
2017-12-01 10:58:44 -06:00
Derek Foreman 5b4b18836a wayland_shm: Remove struct _Dmabuf_Surface
It's all piled into Surface now.
2017-12-01 10:58:44 -06:00
Derek Foreman f3dd394b85 ecore_wl2: Return NULL from ecore_wl2_window_display_get during recovery
This should save us from having to set the window to in the engine info
NULL and then back during/after recovery.
2017-12-01 10:58:44 -06:00
Chris Michael 83c292ffc4 ecore-wl2: Fix resource leak
Coverity detected a resource leak here because we were not freeing the
malloc'd 'obo' variable.

Fixes Coverity CID1382907

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-26 12:12:53 -05:00
Derek Foreman cf605549c5 ecore_wl2: Add dmabuf allocations for vc4
This should theoretically be better for software rendering on rpi3 since
it allows the compositor to use our sw rendered buffers as a texture.
2017-11-21 16:31:23 -06:00
Derek Foreman 9f3edead9d ecore_wl2: Fix buffer manager refcounting
commit 0cf806005e correctly fixed a
leaked buffer.  However, other code was already accounting for the
leaked reference to the buffer manager, so an extra deref happened
and broke the universe - but only on hardware that no developer
has access to for testing.
2017-11-21 10:11:47 -06:00
Chris Michael 0cf806005e ecore-wl2: Destroy buffer before we exit the buffer_test function
Small patch to destroy our test buffer before we exit the
_ecore_wl2_buffer_test function so that we do not leak here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-20 11:27:15 -05:00
Derek Foreman 796de8cb86 wayland_shm: Don't use a fixed number of buffers
We no longer allocate 3 buffers at startup, we now allocate only as needed.

Trimming the queue will come later, as there are some situations where we
might need 3 buffers and later drop down to 2 (when on a hardware plane)

Most clients will only ever need 2 buffers, so this is a reasonable RAM
savings.
2017-11-17 14:33:36 -06:00
Derek Foreman 04ce069cba ecore_wl2: Properly handle buffer test failure during buffer_init
The buffer manager is already cleaned up at this point, don't try to
do it again.
2017-11-17 14:32:50 -06:00
Derek Foreman 1bd513305e ecore_wl2: fix user pointer for dmabuf param listener
Proving once again that those that defeat type safety usually get what
they deserve.
2017-11-16 13:18:48 -06:00
Derek Foreman 925be86f9e ecore_wl2: Fix dmabuf test failure
We need to destroy the buffer manager on fail, since it will exist but
only be able to create buffers we can't actually use.
2017-11-16 13:18:48 -06:00
Derek Foreman c08920820b ecore_wl2: Don't try to close drm_fd if we never opened it
derp.
2017-11-16 13:13:38 -06:00
Derek Foreman fcdbc07fe3 ecore_wl2: Don't open rendernode if we're not going to use it
We should only open this when actually testing dmabuf.  Otherwise we're
just wasting time and adding an opportunity to fail shm init over
unrelated issues.
2017-11-15 11:54:37 -06:00
Derek Foreman 23f5b41176 ecore_wl2: Reset buffer_manager to NULL on failure
Calling this multiple times even after it fails the first time is a legit
thing now.  We'll be doing that when we want to test dmabuf at connection
start.
2017-11-15 11:54:37 -06:00
Derek Foreman 517f929aa5 ecore_wl2: Send a dmabuf non-immediate create at startup
We use immediate mode dmabuf creation at runtime, but this can result in
clients being killed with no option to fallback if the buffers can't be
consumed by the compositor.

This test should catch when a system can allocate a dmabuf buffer and the
compositor claims to accept dmabuf, but the buffer can't actually be used
for whatever reason.  We'll then use wl_shm at runtime instead of dmabuf.
2017-11-15 11:54:37 -06:00
Derek Foreman 3ac556f2e1 ecore_wl2: factor out part of buffer creation
So we can use it to make a non-immediate mode buffer test.
2017-11-15 11:54:37 -06:00
Derek Foreman 04cebba623 ecore_wl2: Filter buffer types by compositor capabilities
It does us no good to be able to allocate dmabuf capable memory if the
compositor can't handle it.  This should fix failures on systems where
allocation is possible but the compositor doesn't advertise dmabuf.
2017-11-15 11:54:37 -06:00
Derek Foreman 579b6d69b3 ecore_wl2: Add a second sync for dmabuf formats
While we don't yet use these, we should, so let's make sure they're
available before we start making windows.
2017-11-15 11:54:37 -06:00
Derek Foreman 054bdc870b ecore_wl2: Refcount syncs at startup
There are some binds at startup that result in additional information
being sent, so we may need to call wl_display_sync() multiple times, and
only send the client a SYNC_DONE event when the final one completes.
2017-11-15 11:54:37 -06:00
Derek Foreman e863dcaae7 ecore_wl2: Create xkb_context before compositor connection
We really need this to exist before potentially processing seat/keyboard
stuff in _ecore_wl2_display_connect()
2017-11-15 11:54:37 -06:00
Derek Foreman 9fdcf7d0eb wayland_shm/ecore_wl2: Move buffer allocation into ecore_wl2
This moves all the platform specific buffer allocation into ecore_wl2
instead of the engine.

Note that this makes an internal struct available in the header.  This
will be removed shortly.
2017-11-15 11:54:37 -06:00
Chris Michael de9cf5a217 ecore-wl2: Minor formatting fixes
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-10 15:59:51 -05:00
Derek Foreman abba80f3d6 ecore_wl2: Add API for adding damage to a window
This was done in the engine previously, but would be better as a library
function.
2017-11-10 13:43:45 -06:00
Derek Foreman 132a77c682 ecore_wl2: Discard too-old dmabuf support
We need at least version 2 for create_immed, so don't even bind the
global if it's useless to us.

This will also stop us from trying to use dmabuf (and getting killed by
the compositor) on older compositors that don't support the version we
need - we'll just use wl_shm instead when this pointer is NULL.
2017-11-09 16:06:42 -06:00
Mike Blumenkrantz 807006385d ecore-wl2: correctly handle configure events on popup surfaces
@fix
2017-10-25 10:44:16 -04:00
Mike Blumenkrantz 36bf4cbc4e wayland: expand efl-hints protocol to work for all types of xdg shell surfaces 2017-10-25 10:44:16 -04:00
Mike Blumenkrantz ed30f41de8 wayland: add support for efl weight hint propagation from elm_win to efl_wl
@feature
2017-10-25 10:44:16 -04:00
Derek Foreman 3314d36f9b ecore_wl2: Remove just the flush from the idle handler
Flushing should be done where it's needed now, but we still
need the rest of the idle handler as something like mesa may
have dispatched its queue, which reads all the pending wayland
events.  In that case we have events to process but the fd will
not poll readable.

@fix T6250
2017-10-22 10:19:50 -05:00
Derek Foreman e23854eb6a Revert "ecore_wl2: Kill the wl idle enterer"
This reverts commit 57d5b5921e.

We need the dispatch, not the flush...
2017-10-22 10:16:57 -05:00
Derek Foreman 10b6383640 ecore_wl2: Synchronize state with surface commits
This is really several inseparable commits mashed together, as doing this
a piece at a time would introduce broken intermediate revisions.

Double buffer incoming "configure" state from the compositor so it's held
back during asynchronous render and processed at frame completion.

Hold off on certain requests if their API has been invoked during async
render.

This should fix a lot of races, cosmetic issues, issues where weston can
kill our clients for acking configure (or not) at bad times, etc.
2017-10-12 12:24:03 -05:00
Derek Foreman 9918a2c920 ecore_wl2: Don't overwrite saved geometry if switching fs to max
If we switch from fullscreen to maximized we need to keep the pre-fs
geometry around in case we ever unmaximize AND unfullscreen.
2017-10-12 12:24:03 -05:00
Derek Foreman 10de856ee9 ecore_wl2: Don't overwrite saved geometry if switching max to fs
If we switch from maximized to fullscreen we need to keep the pre-max
geometry around in case we ever unmaximize AND unfullscreen.
2017-10-12 12:24:03 -05:00
Derek Foreman 1d1d2d76aa ecore_wl2: Push out maximize set with a display flush
We want this request to get to the compositor as soon as possible.
2017-10-12 12:24:03 -05:00
Derek Foreman da85d1330d ecore_wl2: Push out fullscreen set with a display flush
We want this request to get to the compositor as soon as possible.
2017-10-12 12:24:03 -05:00
Derek Foreman 8e3793c90b ecore_wl2: Bind dmabuf version 2
Version 2 allows for create_immed requets.  No new events are added until
version 3, so this is a trivial update.
2017-10-12 12:24:03 -05:00
Derek Foreman 4985dee49d ecore_wl2: Fix setting empty input regions
We should still update window->input_rect when the input region is empty.
2017-10-12 12:24:03 -05:00
Derek Foreman c4b19a77b6 ecore_wl2: Fix setting empty opaque regions
We should still update window->opaque when the opaque region is empty.
2017-10-12 12:24:03 -05:00
Derek Foreman f6bd73167a ecore_wl2: Add as partial commit function for setting off a tick
This adds the concept of a "false commit" that just sends a surface
commit without changing any other state.

This is intended to be used by ecore_evas to request a frame callback
from the compositor
2017-10-12 12:24:03 -05:00
Derek Foreman 0a185d3efd ecore_wl2: Add new API to latch window state for updates
Add an API to call at the beginning of render to latch state at
that moment, and use it for the wayland engine.
2017-10-12 12:24:03 -05:00
Derek Foreman 0badc0522b ecore_wl2: Split configurations into client set and compositor requested
This should lead to clearer and more maintainable code than having one
pile of state that's asynchronously fiddled with by both client and
compositor.
2017-10-12 12:24:03 -05:00
Derek Foreman 10b3a41ab0 ecore_wl2: Move some state into its own struct
These need to be double buffered, and that will be done in a follow up
patch.
2017-10-12 12:24:03 -05:00
Derek Foreman 51e2514492 ecore_wl2: Add a getter for window->resizing 2017-10-12 12:24:03 -05:00
Derek Foreman 3fba59386b ecore_wl2: Fix some @since tags
Seems my brain missed the efl release and started tagging new API
incorrectly in the doxy.

This is all beta API that should probably only be used by other EFL
internals anyway, but I suppose it's a good idea to try to be somewhat
correct.
2017-10-12 12:24:03 -05:00
Carsten Haitzler 9ee741cf7f ecore wl2 - fix null checing of drag offer - coverity
fix CID 1378629
2017-09-28 15:28:00 +09:00
Derek Foreman 1f555c897e ecore_wl2: Don't set up callbacks on initial commit
We don't want to do frame callbacks until after we can actually draw stuff
2017-09-01 12:29:05 -05:00
Derek Foreman d0b8c41f92 ecore_wl2: Fix session recovery
I broke this in commit 1bb45f6e61

We intentionally *don't* flush in window_semi_free, as this could be
when there's no compositor left to flush to (in the case of session
recovery).
2017-08-31 11:17:34 -05:00
Derek Foreman 57d5b5921e ecore_wl2: Kill the wl idle enterer
We do flushes when we need them now, so we don't need this somewhat
non deterministic flush mechanism anymore.

Anything that breaks as a result of this should be fixable by adding an
ecore_wl2_display_flush() somewhere appropriate.
2017-08-30 15:08:53 -05:00
Derek Foreman 1bb45f6e61 ecore_wl2: Use ecore_wl2_window_commit for all wl_surface_commits
This adds an explicit flush to every surface commit.
2017-08-30 15:08:53 -05:00
Chris Michael 114f559e23 ecore-wl2: Formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-08-30 15:50:12 -04:00
Derek Foreman f886a76dae wayland: Force a display flush when committing surfaces
We had a hack in place to flush the display from an idle enterer instead
of after a surface commit.  This led to a problem where the idle
enterer dispatch order was:

renderer for main canvas
wayland dispatch idle enterer
renderer for mouse cursor canvas

The surface commit for the mouse cursor was never dispatched, so the mouse
cursor animation would only update at the rate other events occurred.

By flushing at the appropriate times instead we ensure a proper update.

ref T5850
2017-08-30 14:11:47 -05:00
Derek Foreman e7db6eec46 ecore_wl2: Add ecore_wl2_display_flush() api
Allowing engines to explicitly flush at the right times will remove some
awkwardness and bugs from our current display flush paradigm
2017-08-30 14:11:47 -05:00
Derek Foreman e0d94b8234 ecore_wl2: Fix small bug in flush handler
If wl_display_flush() returns a non negative number it was successful,
so we should disable the write handler then.  We were theoretically always
doing an extra flush on an empty buffer.

This is mostly cosmetic as that's not a costly operation.
2017-08-30 14:11:47 -05:00
Derek Foreman 4e41f7569b ecore_drm2: Fix warning with a dirty hack
So because we include wayland-server.h we're told that wl_buffer is
deprecated - however clients are still expected to use it, it's only
deprecated for usage in a compositor.

Making these into void pointers shuts up the warning.

We need to include wayland-server.h since some of the code provided by
ecore_wl2 is for compositors, but some of it is also for clients...
2017-08-30 14:11:47 -05:00
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