Commit Graph

349 Commits

Author SHA1 Message Date
Mike Blumenkrantz 45aba1343e ecore-wl should maybe clear its repeat timer for keyboard on window free 2015-02-01 18:32:04 -05:00
Chris Michael c6e70107dc ecore-wayland: Don't send a mouse_up on grab release unless we
actually have a grabbed button

Summary: If we don't have an actual grabbed mouse button, then don't
send a mouse up event. Caught this while adding e_grabinput support to
Enlightenment.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-23 16:01:08 -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 6b1e62afa4 ecore-wayland: Fix issue with Elementary DnD test not releasing mouse
Summary: When we do an input_ungrab, we should be sending a mouse up
event so that apps/elm/etc know that the mouse has been released. This
fixes an issue in the Elm Features DnD test report by Daniel Zaoui

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-13 11:37:02 -05:00
Chris Michael 70f0bc47ed ecore-wayland: Don't set move cursor unless we actually start a drag
Summary: We should not be setting a 'move' cursor unless we actually
make the call to start a drag

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-13 11:23:27 -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
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
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 9be84a1ce7 ecore-wayland: Check if system has mouse in ecore_wl_input
Summary:
Added a condition to check if system has mouse before setting
the cursor on surface.

@fix

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1707
2014-12-01 10:00:26 -05:00
MinJeong Kim 2eae14651c ecore-wayland: Fixed a request of start_drag with null value
Summary:
Fixed a request of start_drag with null value.
The request with null value has caused SIGABRT and printed
"error marshalling arguments for start_drag (signature ?oo?ou):
null value passed for arg 1".

@fix

Test Plan:
1. Run enlightenment(wayland)
2. Run elementary_test -to FeatureDnd on enlightenment
3. Click any image and try to drag it.
(Without this revision, SIGABRT will occur
 and with this revision, will not.)

Reviewers: gwanglim, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1720
2014-12-01 09:58:39 -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
Stefan Schmidt 3f0e3d1804 ecore-wayland: Add since tag to new ecore_wl_window_xdg_surface_get() function 2014-10-24 14:43:27 +02: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 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 d7f1b277dc ecore-wayland: Add minimized field to window structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -04:00
Chris Michael 45e4ef504e ecore-wayland: Add API functions to iconify an Ecore_Wl_Window
These API functions will be called from ecore_evas to iconify an
Ecore_Wl_Window. This is implemented in the xdg_shell protocol

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-01 16:15:37 -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 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 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 16d13b9a74 ecore-wayland: Fix formatting
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 d8d7a95c94 Added support for xdg-shell protocol in ecore-wayland.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D1328
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 96f53fc69d ecore_wayland: Added cursor_name to Ecore_Wl_Window.
Summary:
Added cursor_name to Ecore_Wl_Window so that we can compare with input cursor name and avoid unnecessary cursor set calls to wayland.

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1481
2014-09-26 08:02:25 -04:00
vivek 59710fadbd Ecore_Wayland: Raise a event when data source target accepts events
Summary:
   1) Added data source target struct for target event
   2) Raise a event when data source target accepts pointer focus or
      motion events

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1466
2014-09-19 09:04:49 -04:00
vivek 0e9a691d62 Ecore_Wayland: Raise a event when data source cancelled
Summary:
  1) Created a event struct for data source cancel event
  2) Raise a event when data source is cancelled

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1465
2014-09-19 08:42:49 -04:00
Chris Michael 026b1e9dc5 ecore-wayland: Don't crash if we have no shm interface yet when
setting cursor theme

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-18 11:57:24 -04:00
Chris Michael eefabe1abe ecore-wayland: Allow setting input->cursor_size even if we don't have
the shm interface yet

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-18 11:56:41 -04:00
Mike Blumenkrantz 9a218f4f20 ecore-wayland should not cause crashes when setting cursor size if display shm is not yet acquired
crash added in c01c8456fe
2014-09-18 11:49:36 -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
Chris Michael d645ea28c6 ecore-wayland: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-17 09:14:39 -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 7db6f1c198 ecore-wayland: Move external variable below structure
This commit moves the typedef struct to just above the structure, and
moves the external variable below the structure definition. No real
functional changes, just some cleanup.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-17 08:05:42 -04:00
Srivardhan Hebbar eff3c8000b ecore-wayland: Moving Ecore_Wl_Display to private.
Summary:
Moving "typedef _Ecore_Wl_Display Ecore_Wl_Display" from Ecore_Wayland.h to ecore_wl_private.h.

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1451
2014-09-17 08:04:40 -04:00
Daniel Zaoui 067753eb2e Ecore/Wayland: fix memory issue on exit.
When the application exits, an event cancels the DnD, that invokes the
Wayland release of data source but this was not setting an internal
pointer to NULL. ecore_wl_shutdown was then trying to use the same
Wayland API on the non-set internal pointer (via _ecore_wl_input_del),
that was leading to a segmentation fault.
This bug never occurred because some bug in Copy&Paste was preventing it
to reach this part of code.
2014-09-08 16:31:30 +03: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 1058cffc0d ecore-wayland: Remove need for function prototypes
If we declare/define these functions Before they are needed in the
listener, then we can remove the need for using function prototypes.

