Commit Graph

321 Commits

Author SHA1 Message Date
Chris Michael 0a77b4e922 ecore-evas-wl: Don't check window visibility on raising
As we won't get a request from a server to raise a window which is not
visible anyway, this check is useless.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-07 11:08:48 -04:00
Bryce Harrington aa9bda8b83 ecore_evas: correct error message reporting incorrect engine name
Summary:
_ecore_evas_wl_common_new_internal() creates both wayland_egl and
wayland_shm backed windows, so reporting that the failure was in looking
up "Wayland_Shm" could be misleading.

Also, this routine can be called with any arbitrary string as
engine_name, so including what was received in the error message might
be helpful for diagnosing bugs.

Reviewers: cedric

Reviewed By: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:56 -07:00
Mike Blumenkrantz cde843438d ee wayland: only handle events for ee with matching display object
ensure apps with multiple client connections don't mix events from different
connections

@fix
2017-06-02 18:23:42 -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 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 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 d0f707ef91 ecore-evas-wayland: do not trigger resize operation when performing rotation
@fix
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 2c291f5bb8 ee wl engines: set seat id when creating seats 2017-05-19 12:41:16 -04:00
Chris Michael f160d41539 ecore-evas-wayland: Remove unused variable
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-05-09 11:47:04 -04:00
Cedric BAIL e541c4f500 ecore_evas: refactor wayland backend to use generic render infrastructure. 2017-05-08 15:03:51 -07:00
Cedric Bail 103dfc5ba4 ecore_evas: first step into refactoring wayland backend. 2017-05-05 17:55:06 -07:00
Derek Foreman 0f581cb745 ecore_evas_wayland: Make local functions static 2017-04-26 13:47:46 -05:00
Derek Foreman c5550f9320 ecore_evas_wayland: Remove unused functions 2017-04-26 13:47:46 -05:00
Derek Foreman 489b87edc9 ecore_evas_wayland: Remove unnecessary function prototypes 2017-04-26 13:47:46 -05:00
Derek Foreman dcd9e09472 ecore_evas_wayland_common: Reorder functions
Try to put these in order so we don't need prototypes

No functional changes
2017-04-26 13:47:46 -05:00
Mike Blumenkrantz 9d8bc92c4a ecore-evas-wayland: update no-op configure commit case for new acking method
ref 1b9970658f
ref 5e7456a315
2017-03-10 16:11:19 -05:00
Mike Blumenkrantz 1b9970658f ecore-evas-wayland: commit on no-op configure events
this handles the case of a window configure not triggering any visible change

fix T5192
2017-03-10 15:54:21 -05: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 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
Derek Foreman 706a1a33a4 ecore_evas_wayland: Use surface from engine info
Calling ecore_wl2_window_surface_get() has the side effect of creating
a new wayland surface if we don't already have one.  If we do that
during a session recovery, we can try to create a new surface while
we have no connection to a compositor - that's Bad.

So we just use the one we already have stored - which we NULL out on
disconnect.
2017-03-03 13:30:01 -06:00
Jiyoun Park ffa2d37462 ecore_evas_wayland: remove useless code 2017-03-03 12:44:35 +09:00
Jiyoun Park 89c6a316f6 ecore_evas_wayland: remove useless code 2017-03-03 11:28:52 +09:00
Jiyoun Park fb730c1fd7 ecore_evas_wayland: fix bug ee's width and height were updated wrong place.
ecore evas manages the width and height using the ee->w/h and ee->req.w/h.
but sometimes only ee->req value can be updated.
2017-03-03 11:06:50 +09:00
Derek Foreman b7f1c66d3a ecore-evas-wayland: Fix yet another wayland session recovery break
commit 81783ec75c combined two "identical"
pieces of code that weren't identical.  The removed code never checked
if the evas was visible before performing operations to make it so,
the code left behind would bail if the evas was visible.

Reset the visible status during disconnect to make sure we properly show
windows after a session recovery.

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

@fix

Session works on the software engines at this point.  Use this as a bisect
point next time someone fubars it.

GL still broken.  Window geometry seems like it doesn't get updated right
either, but at least clients reconnect again.

 #SessionRecoveryWorksHere
