Commit Graph

131 Commits

Author SHA1 Message Date
Mike Blumenkrantz ffa276fce3 wayland: add xdg-shell vfinal support for client-side
@feature
2018-01-10 11:39:52 -05: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 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
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 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
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 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 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 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
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 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
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 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 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 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 cd7633ecbf ecore-wl2: make _ecore_wl2_display_sync_get() local instead of static 2017-08-04 16:10:34 -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 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
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 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 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 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
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 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 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 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
Mike Blumenkrantz fbe5ff0104 ecore-wl2: implement compose keys
@feature

ref T5006
2017-05-26 16:27:42 -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 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 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 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 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
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
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 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 f162f47297 ecore_wl2: Auto generate www protocol
Needed to copy the protocol file from Enlightenment.
2017-01-18 13:04:48 -06:00