@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 b0fd93a564 Revert "ecore-wayland: Fix formatting"
This reverts commit e14f40a46d.
2014-08-13 10:34:49 -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 75c166cd1d Revert "Added support for xdg-shell protocol in ecore-wayland."
This reverts commit e591dff56d.

Revert this. Should not have been pushed yet. Sorry Stefan !! :)
2014-08-13 10:29:58 -04:00
Srivardhan Hebbar e591dff56d Added support for xdg-shell protocol in ecore-wayland.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D1328
2014-08-13 09:41:27 -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 e14f40a46d ecore-wayland: Fix formatting
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
MinJeong Kim 61847abae1 ecore-wayland: Do not destroy data_source for selection on client side
Summary:
Wayland client doesn't need to destroy previous data_source when client requests for selection_set,
because there is "cancelled" event by wayland server to notify clients that the data_source is not used more and has to be destroyed.
Before receiving the "cancelled" event, client cannot recognize that it is useless or not.
Even if the client wants to create new data_source, wayland server can choose previous data_source rather than new one.

Test Plan:
1. Launch weston
2. Launch "elementary_test -to entry5" on weston
3. Try to copy & paste

Reviewers: devilhorns

CC: cedric, gwanglim

Differential Revision: https://phab.enlightenment.org/D1152
2014-07-09 09:06:58 -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 44b3cd1564 ecore-wl: Check for existance of data device manager
@fix: Don't segfault if the running compositor never creates a data
device manager.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-15 10:41:54 +01:00
Chris Michael 6699d427c1 ecore-wl: Don't create an input cursor surface unless the input has pointer capability.
@fix: There is no use for an input cursor surface if the seat does not
have the pointer ability (for kiosk cases, or touch-only cases where
a pointer is not created).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-15 10:41:54 +01:00
Chris Michael f0e90d25e3 ecore-wl: Optimize setting of window input region
@bugfix: Store the input region into the window structure, and don't
re-add a duplicate input region (done by comparison of saved region).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-09 09:56:31 +01:00
Chris Michael dba35d942d ecore-wl: Store window input region into structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-09 09:56:31 +01:00
Chris Michael da59ad61f2 ecore-wl: Optimize opaque region setting for surface and reduce
unnecessary calls to surface commit.

