Commit Graph

83 Commits

Author SHA1 Message Date
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 37c2451b5f ecore-wl cursor setup no longer triggers errors on startup
@fix T2202
2015-03-12 15:56:34 -04:00
Mike Blumenkrantz 5ff4539333 ecore-wl now prints an error when the socket dies 2015-03-12 14:34:01 -04:00
Philippe Coval 17dbfd3ec7 ecore-wayland: make possible to disable xdg-shell at runtime
Summary:
Since xdg-shell is not yet supported officialy by wayland
It makes sense to have it disabled by default
and enable it on purpose.

Using env variable : EFL_WAYLAND_DONT_USE_XDG_SHELL
(name is inspired from Qt implementation of xdg-shell
but in the opposite way)

There is no EFL_WAYLAND_USE_XDG_SHELL in efl,
please use EFL_WAYLAND_DONT_USE_XDG_SHELL instead.

By default xdg-shell is enabled since it's supported by efl

Since there is only one shell supported at runtime
it's easier to switch to wl-shell (wayland's fallback shell)
by change this env variable.

Note, this patch can be reverted once xdg-shell replaces wl-shell
in wayland which is not the case in weston-1.6
but could integrated into upcoming wayland-1.7
(to be confirmed on release)

Change-Id: Id3732492397df9abe4a7c9e6e92a8f2c993c8395
Bug: https://phab.enlightenment.org/T1901
Bug-Tizen: TC-1353/part
Forwarded: https://phab.enlightenment.org/T1901
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>

Tizen Test Plan: echo 'export EFL_WAYLAND_DONT_USE_XDG_SHELL=defined' > /etc/profile.d/ecore.sh

Reviewers: seoz, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1734
2014-12-05 14:08:02 -05:00
Srivardhan Hebbar 8004a794b1 ecore_wayland: Making _ecore_wl_shutdown return int instead of EINA_BOOL.
Summary:
_ecore_wl_shutdown should return int instead of EINA_BOOL. So changing the function prototype.

@fix

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1574
2014-10-23 10:41:06 -04:00
Chris Michael f2bcb7d50e ecore-wayland: Add error message for calling shutdown without calling
init

Summary: If someone calls ecore_wayland_shutdown without first calling
ecore_wl_init, then the init count is wrong. Warn the caller.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-23 10:33:40 -04:00
Srivardhan Hebbar 005cdf359d ecore_wayland: Making _ecore_wl_init_count not to go below zero in shutdown.
Summary:
If _ecore_wl_init_count goes below zero, then there would be problem if someone calls ecore_wl_shutdown 1st and then ecore_wl_init later. So fixing this issue in ecore_wl_shutdown.

@fix

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1571
2014-10-23 09:02:47 -04:00
Chris Michael fc4b1982cc ecore-wayland: We should be dispatching pending events After we flush
clients

Summary: When flush_clients is called, those clients may add events to
the queue. We should be waiting to dispatch pending events until After
clients have been flushed.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-20 10:14:35 -04:00
Chris Michael bd5852be29 ecore-wayland: Bump xdg_shell version for pending release
Wayland 1.6 is due in 2 weeks. The existing xdg_shell code here will
not function with current wayland (from git) unless we bump the xdg
version number.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00
Chris Michael 795e260442 ecore-wayland: Check for valid shell before sending bound event
We could have either wl_shell OR xdg_shell, so check if we have either
one before dispatching the interfaces_bound event.