2017-03-01 14:47:21 -06:00
Chris Michael ce65b59d5a Revert "ecore-evas-wayland: Don't register animators until window gets shown"
Reverting this as apparently it broke session recovery for some odd
ass reason...

This reverts commit 38f3854f45.
2017-03-01 13:13:46 -05:00
Chris Michael 81783ec75c ecore-evas-wayland: Remove duplicated code
As we already call the same functions inside
_ecore_evas_wl_common_show, there is no need to duplicate the same
code when we have defer_show set...just call the show function.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-01 11:43:11 -05: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
Chris Michael 38f3854f45 ecore-evas-wayland: Don't register animators until window gets shown
Small patch to not call _ecore_evas_register unless we are showing the
window. This stops creation of rogue animators on cursors until the
window is actually going to be shown.

Fixes T5209

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-27 11:33:57 -05:00
Jiyoun Park 78feb9decb ecore_evas_wayland_common: fix bug that window is not rotated when app request rotate.
In landscape mode, width & height of evas are different with ecore's.
so diff is checked differently according to the  portrait & landscape mode.
2017-02-20 11:15:59 +09:00
Chris Michael 60c7891598 ecore-evas-wayland: Fix setting rotation during async render
If we are in async render when a call to set rotation happens, we
should not be setting the engine info->rotation until we have actually
handled the rotation. Old code here would set delayed.rotation on the
ecore_evas itself, but then it would tell the engine to rotate. What
we actually want here is If in async render, set the delayed rotation
property and let render_updates deal with any delayed setting.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-13 13:37:06 -05:00
Chris Michael 7b83432539 ecore-evas-wayland: Minor formatting fix
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-31 10:29:50 -05:00
Chris Michael 20cbc92639 ecore-evas: Remove unused 'just_mapped' flag
As this flag is not being used anywhere for anything, remove it.
Useless to have it.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-30 11:50:05 -05:00
Chris Michael 51da6df5ad ecore-evas-wayland: Only fetch framespace values if we have a window
Minor optimization to avoid always fetching framespace values even if
we were not going to use them.

@optimize

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-30 11:07:07 -05:00
Chris Michael 6d51e0b1f3 ecore-evas-wayland: Add handler for window_configure_complete event
Small patch to add a handler so we can listen for when the surface
configure event is complete and can then go ahead and attach buffers
to the surface. This allows rage <filename> to work again in Weston :)

NB: This does allow rage <filename> to work under Weston now, but
still fails under Enlightenment for some reason :(

ref T5090

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:48 -05:00
Chris Michael bc1bbe8829 ecore-evas-wayland: Minor formatting fix
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:16 -05:00
Chris Michael debc7ee8c3 ecore-evas-wayland: Ensure pending configure is handled before rendering
With the change to xdg_shell v6, we need to wait for any pending
configure to be handled before we can render. This patch addresses
that issue and makes Elementary_Test work again under Weston :)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 11:28:40 -05:00
Chris Michael 19946e6035 ecore-evas-wayland Fix formatting
NB: No functional changes (yet), just formatting cleanup so this is
more readable.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 09:44:53 -05:00
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Chris Michael 4c04958f87 ecore-evas-wayland: Support zxdg_shell version 6 configure_ack
Small patch to support configure acknowledgement with xdg_shell
version 6.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 14:25:24 -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 044219226c Ecore Evas: Add support for multiple mouse positions.
Since it's possible to have more than one mouse, Ecore Evas
must take into account the position of all mouses and update them
correctly.
2016-12-20 18:34:39 -02:00
Guilherme Iscaro e5acc5604a Ecore Evas: Add support to set cursor icon per mouse device.
Since Ecore Evas now supports multiple mouses new APIs were added
in order to be able to set the cursor image to any device.
2016-12-20 18:34:39 -02: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
Guilherme Iscaro 64986bccac Ecore Evas: Add API to set/get the pointer position per device.
Since Ecore Evas now support multiple mouse devices new APIs were
added in order to fetch the mouse position.
2016-12-20 18:34:39 -02:00
Chris Michael fa05393d02 ecore-evas-wayland: remove float comparison warning from wayland backend
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 08:53:16 -05:00
Chris Michael f449fca9d6 ecore-evas-wayland: Set all evas engine info fields before updating
Small patch to set all fields of the Evas Engine Info structure before
calling evas_engine_info_set function

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Chris Michael 0ecaf00d97 ecore-evas-wayland: Use engine 'hidden' field for ecore_evas_hide operations
This patch allows us to set a 'hidden' flag in the Evas Engine
information structure instead of setting a NULL surface. Setting this
flag allows us to hide/show a canvas without having to
destroy/recreate a wl_surface every time.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Guilherme Iscaro ad1d160bb6 Ecore Input Evas: Add ecore_event_evas_seat_modifier_lock_update().
This function will set the modifiers/lock per seat in Evas.
Some places will still use ecore_event_evas_modifier_lock_update(),
since multi-seat is not supported.
2016-12-02 09:57:50 -02:00
Guilherme Iscaro 75619fc290 Ecore Evas: Add multi seat support for mouse in/out. 2016-11-28 13:57:55 -02:00
Guilherme Iscaro be609118c6 Ecore_Evas: Add support for per-seat focus. 2016-11-28 13:57:55 -02:00
Bruno Dilly 1e62cd562e ecore_wl2: avoid adding repeated devices
Summary:
After changes done on commit 9f8e2e0d9c
it was possible to have multiple devices with the same
id added throught the function
_ecore_evas_wl_common_cb_global_added().

