Commit Graph

125 Commits

Author SHA1 Message Date
Stefan Schmidt 337939ef14 ecore_wayland: rename session recovery to align namespace
Align out extension naming with other unstable wayland protocols.
The unstable protocols from the wayland-protocols repo are prefixed
with a zwp additionally we keep a e prefix for now as we are still
developing this here. No functional change, just rename.

Pointed out by Derek that the session-recovery interface name is a
bit to generic here.
2015-12-18 14:51:04 +01:00
Stefan Schmidt 680eec5c5c ecore_wayland: add listener for uuid and provide already existing one
Setup a listener to receive an uid from the compositor. If we already have
one during creation, aka we are re-connecting to recover a session, we provide
it to the compositor so it can look our attributes up based on it. Again hidden
behind and env var to avoid problems with other developments, for now.

ref T2922
2015-12-16 22:18:08 +01:00
Stefan Schmidt d4d3f63653 ecore_wayland: store uuid received from compositor
If we get an uuid assigned from the compositor we will store them locally to
provide it later on if needed.

ref T2922
2015-12-16 22:18:08 +01:00
Stefan Schmidt 900fd5446f ecore_wayland: create session recovery listener only if env var is set
Same as for the global we make sure here we only add the listener if the,
for now, needed env var is set.

ref T2922
2015-12-16 22:18:08 +01:00
Chris Michael d29acc3613 ecore-wl: Remove setting window animator in server mode
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 518531ea00 ecore-wayland: Add support for using timer based animators if in
server mode

Summary: For E internal windows, we cannot use custom animator sources
due to Other animators using a timer-based solution. For this case,
when running in "server mode" for internal windows we will default to
a timer based animator solution.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael 2ebef8010e ecore-wayland: Reduce overhead for maximize/fullscreen set functions
This patch just gets the state flags directly from the window rather
than calling "get" functions to return the same parameter.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-18 12:56:12 -05:00
Chris Michael 4534c4aec3 ecore-wayland: Fix iconified functions for consistency
* sanitize bool params
* enforce window state flag setting
* correctly detect window state using window flag

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-18 12:54:00 -05:00
Chris Michael 35b4794c4a ecore-wayland: Add EINA_SAFETY checks to window functions
This adds EINA_SAFETY returns for all public facing ecore_wl_window
functions.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-18 12:19:17 -05:00
Mike Blumenkrantz ab3ab4feaa ecore-wayland: rewrite maximize/fullscreen set functions for consistency
* use safety macros for win struct param (should be the case for all fns here)
* sanitize bool params
* enforce window state flag setting
* correctly detect window state using window flag instead of type

@fix

ref T2841
2015-11-17 18:24:09 -05:00
Mike Blumenkrantz 3b480804fc ecore-wayland: return only the relevant state value for maximize/fullscreen
having window types for fullscreen/maximize is not defined by spec and leads
to state mismatches when toggling from api vs receiving events from the compositor

@fix
2015-11-17 18:23:07 -05:00
Chris Michael eacd4cc6f6 ecore-wayland: Make ecore_wl_window_maximized_get return proper values
This brings ecore_wl_window_maximized_get more inline with
ecore_wl_fullscreen_get function in that it will now check either the
window maximized state, or the window type, to determine if a window
is actually maximized

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-17 15:57:45 -05:00
Stefan Schmidt 6fa8452d48 ecore_wayland: fix build for ivi-shell.
During a rework this bit got missed and made the build fail if ivi-shell was
enabled. Thanks a lot to aerodynamik for bringing this to our attention and
even pointed out the fix.

Fixes T2798
2015-10-26 09:04:22 +01:00
Mike Blumenkrantz 265ad8b5d0 ecore-wayland: defer shell surface creation for windows if shell is not bound
in the case where a surface is created before the compositor binds its shell(s),
a shell surface would never be created

fixes case where internal windows would not create frames in enlightenment

@fix
2015-10-19 16:15:46 -04:00
Mike Blumenkrantz 5ad3c6358f Revert "ecore-wayland: Redo window animators to not use Custom source animators"
This reverts commit bd83d4c03a.