@fix

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
Chris Michael 65bd5f91ee ecore-wayland: Check return of calloc
Calloc 'can' fail so lets check the return and make sure 'global' is
valid else we will segfault.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00
Chris Michael c656332d48 ecore-wayland: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00
Chris Michael 9787c89935 Added support for xdg-shell protocol in ecore-wayland
Summary: Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1326
2014-10-01 16:15:37 -04:00
Srivardhan Hebbar 7fd450e690 ecore_wayland: Added goto in ecore_init for exit to reduce repetition of code.
Summary:
Instead of repeating the clean-up code if any initialization fails in the init function, I've moved those to one location and added goto.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1461
2014-09-18 11:03:26 -04:00
Srivardhan Hebbar 50a0195f7e ecore_wayland: Added cursor_theme_name in Ecore_Wl_input.
Summary:
1. Added cursor_theme_name to Ecore_Wl_Input struct.
2. Made it configurable through environment variable ECORE_WL_INPUT_CURSOR_THEME_NAME.
3. Added a API ecore_wl_cursor_theme_name_set for user to set manually.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1458
2014-09-18 10:52:29 -04:00
Chris Michael e1da3db8fa ecore-wayland; Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-17 09:17:03 -04:00
Srivardhan Hebbar c01c8456fe ecore_wayland: Added cursor_size in Ecore_Wl_Input.
Summary:
1. Added cursor_size to Ecore_Wl_Input struct.
2. Made it configurable through environment variable ECORE_WL_INPUT_CURSOR_SIZE.
3. Added a API ecore_wl_input_cursor_size_set for user to set manually.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

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

Conflicts:
	src/lib/ecore_wayland/ecore_wl_private.h
2014-09-17 09:12:58 -04:00
Chris Michael 1cd3fbbd95 ecore-wayland: Fix ecore_wl_screen_size_get function to handle more
than one output.

ecore_wl_screen_size_get function Should take into account all
existing outputs. Modify code to loop outputs and add up the sizes.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 11:11:21 -04:00
Chris Michael 4def4e751e ecore-wayland: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 11:11:14 -04:00
Carsten Haitzler da13577897 wcore-wayland - fix screen size get
based on https://review.tizen.org/gerrit/#/c/26077/ - but with
comments, formatting changes and so on.
2014-08-26 19:39:39 +09:00
Chris Michael 50287ab731 ecore-wayland: Implement ivi-shell support for Ecore_Wayland
IVI-Shell is a wayland shell implementation for in-vehicle infotainment.

