Commit Graph

65 Commits

Author SHA1 Message Date
Vincent Torri 8db62cb22b remove arguments of LOGFN in ecore_wayland modules as the are always the same
Reviewers: raster, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11777
2020-05-06 09:18:31 -04:00
Marcel Hollerbach 5ac02ec9ac ecore_evas: introduce wayland support for cnp & dnd
This adds cnp support, actions are right now only mapped to "ask",
further support can be added there, and synchronization can be added to
register more available actions. However, i did not find *any* wayland
implementation in gtk qt nor chromiumos that even use the action to
indicate anything. This here also has a slightly different behaviour to
X11 in terms of coordinates for motion,leave,enter. They can contain
negative coordinates (which is due to the fact that wl is CSD and X11 is
SSD. However, I did not want to fix this in any regard, as you might
want to use that, and it would be a none trivial amount of code to fix
that.

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11329
2020-03-08 10:59:37 +01:00
Christopher Michael b273bf7f9a ecore_wl2: Move ecore_wl2_window_rotation_change functions to be
internal

These functions are not used in efl wayland clients nor are they used
in Enlightenment. As such, there is no reason that they need to be
public API so this commit moves them to be Internal and updates
Ecore_Evas engine code to include the internal header.

ref T8013
2019-08-06 08:40:41 -04:00
Hermet Park 53599a8d39 ecore wayland: expand internal interface to pass engine option list.
This is a prepartion patch to support msaa in wayland.
ui window needs to deliver engine options (stencil, depth, msaa bits)
to evas engine side, ecore_evas_wayland_egl should have the argument to pass.
2019-04-25 16:56:40 +09:00
Derek Foreman 78f27a3eff ecore_wl2: Replace window ids with pointers
Summary:
There's no benefit to generating ids instead of just using the
Ecore_Wl2_Window pointer in events.

This has the added benefit of working around a really nasty hash collision
bug when multiple ecore_evas engines are used at once.

ref T7053
ref T6222

@beta_break
Depends on D6521

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7053, T6222

Differential Revision: https://phab.enlightenment.org/D6522
2018-07-06 10:16:21 -04:00
Derek Foreman d20c0bf964 ecore_evas_wayland: Remove content rectangle from engine data
It's no longer used.
2018-04-20 13:00:27 -05:00
Derek Foreman 8c917daa06 wayland: Tick like a boss
Instead of the clever but awful manual_render_set hack, actually do ticks
based on frame callbacks.

Fix T5850
2017-08-18 14:27:32 -05:00
Mike Blumenkrantz 64754b682e ecore-evas-wayland: rework window hint calcs to be more accurate
this is still pretty broken for some directions, client-side aspect fml
2017-08-04 16:17:33 -04:00
Chris Michael 09375bf5b5 Revert "ecore-evas-wayland: Add support for setting window stack mode"
This commit reverts support for setting window stacking mode from
ecore_evas_wayland as per IRC dicussion with cedric

This reverts commit a3cf0d3a54.
2017-06-15 13:08:39 -04:00
Chris Michael a3cf0d3a54 ecore-evas-wayland: Add support for setting window stack mode
This patch adds support for updating ecore_wl2_window stack mode when
the ecore_evas_layer_set is called.

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-15 11:39:27 -04:00
Chris Michael cb94befb9d ecore-evas-wl: Add support for Window Manager rotations
This patch adds support to Ecore_Evas_Wayland for Window Manager
Rotations so that window managers which do support rotations are able
to rotate an EFL wayland application.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:42 -04:00
Bryce Harrington 2f025184f7 evas: document the wayland ecore_evas constructors
Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:56 -07: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
Derek Foreman 489b87edc9 ecore_evas_wayland: Remove unnecessary function prototypes 2017-04-26 13:47:46 -05:00
Derek Foreman a1b90cf4d7 Revert "ecore-evas-wayland: Fix issue of apps not starting up in fullscreen mode"
This reverts commit dfb1877500.

This did fix the problem of "rage -f" not starting properly, but it
broke toggling between fullscreen and !fullscreen for other apps.

They'd resize to a large, but not quite fullscreen, size, then render with decor
present, and big black bars on the right/bottom edges (which were offscreen due
to the client size and position)

This isn't really the right place to fix this - it's a protocol usage bug, not
a canvas bug.
2017-03-09 12:21:08 -06:00
Derek Foreman 3c3808acc5 ecore_evas_wayland: fix session recovery crash with async render
We need a display unset path for software render to prevent an async
render completing after a disconnect from posting a frame and crashing
us.

As of this commit both software and gl session recovery work for me.

fix T5005

 #SessionRecoveryWorksHere
2017-03-03 13:30:01 -06:00
Chris Michael dfb1877500 ecore-evas-wayland: Fix issue of apps not starting up in fullscreen mode
Calls to make a window fullscreen do require the window to already
have a shell surface with which to fullscreen. If an app sets the
window fullscreen property when the window is not shown yet, then the
app would never startup fullscreen. This patch fixes that issue by
adding a 'defer_fullscreen' flag to Ecore_Evas (wayland) so that when
the window does finally get shown, we can show it in fullscreen.
Addresses part of the T5044 ticket...

ref T5044

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-01 11:30:15 -05: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
Chris Michael d33e0d34e0 ecore-evas-wayland: Minor formatting fix
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Jean-Philippe Andre eb8d9387c1 wayland: Remove support for "draw_frame"
draw_frame is a legacy feature that draws a very ugly window border
with a white rect and a black text as title bar. This could be
used in wayland when using only the ecore_evas APIs, rather than
elm_win.

Note that the API ecore_evas_draw_frame_set() can not possibly work
as the flag is checked when the ecore_evas is created, so changing
the flag has no effect on existing windows.
2016-11-03 17:22:14 +09:00
Derek Foreman c425140a67 ecore_evas_wayland: Minimize differences between shm and egl
Finally bring these together as much as possible to avoid future
diversions when bugs are only fixed in one or the other.

There are functional changes - state tracking for client side effects is
now added to the shm engine, some bug fixes for the egl engine have been
brought to the shm engine.
2016-11-02 13:37:02 -05:00
Derek Foreman 4260d5d3a2 ecore_evas_wayland: Make resize code common
Brings resize code into the common implementation - there is a functional
change.  There appears to have been a bug in the egl resize where it
used the same w, h order for portrait evases as for landscape.  This was
fixed in shm.  I've used the shm variant for the common code.
2016-11-02 13:37:02 -05:00
Derek Foreman 5d2a25a01d ecore_evas_wayland: Make transparent_set common
Moves transparent set into the common implementation - there is a
functional change here - the egl engine now calls transparent_set in
render_updates like the shm engine.

It is probable the this was the intended behaviour all along.
2016-11-02 13:37:01 -05:00
Derek Foreman 9ca6e274a4 ecore_evas_wayland: Make alpha set common
Moves alpha set into the common implementation - there is a functional
change here - the egl engine now calls alpha_do in render_updates like
the shm engine.

It is probable that this was the intended behaviour all along.
2016-11-02 13:37:01 -05:00
Derek Foreman 82277ae6b3 ecore_evas_wayland: Move more functions into the common implementation
Show and hide can be made common with almost no functional changes.
2016-11-02 13:37:01 -05:00
Derek Foreman 0b9f77ac96 wayland_egl: Remove unused wl_egl_window variables 2016-11-02 13:37:01 -05:00
Derek Foreman b898d3f929 wayland ecore evas: move move_resize to common
It's identical in both shm and egl variants, share it.
2016-11-02 13:37:00 -05:00
Bruno Dilly 44fc1c6ecc ecore_evas/wayland: handle added / removed seats
Create or delete evas_devices with class EVAS_DEVICE_CLASS_SEAT
for seats on each ecore_evas created so far.

Initially it's named considering its Wayland id.
2016-11-01 16:06:19 -02:00
Jean-Philippe Andre 5aa00004a5 ecore_evas: Register direct input cb from modules
If the ecore_evas modules were using
ecore_event_window_register() then they can also redirect
everything though the direct callback instead.
2016-05-31 19:03:04 +09:00
Mike Blumenkrantz 7510e42c1b elm_win: implement v2 of teamwork api using window-based display protocol
this adds support for wayland and makes teamwork integration trivial for any
application

@feature
2016-05-20 14:54:06 -04:00
Mike Blumenkrantz 9d5caf00b6 wayland: implement session recovery
add support for reconnecting wayland applications if the compositor dies

disconnect -> destroy gl ctx + image textures -> block rendering ->
reconnect -> create gl ctx -> create image textures -> unblock rendering ->
sprinkle special seasoning on top -> just like ma used to make

 #SamsungFeatures

@feature
2016-05-05 10:49:31 -04:00
Chris Michael eefee97c2a ecore-evas-wayland: Remove include for old Ecore_Wayland library
This include is leftover from the porting to Ecore_Wl2. Remove
unused include for old Ecore_Wayland library

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-03 11:21:31 -04:00
Mike Blumenkrantz 0712218537 wayland: hook engine data from elm_win and update rect with evas size
the only way to accurately calculate the "evas" size in the engine from
window geometry is to have the size of the frame available to subtract from
window geometry

window geometry is NOT framespace--framespace is the entire csd region, possibly
containing a shadow, and window geometry is explicitly the region occupied by the
window, ie. not the shadowed part.

not my ideal solution to the synchronization issue here, but I guess this is a
benefit of the unified tree

fix T3396
2016-04-07 14:19:25 -04:00
Mike Blumenkrantz afd083788b ecore-evas wayland: use www protocol when available
handle www protocol events and store the provided data into engine data

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2016-04-01 06:49:49 -04:00
Chris Michael 757f530af9 ecore-evas-wl: Defer creating surfaces for wayland canvas
This code adds support for deferring of surface creation and showing
inside Ecore_Evas Wayland. This is needed for Enlightenment so that it
does not try to create or show surfaces until the compositor has had a
chance to sync globals. This fixes an issue where early surface
creation would cause a crash in the compositor due to globals not
being syncd.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-11 11:26:24 -05:00
Chris Michael abbfde9d68 ecore-evas-wayland: Move configure acknowledge to render_flush_pre
If we acknowledge a configure from xdg during post render, we end up
breaking maximize of EFL clients inside Weston (and perhaps other
compositors). In order to fix that, we will now send the configure ack
post render but pre flush.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-09 12:08:15 -05:00
Chris Michael 3a8cfeb6d6 ecore-evas-wayland: Acknowledge configure event post render
This fixes a potential issue where we may have been sending the
configure acknowledgement before applying the actual new configuration
to the surface. Sending the ack_configure during post-render ensures
that we have already rendered according to the new configure
(addresses deferred rendering issue).

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-04 14:15:19 -05:00
Chris Michael cd1d9ec196 ecore-wl2: Port Ecore_Evas engines to use Ecore_Wl2 code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Mike Blumenkrantz a347a47e75 ee-wayland: use frame callbacks exclusively to determine render timing
when running in a wayland compositor, the ideal mode of operation is to
only prepare/send frames when the compositor has finished with the previous
frame

to achieve this, manual rendering can be toggled upon creating and completing
a frame callback, ensuring that a canvas never has multiple pending buffers at
any given time

fix T2784
2015-10-20 16:57:05 -04:00
Mike Blumenkrantz ef89bfbbed ecore-evas-wayland: add frame callback listener during render
when a render occurs, frame callbacks must be managed in order to ensure
successful rendering for future frames. the best place to do this is in the
engine here, since this is the lowest-level place which has access to both
the wl_surface as well as the evas rendering state

ref T2784
2015-10-16 15:55:40 -04:00
Chris Michael b55a24727a ecore-evas-wayland: Remove frame callbacks from Ecore_Evas wayland
engine

Summary: Frame callbacks are now handled inside the engine itself and
are thus not needed here anymore

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-17 15:50:56 -04:00
Mike Blumenkrantz 7171135792 ecore evas should not crash when unsetting pointer
ref D812

disappointed.jpg
2015-02-06 17:54:08 -05:00
ChunEon Park fb59ac34a1 ecore_evas - use eina_bool instead of the char for interal data. 2014-01-13 14:26:36 +09:00
ChunEon Park f111c8da6d ecore - clean up code.
fix indentation and use Eina_Bool instead of char.
2014-01-11 18:19:43 +09:00
Chris Michael a36b1641d9 Add common function prototype for setting ecore_evas aspect ratio
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-12-05 11:52:37 +00:00
Rafael Antognolli 615d5ab634 ecore_evas/wayland: Add a function to cleanup the frame callback.
This callback must be manually destroyed and removed on
ecore_evas_hide(), because it won't be delivered anymore after the
surface is destroyed. If the callback still exists, the engine will find
it and avoid doing a new redraw until it is finally called.

Maybe the correct thing to do is to keep this callback in the
Ecore_Wl_Window struct, and have some functions to set/unset it, so it
gets destroyed when the window is hidden. Or when the surface is
destroyed.
2013-12-02 17:54:29 -02:00
Rafael Antognolli ff5533b4e1 ecore_evas/wayland: Implement ecore_evas_withdrawn_set.
Just call ecore_evas_show/hide inside the function.
2013-12-02 17:51:55 -02:00
Chris Michael bc6711b229 Add function prototype for _ecore_evas_wl_common_resize
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-15 08:10:15 +00:00
Rafael Antognolli 839a737a62 ecore(_evas)/wayland: Move frame callback to engine data.
It's something specific to the ecore_evas engine/module, so there's no
need to keep this info in the Ecore_Wl_Window.
2013-11-01 15:07:53 -02:00
Chris Michael 21f0ad4f0e Add function prototypes for resize_edge_set.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-21 08:30:52 +01:00