To avoid such issue, let's check if the device was already
created first.

Reviewers: iscaro

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4428
2016-11-24 18:31:23 -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
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
Derek Foreman 9ad35a6fa2 ecore_evas_wayland: Re-kill double disconnect bug on fallback
Jpeg caught this one a while back and it got re-introduced recently.
2016-11-09 16:33:49 -06:00
Chris Michael 11ef74c962 ecore-evas-wayland: Fix case of potential double-free
This patch addresses the case where we failed to allocate 'wdata' and
were calling free(ee) before going to an error handler. For the fix,
just don't free(ee) here and let the error handling do it's job.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 12:16:06 -05:00
Chris Michael 7a74a2e176 ecore-evas-wayland: Fix typo
Fix small typo which lead to undefined error statement.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:22:23 -05:00
Chris Michael b7406df4cf ecore-evas-wayland: Add warning if we fail to set engine info
Coverity reports an error handling issue here as we are not checking
the return value of evas_engine_info_set, so check that return and
issue a warning if it fails.

Fixes Coverity CID1365651

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:13:07 -05:00
Chris Michael 781a5089e5 ecore-evas-wayland: Fix NULL pointer dereference
Coverity reports that accessing 'einfo' here is a NULL pointer
dereference. evas_engine_info_get can return NULL, so we should be
checking for a valid return before trying to use it.

Fixes Coverity CID1365654

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:10:53 -05:00
Chris Michael 8a24d64030 ecore_evas_wayland: Fix null pointer dereference
Coverity reports a null pointer dereference here because
evas_engine_info_get can return NULL. Check for a valid return before
trying to use it.

Fixes Coverity CID1365655

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:09:00 -05:00
Chris Michael 90dabc831f ecore-evas-wayland: Fix use after free
Coverity reports illegal access here as we are trying to pass a freed
pointer to ecore_evas_free. Rework error handling to avoid this.

Fixes Coverity CID1365657

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:06:36 -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 b23797c55a ecore_evas_wayland: Make rotation_set common
Rotation set can be moved into common now - should be no functional
change.
2016-11-02 13:37:01 -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 55de5c61cd ecore_evas_wayland: Don't include Evas_Engine_Wayland_Egl.h
There doesn't seem to be any need for this.
2016-11-02 13:37:01 -05:00
Derek Foreman 9e43a15526 wayland_egl: Remove pre_post_swap_callback_set
This stuff seems copied from gl_x11 which actually has API to use it.

In this engine nothing can actually set it, so it's just all dead code.
2016-11-02 13:37:00 -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 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
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
Bruno Dilly 26c1a564d9 ecore_evas/wayland: remove unnecessary NULL attributions
When freeing wdata there is no reason to set each
freed field to NULL.
2016-11-01 16:06:19 -02:00
Derek Foreman 54582858d8 ecore_evas_wayland: Don't use frame callbacks on windows with no shell surface
If we set a frame callback on a window with no shell surface (ie: and unmapped
window), the frame callback will never fire.  This was preventing some
applications like rage from ever posting a frame.
2016-10-14 16:07:08 -05:00
Youngbok Shin ceb0eab402 ecore_evas_wayland: Add NULL checking for surface
Summary: Need to NULL check before using surface like other cases.

