Commit Graph

349 Commits

Author SHA1 Message Date
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
Stefan Schmidt 54695313dd ecore_wayland: bind and destroy session_recovery interface correctly.
This was missing from the initial session recovery support patches. Bind
the interface so we can actually work with it on the client side and destroy
it at the end.

@fix
2015-08-26 15:58:27 +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
Mike Blumenkrantz b84085ca8c ecore-wl: do not nul terminate drops
the application can do this based on mime types. we should not be
nul terminating incremental drop data

@fix
2015-08-13 15:48:03 -04:00
Chris Michael 667d7b15c9 ecore-wl: Support wl_keyboard_send_repeat_info for adjusting keyboard repeat rate and delay
Summary: This adds support for allowing a client/compositor to adjust
the keyboard repeat rate and delay via a call to
wl_keyboard_send_repeat_info.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-08-04 09:28:01 -04:00
Chris Michael a1bac6be1b ecore-wl: Reset input keyboard repeat values when we cancel the timer
Summary: If we end up cancelling the keyboard repeat timer due to no
focused surface, we should also reset the input repeat values.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-14 14:33:41 -04:00
Chris Michael d8d671548a ecore-wl: Don't renew keyboard-repeat timer if we have no focused surface
Summary: During the keyboard repeat function, if we have no keyboard
focused window to send the key to, then we should cancel the repeat
timer.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-14 14:31:15 -04:00
Chris Michael 1fb5698f35 ecore-wl: Reset ecore_wl_input repeat values on keyboard leave
Summary: As we delete any keyboard repeat timers when we get a
keyboard leave event, we should also reset any stored values there
(key, sym, time, etc).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-14 14:28:14 -04:00
Chris Michael dca6f0756d ecore-wl: Reset input's pointer & keyboard focus on events
Summary: If we get pointer or keyboard leave events, then reset the
Ecore_Wl_Input's idea of focus (eg: set input->pointer_focus and
input->keyboard_focus fields to NULL) just in case we cannot find a
window for this surface.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-14 14:24:07 -04:00
Chris Michael 034c297566 ecore-wayland: Remove improper use of EINA_UNUSED
Summary: 'version' is actually used inside this function so no need
for EINA_UNUSED here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-08 11:48:41 -04:00
Mike Blumenkrantz d927c1623a ecore-wl: disable session recovery
this is guaranteed to crash in 100% of use cases.
2015-07-01 12:12:26 -04:00
Mike Blumenkrantz 121e7be4b6 Revert "ecore-input: add keysym to Ecore_Event_Key struct"
This reverts commit c3f3c4eba8.

this was audited and found to be impractical due to portability concerns
2015-06-29 13:18:01 -04:00
Stefan Schmidt 633747a05d ecore_wl: Hookup wl listener for uuid event from session recovery protocol
This should listen for events containing the assigned UUID from the compositor.
2015-06-29 17:10:06 +02:00
Stefan Schmidt cb449adde6 ecore_wl: Add generated session-recovery-protocol files to build
For now these are generated externally by wayland-scanner and added here.
Also keep the original xml protocol file here for now.

This covers the client side for applications while the server side code
sits with E as compositor.
2015-06-29 17:09:57 +02:00
Chris Michael 590b597e6e Revert "ecore-wayland: Update xdg shell protocol file"
This reverts commit 5793a62fc8.

Reverted due to wrong version being pushed
2015-06-25 15:14:56 -04:00
Chris Michael 5793a62fc8 ecore-wayland: Update xdg shell protocol file
Summary: This was a file that should have been updated with
the bump to xdg_shell version 5 however it was not pushed with that
update.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-25 15:11:31 -04:00
Chris Michael 5d48756227 ecore-wayland: Fix issue of events not getting dispatched properly
Summary: In order for wayland events to be processed properly, we
should be dispatching any pending events off of the queue First before
we make the call to flush.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-23 11:11:29 -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 8651f51add ecore-wl: Remove +x from ecore_wl_input.c
Summary: Unsure how this file mode got changed, but it should not be +x.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-21 09:24:36 -04:00
Mike Blumenkrantz c3f3c4eba8 ecore-input: add keysym to Ecore_Event_Key struct
currently only functional for x11, wl, drm