@bugfix: We don't need to call surface_commit if we are just setting
the opaque (or input) region(s). This reduces some overhead on the
compositor side (and thus reduces useless redraws). Also, optimize
opaque_region_set to not Reset to the same region; we do this by
storing the opaque region into the window structure, and on calls to
opaque_region_set we can compare those values and not re-apply the
same opaque region.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-09 09:56:31 +01:00
Chris Michael c5c378f5f9 ecore-wayland: No need to check button state twice
Since we already check the button pressed state in the 'if' above
this, there is no need to check it again.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-01 07:09:49 +01: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
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Rafael Antognolli cc4aedaaee ecore/wayland: Use touch_focus for touch_based events.
Also call the mouse related events with BTN_LEFT instead of 0, otherwise
the correct button won't be assigned to the event (button 1).
2013-11-29 18:05:42 -02:00
Rafael Antognolli a14ee372e0 ecore/wayland: Send a mouse up event when the implicit grab starts.
The previous workaround used to send a mouse up event to the
application, using the pointer enter callback to determine when an
implicit grab has finished. This was "simulating" a mouse up event when
the surface move or resize finished.

However, this doesn't work for touch-based move. The pointer enter isn't
emitted, because the wl_touch interface doesn't have the concept of a
pointer.

Changing this code to make it more similar to what Weston's toytoolkit
does, the mouse up event is sent as soon as the move or resize grab
starts. After that, the compositor takes care of the move/resize almost
entirely.

Should fix T468.
2013-11-29 18:05:19 -02:00
Rafael Antognolli 2c95c5ee1d ecore/wayland: Get the touch up event position from the down_info.
down_info is a struct that stores some information about the current
pressed touch events. It should be used for that specific touch point,
instead of the generic input info, when sending a mouse_up event.
2013-11-29 18:05:06 -02:00
Rafael Antognolli b92fc57c5a ecore/wayland: Remove list of touch points from input structure.
We already have the "Ecore_Wl_Mouse_Down_Info" list, that contains this
information.
2013-11-29 18:05:06 -02:00
Chris Michael 445f2eb206 Fix keyrepeat going crazy ;)
Previously, if you were hold down shift for 1-2 seconds and then press
a key, you would get superfluous key repeats (even tho you released
the printable key). This was because the "key repeat" code was not
checking for the same key before (re)starting the repeat timer.

This fixes the repeating key issue by checking if the key pressed is
different than the one already pressed. If so, it will (re)start the
timer. If it is not different, then the timer is already running and
we don't need to do anything.

Fixes T552

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-25 07:47:52 +00:00
Chris Michael 55c0dbb3c8 Fix ecore wayland key events to fill in Ecore_Event_Key with X11-like
values.

Previously, the keyname and key fields of the Ecore_Event_Key
structure were being filled in with the capitalized version of the
key. This is due to xkb_keysym_get_name always returning keys with the
modifier applied. There is no actual function in xkbcommon to Not do
this :/ so we have to manually check if Shift is pressed, and if so
then we need to convert the key to lowercase.

Fixes T550

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-25 07:38:00 +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
Chris Michael 0a32212a79 Add support for storing mulitple touch points.
Send events to properly focused surface.
Fill in missing parts of the event structures (ev->root, ev->multi).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-19 10:38:23 +00:00
Chris Michael e1dc4579fd Add list of touch points to input structure, and a pointer to the
"touch" focused surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-19 10:38:23 +00:00
Chris Michael 125576d6a1 Remove unused variable
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-19 10:38:23 +00:00
Chris Michael d96339e9bb Don't send pointer_enter events on touch_down.
Fix touch_down and touch_up to send proper button ID (ecore_x sends 0).

Fixes Phab Ticket T468

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-18 12:58:54 +00:00
Chris Michael 0800b2ec1e Partial revert of eb84475503
Actually, we don't need to free this data here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-18 08:04:07 +00:00
Chris Michael eb84475503 Check for valid drag type before trying to strdup.
When deleting the drag, free any dupped strings.