Test Plan: N/A

Reviewers: jpeg, raster, ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4301
2016-09-27 08:50:05 -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
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 5292b3de05 ecore-wl2: redo Ecore_Wl2_Event_Window_Configure entirely
this is an event representing the "new" state of the surface after a
configure event. it must contain the exact states which could potentially
have changed in the configure in order to ensure synchronization between
csd states and window size.

ecore events for xdg-shell configures must be sent only upon receiving a
configure event since states are set by the compositor and not by the client

@fix

 #hoorayforbeta
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
Mike Blumenkrantz a6924ced9d wayland: add comment for ref T3396 2016-03-30 16:00:10 -04:00
Mike Blumenkrantz f70649a13d wayland: ignore resize from no-op surface configure events, send events always
this fixes the case where a configure event with the current window geometry
would cause (inaccurate) resizes

@fix
2016-03-30 15:42:21 -04:00
Chris Michael 99ac0763ab ecore-evas: Rename ecore_evas_wayland_window_get2 function
This renames the ecore_evas_wayland_window_get2 function to be
ecore_evas_wayland2_window_get before the 1.17 roll out.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-07 15:02:13 -05:00
Mike Blumenkrantz 54df1d9c6a ecore-evas wayland: move frame sending to pre-flush callback
it was possible to deadlock rendering if a pre-render occurred but
the resulting render had no updated regions

@fix
2015-12-15 17:24:52 -05: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
Mike Blumenkrantz 3760377e15 ee-wayland: do not send configure ack if no configure serial exists
also unset serial to ensure subsequent renders don't trigger the same ack
2015-12-10 16:00:45 -05:00
Chris Michael b5f8966fbe ecore-evas-wayland: Fix issue of starting resizing causing size jumps
Previously, when we started to resize an efl app, the size would
"jump" due to framespace being adjusted. This patch fixes that issue
and resize now works as expected.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-09 12:08:15 -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 32eb2d32c4 ecore-evas-wayland: Don't set window geometry in ecore_evas
As we do not have the proper values for window geometry to be setting
it here, remove calls to set window geometry. We can more accurately
determine the window geometry from inside Elementary as it handles the
theme for the window borders.

@fix

ref T2919

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-07 15:36:42 -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 9f1eb3e021 ecore-evas-wayland: Use proper Ecore_Wl2 window functions
To get the proper maximized and fullscreen states, we should be using
the ecore_wl2_window functions, not the ecore_wl_window functions

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-03 14:55:42 -05:00
Mike Blumenkrantz 9c26f9311c ecore-evas wayland: enforce frame/state change triggering before move/resize
if a state change occurs on the ee, related callbacks must be run prior to
performing any resizes in order to ensure that the correct csd sizes are
calculated

@fix

ref T2841
2015-12-03 12:07:45 -05:00
Chris Michael 64a65f42a3 ecore-evas-wl: Fix issue of resize jumping
Summary: When an initial client application was shown and we tried to
resize it, the resize would jump by the amount of framespace. This was
because the xdg_surface@configure event would be sending window
geometry as the width/height params in the event. We need to account
for that in the callback of window configure and adjust size
accordingly.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:07:45 -05:00
Chris Michael caa1b4323b ecore-wl2: Port Ecore_Evas engines to use Ecore_Wl2 code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:07:20 -05:00
Chris Michael 116a0abf93 ecore-evas-wl: Fix issue of improper window geometry
This fixes an issue where maximizing a window would set improper xdg
surface window geometry. We receive window configure sizes based on
xdg surface window geometry, so we need to subtract framespace there
or else window size grows when maximizing/unmaximizing multiple times.
This also adjusts the call to xdg_surface_set_window_geometry to
account for framespace (Fixes T2842).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:49 -05:00
Mike Blumenkrantz d4dcd026f4 ecore-evas wayland: use correct values when updating wayland window size
by using the geometry from after the request size has been updated,
scenarios such as the following can be avoided:

