Commit Graph

92 Commits

Author SHA1 Message Date
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
Chris Michael f3240f630b ecore-wl2: Unify surface creation code
As we call the same code during ecore_wl2_window_surface_get and
ecore_wl2_window_show functions that basically create the wl_surface
for a given window we can unify that code into one function that can
be called from various places. This also fixes an issue inside
ecore_wl2_window_show where the window surface_id may not have been
getting filled properly.

@fix

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

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

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 09:55:27 -04:00
Chris Michael 2166ae6377 ecore-wl2: Remove cursor field from window structure
Remove the const char *cursor field from the window structure as this
is useless. It was never used for any real functional purpose.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-26 11:01:12 -04:00
Chris Michael a80d4ef5a5 ecore-wl2: Remove usage of libwayland-cursor
This commit removes usage of libwayland-cursor inside Ecore_Wl2
library. This is done so that EFL Wayland applications can use EFL
mouse pointers and not look ugly :)

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-25 14:22:07 -04:00
Chris Michael db63eff588 ecore-wl2: Don't call cursor_update_stop function twice.
When setting a cursor by name, the _ecore_wl2_input_cursor_set
function already makes a call to stop updating the cursor, so no need
to run that twice.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-25 14:22:07 -04:00
Chris Michael 3a44b0fd17 Revert "ecore-wl2: Remove all references to wl_cursor usage"
This reverts commit 173fda5c11.

Reverting this as we need to handle mouse pointers a different way.
2016-10-25 11:07:32 -04:00
Chris Michael 173fda5c11 ecore-wl2: Remove all references to wl_cursor usage
This commit essentially removes the ability to use wl_cursor for EFL
Wayland Client Applications. This is a request from "some old man" ;)
for efl wayland applications to use EFL pointers, not X/FDO pointers.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-21 15:32:47 -04:00
Derek Foreman 35995be7b0 ecore_wl2: add API for testing if a window has a shell surface 2016-10-14 16:07:08 -05:00
Derek Foreman 9efd12a278 ecore-wl2: Fix input and opaque region setting
Bad y co-ordinate resulted in broken shadows after session recovery.

@fix
2016-10-13 17:40:38 -05:00
Mike Blumenkrantz ed743dddf0 ecore-wl2: add internal window flag for determining if opaque/input have been set 2016-10-07 11:00:08 -04:00
Mike Blumenkrantz ea7d6e11d3 ecore-wl2: apply input+opaque regions after creating window surface
@fix
2016-10-07 10:51:39 -04:00
Mike Blumenkrantz 463549e343 ecore-wl2: avoid crashes when setting window attrs before surface creation
this is async anyway

@fix
2016-10-07 10:51:39 -04:00
Chris Michael ed55b1f733 ecore-wl2: Add safety check for valid compositor
As we cannot create a new wl_region without a valid compositor, add a
safety check.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-26 12:43:24 -04:00
Chris Michael ac4ac88a72 ecore-wl2: Minor formatting fix
NB: No functional changes, just making this readable for me

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-19 09:12:29 -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 98e8183b1b ecore-wl2: Port session recovery protocol to work with Ecore_Wl2
This patch ports the existing session recovery protocol from
Ecore_Wayland so that it is used inside Ecore_Wl2.

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-22 09:32:45 -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 af1c7d3407 ecore-wl2: remove maximized/fullscreen/transient from window types enum
these aren't real window types and only complicate internals/api

 #hoorayforbeta
2016-04-07 14:19:25 -04:00
Mike Blumenkrantz eb1a422d63 ecore_wl2: implement www extension for client-side use
handling for global binding and signal prop

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2016-04-01 06:49:49 -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
Derek Foreman 943f2df006 ecore_drm/ecore_wl2: logging: remove errant usage of %m
Summary:
printf %m stringifies and prints errno.  I've tried to remove its use
anywhere that the immediately preceding function might not set errno
or is a complicated function for which knowing errno doesn't really
give any useful information.

I've left a few of the drmMode calls because they're just wrappers
around ioctl, which legitimately sets errno.

@fix

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3572
2016-01-14 13:06:02 -05:00
Chris Michael e50d228882 ecore-wl2: rewrite iconified set function for consistency
* santize boolean params
* enforce window state flag setting

@fix

ref T2919

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-08 12:00:13 -05:00
Chris Michael 880a76a75b ecore-wl2: rewrite maximize/fullscreen set functions for consistency
* sanitize boolean params
* enforce window state flag setting
* use window flag instead of window type for state

@fix

ref T2919

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-07 15:36:42 -05:00
Chris Michael 33d0c8cdcf ecore-wl2: Fix formatting and remove extra blank line
NB: no functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-07 15:36:42 -05:00
Mike Blumenkrantz 8fb4840479 ecore-wl2: add function for getting display from window 2015-12-05 13:05:15 -05:00
Mike Blumenkrantz f50a434bd1 ecore-wl2: apply same deferred shell surface creation as ecore-wayland
new wheel meets old wheel.

ref 265ad8b5d0
2015-12-04 19:06:51 -05:00
Chris Michael 298d66377e ecore-wl2: Implement function pointer for configure acknowledge
We need a way to store the configure serial, and make the
xdg_surface_ack_configure callback be callable by Ecore_Evas at the
appropriate time. This fixes an issue where previously we were
(potentially) sending a configure acknowledgment while not applying
the configure due to deferred rendering.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-04 14:12:06 -05:00
Chris Michael 3201d67183 ecore-wl2: Fix maximized & fullscreen functions to use window flag
Rather than rely on window->type for maximized & fullscreen, use the
cooresponding window flag

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:01 -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 de08c10253 ecore-wl2: Add missing EINA_UNUSED for function parameters
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael 93afb3ed07 ecore-wl2: Add function to get a windows rotation
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael 9aaada21c3 ecore-wl2: Fix issue of not unsetting move mouse pointer
Summary: When we finish moving a window, previously the mouse cursor
would never get unset from the hand cursor. This is due to the way
that grabs work in wayland, and not ever getting an event notification
for the move being completed. This patch works around that issue

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael 31dac90f9d ecore-wl2: Fix maximized and fullscreen functions to restore geometry
Previously, when we maximized or fullscreen a window, we were sending
the improper geometry to the window_configure callback

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael 482668451d ecore-wl2: Add safety trap for null compositor
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael 8f338af511 ecore-wl2: Remove all code relating to custom window animators
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael 02afb0dc28 ecore-wl2: Rename anim_listener to avoid confusion with ecore_wayland
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 652fa87169 ecore-wl2: Remove duplicate window_find API function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 055b398e8d ecore-wl2: Implement ecore_animators for windows instead of using a
custom animator

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 434fbd6fb9 ecore-wl2: Start on preliminary subsurface support
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael d22b6c581c ecore-wl2: Add support for input region setting for an Ecore_Wl2_Window
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 8df60cef9e ecore-wl2: Check if a window is transparent or alpha when setting
opaque region

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael a4b28e0375 ecore-wl2: Send window configure event when we un-maximize/fullscreen
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 84a01216e7 ecore-wl2: Provide internal function to stop any cursor update timers
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael bb0f3ab62a ecore-wl2: Create new event type for window configure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 4bd535e3a1 ecore-wl2: Remove window animator callback when we free a window
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 70867d9dc7 ecore-wl2: Remove test for no-op move/resize
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 2f57854e8b ecore-wl2: Reduce noise of ERR messages which are not that important
when trying to set pointer cursor images

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael ccb8061841 ecore-wl2: Add API function to return the Ecore_Wl2_Input from a given
window

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00