adding an animator (and then not managing its ticks) causes the animator
to fire constantly. in this case, it was causing 100% cpu usage and forcing a
compositor re-render for every frame regardless of damages
2015-10-16 15:55:40 -04:00
Chris Michael bd83d4c03a ecore-wayland: Redo window animators to not use Custom source animators
Summary: This moves window animators (for frame callbacks) to not use
a custom animator source but rather use a timer-based source. This
also moves animators to be per-window based (in that an animator is
created per-window).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-14 14:54:54 -04:00
Chris Michael 2f2bfec810 ecore-wl: Add missing EINA_UNUSED for unused function paramaters
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-13 15:14:12 -04:00
Chris Michael 6263fcc716 ecore-wl: Don't update window size during ecore_wl_window_resize
function

Summary: As we call ecore_wl_window_update_size from various places
when needed, don't call it inside the resize function. This addresses
an issue where sizes for the Ecore_Wl_Window may be out of sync

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-12 10:55:50 -04:00
Chris Michael 2a2a7e54b9 ecore-wayland: Comment out unused functions
Summary: As we do not listen for surface enter/leave events, we do not
need these functions so comment them out.

Thanks to Tom for the report :)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-09 08:55:26 -04:00
Stefan Schmidt 17e5b1c8f6 ecore_wayland: only add listener if recovery interface was binded correctly
In the case the bidn fails we could crash here by accessing it.
2015-08-27 16:21:06 +02:00
Stefan Schmidt 658a51b3ac ecore_wayland: add wayland session recovery listener
Register and wait for the uuid event issued by the compositor once a new
surface is created.
2015-08-26 16:04:49 +02:00
Chris Michael 65578034ef Add experimental implementation of custom animator ticks
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-08-20 14:21:02 -04:00
Chris Michael 13df35050c ecore-wayland: Fix T2466: Update xdg shell protocol code
Summary: This updates the xdg_shell protocol and code to support
XDG_SHELL version 5. This allows EFL/Elm apps to function again in
Weston.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-08 10:58:51 -04:00
Chris Michael f03cf3dba3 ecore-wayland: Fix issue of efl/elm apps not setting opaque & input regions
Summary: Since evas handles surface damage & surface commit roles now,
we no longer are calling ecore_wl_commit inside ecore_evas. This was
causing the surface opaque & input regions to no longer be set. We fix
that here by creating and setting opaque/input regions whenever the
appropriate ecore_wl region functions are called.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-27 13:20:59 -04:00
Bryce Harrington a2e301db71 ecore-wayland: Use calloc rather than malloc+memset
Summary:
In addition to being fewer lines of code,
malloc + memset to 0 is slower than calloc.  See
http://stackoverflow.com/questions/2688466/why-mallocmemset-is-slower-than-calloc

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: zmike, cedric, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2182
2015-03-17 20:30:32 -04:00
Bryce Harrington db91d16f78 ecore-wayland: Whitespace cleanup
Summary: Remove trailing whitespace, convert tabs to spaces as per style guide.

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2157
2015-03-13 21:43:08 -04:00
Mike Blumenkrantz 8927a33f64 ecore-wl xdg surface configure no longer requires special case for fs/max
the surface size comes directly from the compositor shell when applicable
2015-03-13 15:03:45 -04:00
Derek Foreman 8a2619dba0 ecore-wayland: don't resize the window on focus
Reviewers: devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2133
2015-03-10 15:43:19 -04:00
Mike Blumenkrantz daaca89790 ecore-wl windows now emit 0x0 configure sizes more reliably when fs/maximized 2015-03-04 16:46:39 -05:00
Mike Blumenkrantz 50da07d026 ecore-wl update window saved.size on any resize instead of just fs/maximize 2015-03-04 16:45:50 -05:00
Chris Michael be862c1d7f ecore-wl: Send xdg_surface_set_window_geometry when we update window
size/position

Summary: We should be implementing xdg_surface_set_window_geometry for
efl apps, so this commit adds the function call to that.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-02 12:25:27 -05:00
Mike Blumenkrantz f298183d4e ecore-wl fullscreen state is based on either window type or attribute
fixes fullscreen state detection when being set to fullscreen by the compositor