[4208305.332] xdg_surface@46.set_window_geometry(0, 0, 1778, 1)
[4208305.370] xdg_surface@46.set_window_geometry(0, 0, 1778, 250)

@fix
2015-12-03 12:05:49 -05:00
Chris Michael 50411563aa ecore-wl2: Fix calling wl_surface_frame with proper Ecore_Wl2 window
frame

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:49 -05:00
Chris Michael 5ab650bf27 ecore-evas-wl: Fix ecore-evas wl common code due to botched rebase
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:01 -05:00
Chris Michael 7ae6c7d11d ecore-wl2: Port Ecore_Evas engines to use Ecore_Wl2 code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:01 -05:00
Mike Blumenkrantz 28a782283a ecore-evas wayland: enforce frame/state change triggering before move/resize
if a state change occurs on the ee, related callbacks must be run prior to
performing any resizes in order to ensure that the correct csd sizes are
calculated

@fix

ref T2841
2015-12-03 12:05:01 -05:00
Chris Michael 1b156a4b08 ecore-evas-wl: Fix issue of improper window geometry
This fixes an issue where maximizing a window would set improper xdg
surface window geometry. We receive window configure sizes based on
xdg surface window geometry, so we need to subtract framespace there
or else window size grows when maximizing/unmaximizing multiple times.
This also adjusts the call to xdg_surface_set_window_geometry to
account for framespace (Fixes T2842).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:01 -05:00
Mike Blumenkrantz 5b755a95c5 ecore-evas wayland: use correct values when updating wayland window size
by using the geometry from after the request size has been updated,
scenarios such as the following can be avoided:

[4208305.332] xdg_surface@46.set_window_geometry(0, 0, 1778, 1)
[4208305.370] xdg_surface@46.set_window_geometry(0, 0, 1778, 250)

@fix
2015-12-03 12:05:01 -05:00
Chris Michael ebc629375d ecore-evas-wl: Fix bad merge
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:01 -05:00
Chris Michael 123ac16eb7 ecore-wl2: Fix calling wl_surface_frame with proper Ecore_Wl2 window frame
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:01 -05:00
Chris Michael adf555660c ecore-evas-wl: Fix ecore-evas wl common code due to botched rebase
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:01 -05:00
Chris Michael 9e83ddbc48 ecore-wl2: Port Ecore_Evas engines to use Ecore_Wl2 code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:01 -05:00
Mike Blumenkrantz 787beec627 ecore-evas wayland: enforce frame/state change triggering before move/resize
if a state change occurs on the ee, related callbacks must be run prior to
performing any resizes in order to ensure that the correct csd sizes are
calculated

@fix

ref T2841
2015-12-03 12:05:01 -05:00
Mike Blumenkrantz 4aba5758f9 ecore-evas wayland: use correct values when updating wayland window size
by using the geometry from after the request size has been updated,
scenarios such as the following can be avoided:

[4208305.332] xdg_surface@46.set_window_geometry(0, 0, 1778, 1)
[4208305.370] xdg_surface@46.set_window_geometry(0, 0, 1778, 250)

@fix
2015-12-03 12:03:57 -05:00
Chris Michael 684429099e ecore-wl2: Change name of ecore_wl2_window_class_name_set function
It makes more sense to have this function be called
ecore_wl2_window_class_set.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael 0dd9ae831c ecore-evas-wl: Fix issue of resize jumping
Summary: When an initial client application was shown and we tried to
resize it, the resize would jump by the amount of framespace. This was
because the xdg_surface@configure event would be sending window
geometry as the width/height params in the event. We need to account
for that in the callback of window configure and adjust size
accordingly.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael ea371c88fc ecore-evas-wl: Update frame callbacks to use Ecore_Wl2
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael 232dfd355d ecore-wl2: Fix calling wl_surface_frame with proper Ecore_Wl2 window
frame

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael f444bf45f5 ecore-evas-wl: Fix ecore-evas wl common code due to botched rebase
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 2b19919c90 ecore-evas-wayland: Fix issue of using wrong structure for mouse
events, and bring back function to listen for window configure events

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 0a9861c6aa ecore-evas-wayland: Re-enable interface functions for window get and
type set

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -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 3b139fe0f1 ecore-evas wayland: enforce frame/state change triggering before move/resize
if a state change occurs on the ee, related callbacks must be run prior to
performing any resizes in order to ensure that the correct csd sizes are
calculated