Summary: This is a set of patches proposed to implement IVI-Shell (https://phab.enlightenment.org/T1552).

Reviewers: ntanibata, devilhorns

Subscribers: mbachmann

Projects: #efl

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

@feature
2014-08-25 09:04:38 -04:00
Chris Michael e97af447ef Revert "Added support for xdg-shell protocol in ecore-wayland"
This reverts commit 2f4db577b5.
2014-08-13 10:35:00 -04:00
Chris Michael f041344f9d Revert "ecore-wayland: Fix formatting"
This reverts commit ff29972703.
2014-08-13 10:34:57 -04:00
Chris Michael 85aaa363ab Revert "ecore-wayland: Calloc Can fail, so check that it works (or return if"
This reverts commit a49835a8d1.
2014-08-13 10:34:55 -04:00
Chris Michael 3291d32bf9 Revert "ecore-wayland: Add missing EINA_UNUSED for unused function paramater"
This reverts commit 67766929ca.

Revert all the xdg_shell changes. Should not have been pushed due to
new API function.
2014-08-13 10:34:28 -04:00
Chris Michael 67766929ca ecore-wayland: Add missing EINA_UNUSED for unused function paramater
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-13 09:41:27 -04:00
Chris Michael a49835a8d1 ecore-wayland: Calloc Can fail, so check that it works (or return if
not).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-13 09:41:27 -04:00
Chris Michael ff29972703 ecore-wayland: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-13 09:41:27 -04:00
vivek 2f4db577b5 Added support for xdg-shell protocol in ecore-wayland
Summary: Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1326
2014-08-13 09:41:26 -04:00
Stefan Schmidt d9ea423b91 ecore_wl: Actually watch out for ECORE_FD_ERROR 2014-04-17 17:01:45 +02:00
Stefan Schmidt 08bad99597 wcore_wl: Handle errors on wayland display fd
Cancel the callback if we receive an error on the wayland display
file descriptor.
2014-04-17 16:57:53 +02:00
Stefan Schmidt 2029ffc1ad ecore_wl: Add FD_WRITE flag to handler as we monitor read and write
The _ecore_wl_cb_handle_data callback only has the flag for ECORE_FD_READ
set while the callback funtion also monitors and acts on writes. I wonder
if and how that worked before.
2014-04-17 16:57:53 +02:00
Chris Michael c3ca3f07bc ecore-wayland: Fix ecore_wl_init 'stalling' when used in a server
@fix: If we are using the ecore_wl library in a "server", we cannot
sit and 'sync' during the init process as that just leaves the server
in a stalled state waiting for ecore_wl_init to complete (which never
does because the server has not finished it's work).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-18 09:12:57 +00:00
U. Artie Eoff cfb121c8f8 ecore-wayland: test for subsurface protocol in wayland core
The subsurface protocol was moved into Wayland Core
around v1.3.90 (i.e. v1.4.0).

Test if subsurface protocol is part of wayland-client.h.
If not, we include our own copy of the protocol header.

Also, some whitespace cleanup in ecore_wl.c.

Tested with Wayland 1.3.0 and 1.3.90 (master:360dca5).

Fixes T529

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2013-11-22 05:09:53 -08:00
Rafael Antognolli b5e6855266 ecore/wayland: Use eina_inlist instead of wl_list for inputs too. 2013-11-04 14:24:59 -02:00
Rafael Antognolli d1a9314cdd ecore/wayland: Use eina_inlist instead of wl_list for outputs too. 2013-11-04 14:18:39 -02:00
Rafael Antognolli 18ef47c173 ecore/wayland: Use eina_inlist instead of wl_list for globals.
Since we are allocating this list and returning it, let's make it more
EFL-like.
2013-11-04 13:50:04 -02:00
Rafael Antognolli 047e3bf113 ecore/wayland: Using underscore on private functions. 2013-10-29 19:32:00 -02:00
Rafael Antognolli cb0f6171a8 ecore/wayland: Oops, initialize member of malloc'ed struct. 2013-10-29 19:14:59 -02:00
Rafael Antognolli 06d6bf0dba ecore/wayland: Add some getters.
This centralizes the place where we have to wait for the init to have
finished before first using the compositor. It's also part of the later
step of hiding Ecore_Wl_* private structs.
2013-10-29 19:14:22 -02:00
Rafael Antognolli ccdeae7ce4 ecore/wayland: Use sync callback to report end of ecore_wl_init().
At the end of the ecore_wl_init() function, send a sync request to the
server, and add a callback listener to the "done" event. When this event
is received, we are sure that all the registry bind requests done so
far were processed already, and that the registry and globals are
available and can be used.

Now, on the functions that request interfaces or registry, we call
_ecore_wl_init_wait(), which will check if the callback was received
already (that means that all requests inside the init were processed).
If it was not yet, then we wait until receiving that callback, before
returning the requested data.
2013-10-28 14:47:33 -02:00
Rafael Antognolli 3aca95bb22 ecore/wayland: Add info about other bound interfaces.
Add output, seat, data_device_manager and subcompositor as possible
bound interfaces, on the ECORE_WL_EVENT_INTERFACES_BOUND event info.
2013-10-28 14:47:32 -02:00
Rafael Antognolli ad731e8b21 Revert "change init done bindings."
This reverts commit b87afd1b94.

Wrong branch, wrong commit.
2013-10-28 14:46:40 -02:00
Rafael Antognolli b87afd1b94 change init done bindings. 2013-10-28 14:07:25 -02:00
Stefan Schmidt ab0f7ca625 Revert "Revert "Revert "eina: use Eina_Spinlock for Eina_Chained_Mempool."""
Is there a title for the commiter with the longest revert of a revert list?

I screwed this one up. Had other local changes that sneaked in.
Resetting and doing it right now.

This reverts commit ee155b771d.
2013-10-11 09:41:22 +01:00
Stefan Schmidt ee155b771d Revert "Revert "eina: use Eina_Spinlock for Eina_Chained_Mempool.""
You can bet on reverting makes people speed up the process in fixing it.
Revert the revert here now that Cedric fixed it in eina.

This reverts commit 875e7cf74d.
2013-10-11 09:36:35 +01:00
Rafael Antognolli f2d1a21147 ecore/wayland: Add subsurface handling APIs. 2013-10-10 13:24:22 -03:00
Rafael Antognolli 1cef77bfd7 ecore/wayland: Add and initialize subcompositor inside Ecore_Wayland. 2013-10-10 13:24:22 -03:00