@fix
2015-02-26 22:30:44 -05:00
Mike Blumenkrantz 45aba1343e ecore-wl should maybe clear its repeat timer for keyboard on window free 2015-02-01 18:32:04 -05:00
Mike Blumenkrantz 30a2311879 ecore-wl needs to also set xdg props again on show
fix T1819
2015-01-20 19:11:25 -05:00
Chris Michael ade7482ee2 ecore-wayland: Don't crash if we have no input->cursor_name
Summary: If we are using a touchscreen, there will be no pointer and
thus no cursor_name to use. Trap for that case by checking if
input->cursor_name is valid.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-16 10:35:06 -05:00
Chris Michael 080b9e4730 ecore-wayland: Simplify opaque and input region handling.
Summary: We can make opaque and input region handling simplier if we
just use one opaque & input region per window. Previous code would
always create a new region, set it to the surface, then destroy it.
This code works much nicer in that it hammers the protocol with less
region create/destroy calls.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-07 14:50:00 -05:00
Chris Michael cf8801e6cf ecore-wayland: Check for xdg_surface before sending ack_configure
Summary: Calling wayland library functions with NULL typically leads
to an abort, so add a safety check for valid xdg_surface before
calling function

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-01 13:52:30 -05:00
Chris Michael c4e398bd4b ecore-wayland: Fix formatting
Summary: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-01 13:51:02 -05:00
Chris Michael 1d0bde0639 ecore-wayland: Add safety check for xdg_popup creation
Summary: xdg_shell_get_xdg_popup could return NULL, in which case any
calls below would cause an abort in the wayland libraries, so this
adds a trap for that.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-01 13:47:10 -05:00
Chris Michael 728833ed43 ecore-wayland: Add safety check for window surface creation
Summary: We cannot call wl_proxy_get_id if the surface creation failed
else that would lead to an abort in the wayland libraries. This commit
adds a safety check

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-01 13:45:23 -05:00
Chris Michael 5244ad1f8d ecore-wayland: No need for setting the input here as it's done again
directly below.

Summary: Not much of a functional change, just removing an extra
unnecessary line. Input is being set directly below this with an if
(!( line, so no point in this one.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-01 13:43:34 -05:00
Chris Michael 4f68955268 ecore-wayland: Check return of input_region create and get our safely
Summary: If wl_region_create fails, then we cannot call wl_region
functions on a NULL region. That causes the wayland libraries to
abort, so let's add a safety check so that we don't crash.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-01 13:15:15 -05:00
Chris Michael 000dbd0b96 ecore-wayland: If we fail to create a new opaque region, safely exit
the function.

Summary: If the compositor fails to create a new opaque region, then
we cannot call wl_region functions on a NULL region. This leads to an
abort in the wayland libraries, so let's trap the return of
wl_region_create and exit safely

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-01 13:13:34 -05:00
vivek 35beedd3d7 ecore-wayland: Fix the issue of UnIconifying an xdg_surface
Summary:
Fixed the issue of UnIconifying an xdg_surface which is
needed for Enlightenment IBox scenario.

@fix

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

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1593
2014-11-12 08:32:42 -05:00
Chris Michael a0a4257018 ecore-wayland: Add support for handling surface delete callback
Summary: This adds a private function to call when a surface gets
deleted so we can cleanup properly.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00
Chris Michael bbf196ad79 ecore-wayland: Cleanup shell surface creation
Summary:
  We had some duplication happening here when the IVI shell code got
added. This cleans up the surface creation code (parts of it were
being duplicated)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00
Chris Michael e78dcd3f4f ecore-wayland: Add/Implement code to handle iconifying a window
xdg_shell protocol provides functions to minimize a surface. This is
now implemented via ecore_wl_window_iconified_set.

NB: This Does Not work for wl_shell surfaces because wl_shell provides
no method to minimize.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00
Chris Michael 0655178b3b ecore-wayland: Add support for xdg_surface class name
xdg_shell supports setting a "class name" on a window by using
xdg_surface_set_app_id. This commit implements that.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00
Chris Michael 3c2f43194f ecore-wayland: Fix formatting and add a FIXME note
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00
Chris Michael ea7721026c ecore-wayland: Add missing EINA_UNUSED and fix it's usage in other
places

Some paramaters here were being used, while others were not. This
fixes the various usage of EINA_UNUSED here to be proper.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00