@fix

ref T2841
2015-11-17 18:21:11 -05:00
Chris Michael d34ad18f30 ecore-evas-wl: Fix issue of improper window geometry
This fixes an issue where maximizing a window would set improper xdg
surface window geometry. We receive window configure sizes based on
xdg surface window geometry, so we need to subtract framespace there
or else window size grows when maximizing/unmaximizing multiple times.
This also adjusts the call to xdg_surface_set_window_geometry to
account for framespace (Fixes T2842).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-17 13:51:19 -05:00
Mike Blumenkrantz 69a8de59b0 ecore-evas wayland: use correct values when updating wayland window size
by using the geometry from after the request size has been updated,
scenarios such as the following can be avoided:

[4208305.332] xdg_surface@46.set_window_geometry(0, 0, 1778, 1)
[4208305.370] xdg_surface@46.set_window_geometry(0, 0, 1778, 250)

@fix
2015-11-13 15:11:22 -05:00
Chris Michael 60f5b43deb ecore-evas-wl: Ignore step size when maximizing
Summary; This fixes an issue where maximizing efl/elm apps in Weston
and in Enlightenment would cause extra space to be left around the
window.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-30 15:12:41 -04:00
Chris Michael 329832bb80 ecore-evas-wayland: Fix formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-30 09:28:10 -04:00
Mike Blumenkrantz b6af7f9b82 ee-wayland: remove attempt to optimize canvas resizing
in the case of operations which change framespace, rejecting resizes
at this point will cause the canvas to fail at resizing and result in a
partially-rendered canvas; the real canvas geometry must be calculated by
running the entire function in order to determine whether the resize is valid

fixes toggling borderless state of windows
2015-10-21 14:11:00 -04: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 b71410972e ecore-evas-wayland: Trap for subsequent resize events
Summary: If we have already resized this ecore_evas to be what we
want, then there is no point in running the below resize code as we
should already be at the requested size. Add a test at the beginning
to see if we have already set these values

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-12 14:08:12 -04:00
Chris Michael dbebfc505a ecore-evas-wayland: Fix common window configure callback to not adjust
for framespace

Summary: As we have already adjusted for framespace in various code
leading up to a configure callback, don't adjust for it here. This
fixes an issue where xdg surface window geometry would get incorrect
values which were including framespace. The values of the
xdg_surface_set_window_geometry should be Just the geometry of the
visible window.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-12 10:59:33 -04:00
Chris Michael 295bfd7df6 ecore-evas-wayland-shm: Check for fullscreen and override windows when
processing updates

Summary: When processing render updates, we should be checking if the
Ecore_Evas "should be visible" property is set.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-08 13:37:30 -04:00
Chris Michael 9c432ca590 ecore-evas-wayland: Remove unused variable
Summary: As we no longer need the wdata here (see previous commit), we
can remove the usage of this variable

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-30 15:30:36 -04:00
Chris Michael 82de5a66d7 ecore-evas-wayland: Remove call to ecore_wl_window_update_location
Summary: This function should really not be called here as it triggers
an xdg_surface_set_window_geometry call which (in turn) should only be
getting called when the window geometry (meaning visible region)
itself has changed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-30 15:17:57 -04:00
Chris Michael 7745189b0a ecore-evas-wayland-shm: Remove duplicated code on configure event
Summary: As we end up calling ecore_evas_wl_common_resize anyway,
there is no need for all these size calculations in the configure
callback. The resize function will deal with this anyway.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-28 15:28:17 -04:00
Chris Michael 5754e8ccc5 ecore-evas-wayland: Fix issue of setting NULL cursor object
Summary: If we are calling ecore_evas_object_cursor_set with a NULL
object, then we need to inform the ecore_wayland window that we no
longer have a cursor surface.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-04 12:38:56 -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 07a6d138a9 ee-wl should probably clamp configure event resize to output size for fs wins
fs configures are 0x0, so reuse existing output size here to get accurate sizes
2015-03-04 16:49:19 -05:00
Mike Blumenkrantz 7171135792 ecore evas should not crash when unsetting pointer
ref D812