Hopefully this fixes Phab Ticket T471. Don't know for sure as I cannot
reproduce the crash here :/

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-18 07:56:13 +00:00
Chris Michael e8aa7087eb Check for valid shell_surface, title, and class before trying to set
them else wayland segfaults (internal wayland code does no safety
checks). Also, Fix some formatting while I am here...

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-14 12:44:10 +00:00
Chris Michael b3e309d04f Fix getting the clipboard selection and add missing LOGFN macros
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-07 14:31:37 +00:00
Chris Michael 9240c2e91c Add support for additional keyboard modifiers. Fix handling of Shift
key for capitals.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-07 14:31:37 +00:00
Chris Michael 5bde301efa Add some additional keyboard masks
This adds support for Windows logo, caps lock, num lock, scroll lock
and AltGr as keyboard modifiers

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-07 14:31:37 +00: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 fdf6828b7e ecore/wayland: Move Ecore_Wl_Output to a private header.
This is just not being used outside of ecore_wayland library, so just
move it and nothing breaks.
2013-11-04 11:06:49 -02:00
Carsten Haitzler 298f4af7fa ecore-wl - add ecore_wl_window_surface_id_get so we can unbreak elm 2013-11-02 11:44:15 +09:00
Rafael Antognolli fe8058cf77 ecore/wayland: Finally move Ecore_Wayland internals to private header. 2013-11-01 15:55:39 -02:00
Rafael Antognolli b77ac9b57e ecore/wayland: Add ecore_wl_window_keyboard_get().
Instead of use direct access to the Ecore_Wl_Window structure, just use
the getter, so we can hide the internals.
2013-11-01 15:51:38 -02:00
Rafael Antognolli 8b852ad21e ecore/wayland: Set win->resizing flag inside ecore_wl_resize(). 2013-11-01 15:51:14 -02:00
Rafael Antognolli 6aa11cf89d ecore/wayland: Set win->moving from inside ecore_wayland.
We can set it from the ecore_wl_window_move() function, instead of
directly changing the attribute.
2013-11-01 15:07:53 -02: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
Rafael Antognolli 1c33a1a57b ecore/wayland: Add title_set and class_name_set APIs.
These two APIs will save the title and class_name inside
Ecore_Wl_Window, so if they are called before the shell surface is
created, the stored names will be used later when the window is finally
shown (shell surface is created).

This way we are also hiding the shell surface from ecore_evas modules.
2013-11-01 15:07:48 -02:00
Rafael Antognolli 277a5915c1 ecore/wayland: Remove attributes that are not used anymore.
Some attributes might have been useful in the past, but not anymore.
Just remove since they are not been used anywhere.
2013-11-01 10:30:29 -02:00
Rafael Antognolli 1deb107d56 ecore/wayland: Do not store "edges" in Ecore_Wl_Window.
This is a configure event info, so put it in the right place. Some
places adding edges info were also removed, which means that they were
redundant.

Tested with <Meta> + middle click resize, and with window border resize,
on all the edges. Apparently, nothing breaks.
2013-10-31 21:35:13 -02:00
Rafael Antognolli dd18206d86 ecore/wayland: Do not use win->id directly.
Use a getter for it instead, so we don't need to expose the
Ecore_Wl_Window struct just because of it.
2013-10-31 21:35:13 -02:00
Rafael Antognolli e56428f4ad ecore/wayland: Make Ecore_Wl_Input private.
It's mostly only used inside ecore_wayland library anyway.

The only bit needed outside of the library is the "seat" pointer, but a
new function was added to retrieve such pointer from Ecore_Wl_Input.
2013-10-31 21:35:13 -02:00
Rafael Antognolli 35d2f195de ecore/wayland: Hide Ecore_Wl_Display.
This struct is only used inside ecore_wayland itself, so there's no real
reason to expose it. Apparently, hiding it doesn't break anything,
except for the ecore_imf wayland module, which was easily fixed.