@feature
2015-05-20 14:50:46 -04:00
Chris Michael ae6ec06991 ecore-wl: Set keycode in event structure for key down/up
Summary: When we generate an Ecore key down/up event, we should also
be setting the keycode in the event structure

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-20 14:43:06 -04:00
Chris Michael d278cd5f49 ecore-wayland: Input grab_count is unsigned int, no need for comparison < 0
Summary: As input->grab_count is an unsigned int there is no need for
the < 0 comparison as that will always return false

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-12 09:14:26 -04:00
jhyuni.kang aee186b4f3 ecore-wayland: Add a grab_count variable for synchronization wl_input_grab/ungrab with pointer and touch event
Summary:
The touch screen device generates touch events.
         But in some special enviroments, a first finger will be matched to a pointer event(not touch event).
         And other fingers (second, third, ...) will be matched touch events.
         In that case ecore_wl_input_ungrab() is called abnormally.
         A first finger pressed, _ecore_wl_input_cb_pointer_button() call ecore_wl_input_grab().
         A second finger pressed, _ecore_wl_input_cb_touch_down() is called but not grab.
         But when a second finger is released, _ecore_wl_input_cb_touch_up() call ecore_wl_input_ungrab()
         So ungrab function generate two mouse up events and a first finger is released.
         In other case, first finger pressed -> second finger pressed -> first finger release.
         That case when a first finger released a second finger release event is generated.
         So after that application doesn't get a release event about a second finger
         when a second finger is really released.

         I think in a multitouch case, ungrab function will be called when a all finger are released.
         So I add a grab_count variable for count currently touched fingers.
         And only called a ungrab funtion all fingers are released.

Test Plan:
In a touch screen supported multitouch, press two or more fingers and release.
           And watch events generation.

Reviewers: raster, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2481
2015-05-12 08:57:47 -04:00
Boram Park 842969c231 ecore_wl: get dpi after all pending events are handled
Summary: ecore_wl_dpi_get will return the correct value after wl_output's events are handled

Reviewers: zmike, devilhorns, bryceharrington

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2479
2015-05-11 09:27:13 -04:00
jhyuni.kang 5c5f4580d2 Check a key repeat using xkb ruled keycode
Summary:
ecore_wayland get a key information using libxkbcommon's functions.
         Also generate key repeat check xkb keymap's information using xkb_keymap_key_repeats().
         But xkb rules reflect X broken keycodes, so offset by 8.
         In ecore_wayland backend, other xkb funtions using offset keycode
         but only use default keycode to check key repeat.
         So I fix it to use xkb ruled keycode.

Test Plan: Long press a key and watch repeated key events generate well

Reviewers: devilhorns, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2475
2015-05-07 09:24:54 -04:00
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02: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
Mike Blumenkrantz 1361775ddf ecore-wl: reject key events which do not correlate to a valid keysym 2015-04-27 12:57:35 -04:00
Jean-Philippe ANDRE 0ef41604e8 Ecore: Use calloc() to initialize Ecore_Event_Key fully
Some fields (eg. data) may not be properly initialized.
Use calloc() instead of malloc() will ensure proper initialization
even if we add more fields.

These fields (data) would even be passed down to Evas as
Evas_Event_Key_Down for instance.
2015-03-25 15:34:23 -07:00
Jean-Philippe ANDRE e8096d0291 Wayland: Fix compilation
Bad merge?
2015-03-21 12:13:28 +09:00
Bryce Harrington daf10dd2ba ecore_wayland: Check for nulls before wayland calls
Summary:
Wayland API routines by policy do not check input parameters for invalid
values.  In particular, many calls are wrappers through
wl_proxy_marshal, which derefs its first argument without a check.

So, for all wayland calls, always null check the first argument.

Reviewers: zmike, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2211
2015-03-20 22:07:27 -04:00
Bryce Harrington 931db7f12e ecore_wayland: Check for null inputs
Summary:
The other functions in this module check inputs; this one should as
well.

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2210
2015-03-20 22:07:21 -04:00
Bryce Harrington 69e827ef0c ecore_wayland: Add some comments
Summary: Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2209
2015-03-20 21:18:52 -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 c0bc1be83e ecore-wayland: Doublecheck input validity
Summary:
Most of the other ecore-wayland API will return NULL in the (hopefully
theoretical) case of bad inputs; this API routine should so similarly
for consistency.

Reviewers: zmike, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2181
2015-03-17 19:52:43 -04:00
Bryce Harrington 931ac66be1 ecore_wayland: Improve API docs
Summary:
For calls that return pointers, specify that NULL is a
potential return value.  Add API documentation for some misc. routines
missing it.

Reviewers: zmike, cedric, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2180
2015-03-17 19:23:48 -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 426382bc8b ecore-wl dnd target interface should accept a NULL mime_type
according to protocol, this indicates that the target does not support the drop type
2015-03-13 15:03:45 -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
Mike Blumenkrantz 0497094051 ecore-wl now allocates cursor_theme_name struct member of Ecore_Wl_Input
previous behavior would result in invalid memory access if the externally-passed
string were ever deallocated

@fix
2015-03-12 15:57:21 -04:00
Mike Blumenkrantz 877d35e361 ecore-wl use calloc for Ecore_Wl_Input allocation instead of malloc+memset 2015-03-12 15:56:46 -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
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
Chris Michael eedd6c3159 ecore-wayland: Don't send key repeat events for keys which should not
get them

Summary: Some keys in certain keyboard layouts should not be repeated
so add a test which uses xkb to inform us if this key supports
repeating.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-03 15:31:17 -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
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