disappointed.jpg
2015-02-06 17:54:08 -05:00
Mike Blumenkrantz 6a934f703c ee engines should not crash when re-setting the same title/name_class
@fix
2015-01-22 14:39:10 -05:00
Chris Michael 9e485439d7 ecore-evas-wayland: Port fix of min/max size calculations to the
configure event handler

Summary: This patch ports the fix for windows without a min/max size
being set over to the configure event handler (which was also not
taking into account the fact that Some windows may Not have a min/max
property set on them.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-09 09:42:43 -05:00
Chris Michael bf9c5873fb ecore-evas-wayland: Fix min/max size calculations
Summary: This fixes an issue for windows which do not set a min or max
size in the properties. This was discovered when running Enlightenment
in a Wayland-Only scenario, and trying to bring up the settings panel
which would cause an endless loop in calculating the proper window
size due to min/max not being set.

@fix

NB: Thanks to Mike for the help in tracing this ! :)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-07 14:50:00 -05:00
Chris Michael d136391108 ecore-evas-wayland: Fix formatting
Summary: no functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-07 14:50:00 -05:00
Chris Michael 7f82494459 ecore-evas: Fix compiler warnings about inproper returns
Summary: This fixes missing return values in functions that return
non-void

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-05 12:14:46 -05:00
vivek c5f6c3941c ecore_evas_wayland: Add null check conditions in ecore evas wayland module
Summary:
Added null check conditions to check ecore_evas pointer in various places
of ecore evas wayland common module

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1812
2015-01-05 09:09:03 -05:00
Chris Michael f224fb24e2 ecore-evas-wayland: Add support for minimizing xdg_shell surfaces
xdg_shell protocol supports minimizing surfaces. When elm apps request
iconification, they will call ecore_evas_iconified_set which in turn
will make use of the newly added ecore_wl_window_iconified_set function.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00
Chris Michael 4aeee0de4c ecore-evas-wayland: Fix ecore_evas async rendering with wayland engines
Recent expedite changes have uncovered an issue where the ecore_evas
(under wayland) was not supporting async rendering correctly. This
fixes the issue so we can run expedite with -y and get redraws again.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-22 13:32:38 -04:00
Chris Michael edb1202a84 ecore-evas: Fix formatting and remove whitespace
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-06-25 13:20:49 -04:00
Chris Michael 87af84c3e3 ecore-evas: Fix cursor position getting reset to 0,0 when using
ecore_evas_cursor_object_set

NB: Previously, if we mad calls to ecore_evas_cursor_object_set to update the
mouse cursor hotspot, the mouse cursor would be repositioned at 0,0 on
the canvas due to x & y being set to 0,0. We fix that here by fetching
the current mouse position Regardless if we are changing the object or
not (ie: perhaps we are just updating the hotspot and not the object)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-06-25 13:20:49 -04:00
Chris Michael c53053f2aa ecore-evas-wl: Ooops, Fix opaque & input regions being set to incorrect values
@fix: As it turns out, we cannot just blindly set the regions here
during resize. Elementary apps will set the opaque region to account
for any edj frames, and having the region_set calls Here was
causing issues....

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-15 10:41:54 +01:00
Chris Michael 99962a5893 ecore-evas-wl: Reduce useless compositor redraws during render update
and update input & opaque regions after resizing.

@bugfix: We do not need to call ecore_wl_window_damage & commit here.
The damages are already handled in the evas engine for both shm & egl.
Those damages are sent to the compositor Already from the evas engine,
so we don't need to send the same damages twice. This reduces more
useless compositor redraws as we are not constantly sending damages &
calling commit twice for every frame.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-09 09:56:41 +01:00
Carsten Haitzler 165efe2254 ecore-evas - fix object cursor to not delete the same cursor when set
this fixes a misbehavior with ecore evas object cursors when you set
one, the old one is deleted, but if the old is the same, the new one
you set gets deleted, rather than just updated.

@fix
2014-04-02 20:47:28 +09:00