If anyone notices a breakage, please let me know.
2013-10-31 21:35:13 -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
Chris Michael d1d0090706 Don't send mouse_up or mouse_down events unless we have a focused
surface

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-10-29 08:05:32 +00: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
Rafael Antognolli c4f1e67686 ecore/wayland: Do not generate subsurface source files.
Add them to the tree, so they don't need to be generated again on each
build. Also remove the autofoo code used for generating them.
2013-10-11 14:26:34 -03: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
Rafael Antognolli f26f2da5ea adding wayland subsurfaces protocol file. 2013-10-10 13:21:40 -03:00
discomfitor 80bcfac650 also unbreak ecore-wl header with previous reverts... 2013-10-05 16:38:55 +01:00
discomfitor 8f493ab6c5 Revert "ecore/wayland: Add subsurface handling APIs."
This reverts commit 65b960f4a6.

Conflicts:
	src/lib/ecore_wayland/ecore_wl.c
2013-10-05 16:26:24 +01:00
discomfitor f66eceed10 Revert "ecore/wayland: Add and initialize subcompositor inside Ecore_Wayland."
This reverts commit 7994b62c6b.
2013-10-05 16:23:38 +01:00
discomfitor 06a5ba2118 Revert "adding wayland subsurfaces protocol file."
This reverts commit ad27efcb39.
2013-10-05 16:22:15 +01:00
Rafael Antognolli 65b960f4a6 ecore/wayland: Add subsurface handling APIs. 2013-10-04 18:23:58 -03:00
Rafael Antognolli 7994b62c6b ecore/wayland: Add and initialize subcompositor inside Ecore_Wayland. 2013-10-04 18:23:58 -03:00
Rafael Antognolli ad27efcb39 adding wayland subsurfaces protocol file. 2013-10-04 18:23:57 -03:00
Chris Michael eeb6f1e59f Do not call actual wl_surface_commit unless we have a buffer attached.
NB: Fixes zmike multi-client problem

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-24 11:34:10 +01:00
Chris Michael deedad61b9 Add structure member to mark if window has an actual buffer
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-24 11:34:10 +01:00
Chris Michael 43fda7c835 Add API functions for window_rotation set/get and Fix Protruding surfaces on rotated, opaque windows
Phab Ticket T359
https://phab.enlightenment.org/T359

NB: When setting the window opaque region, take into account any
existing window rotation, and set opaque region accordingly.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-17 07:41:08 +01:00
Chris Michael 677fdbf81c Update doxy for opaque_region_set function.
Add 'rotation' field to Ecore_Wl_Window structure.
Add API functions to get/set window rotation.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-17 07:41:08 +01:00
Chris Michael 0c88d8e8ce Revert "Reduce additional call to eina_stringshare_replace."
This reverts commit f4f44c777a.
2013-09-13 07:01:06 +01:00
Chris Michael 0d0944c4cc Reduce unnecessary pointer frame callbacks
NB: We only need to do pointer frame callbacks if the pointer is using
an animated image.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-12 15:02:34 +01:00
Chris Michael f4f44c777a Reduce additional call to eina_stringshare_replace.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-12 15:02:34 +01:00
Chris Michael bd4d6cb6cc Also reset opaque region is transparent is toggled.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-11 14:13:53 +01:00
Chris Michael dc01222858 Add back saving of opaque region into window structure.
NB: Needed so that we can reset the opaque region if alpha_set is
being toggled on/off all the time.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-11 14:10:27 +01:00
Chris Michael 164299e689 Rework keyboard repeat to use an ecore_timer (not a timerfd).
NB: This fixes keyboard repeat in terminology (under wayland) to be
sane again :)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-10 15:59:40 +01:00
Chris Michael 369f414726 Remove calls to update_size function in alpha_set and transparent_set.
In alpha_set & transparent_set, add call to set opaque region to NULL
if alpha or transparent.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-10 14:37:17 +01:00
Chris Michael 6ab1bd2f71 Set surface opaque region to NULL if window is transparent/alpha.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-04 14:24:04 +01:00
Chris Michael cf7c9b9d6b Added functions for setting input and opaque regions on a window.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 09:25:58 +01:00
Chris Michael 6a228b5b7f Add API functions for setting window input & opaque regions.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 09:25:34 +01:00
Chris Michael 8d3caa1dba Remove 2 unused integer members from window structure.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 09:06:54 +01:00