Commit Graph

570 Commits

Author SHA1 Message Date
Guilherme Iscaro 133b4fa65b Ecore Wl2: Add ecore_wl2_window_pointer_device_xy_get() API.
This commit adds a Wayland specific function to fetch a mouse
position.
2016-12-20 18:34:39 -02:00
Guilherme Iscaro 64986bccac Ecore Evas: Add API to set/get the pointer position per device.
Since Ecore Evas now support multiple mouse devices new APIs were
added in order to fetch the mouse position.
2016-12-20 18:34:39 -02:00
Chris Michael 2bc53c9013 ecore-evas-x: remove float comparison warning from X backend
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 08:54:01 -05:00
Chris Michael fa05393d02 ecore-evas-wayland: remove float comparison warning from wayland backend
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 08:53:16 -05:00
Cedric BAIL ae51b841d9 ecore_evas: remove float comparison warning from DRM backend. 2016-12-19 16:33:46 -08:00
Chris Michael dc43017906 ecore-evas-wayland: Remove unused includes
As most of the "hard work" has been moved into
ecore_evas_wayland_common file, these includes are no longer needed
here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Chris Michael d33e0d34e0 ecore-evas-wayland: Minor formatting fix
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Chris Michael f449fca9d6 ecore-evas-wayland: Set all evas engine info fields before updating
Small patch to set all fields of the Evas Engine Info structure before
calling evas_engine_info_set function

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Chris Michael 0ecaf00d97 ecore-evas-wayland: Use engine 'hidden' field for ecore_evas_hide operations
This patch allows us to set a 'hidden' flag in the Evas Engine
information structure instead of setting a NULL surface. Setting this
flag allows us to hide/show a canvas without having to
destroy/recreate a wl_surface every time.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Guilherme Iscaro ad1d160bb6 Ecore Input Evas: Add ecore_event_evas_seat_modifier_lock_update().
This function will set the modifiers/lock per seat in Evas.
Some places will still use ecore_event_evas_modifier_lock_update(),
since multi-seat is not supported.
2016-12-02 09:57:50 -02:00
Jean-Philippe Andre 348bd11609 ecore_evas/x: Fix window size when framespace != 0
This fixes the sizing of EDI. And elm_test "States 2"

The sizes stored in ecore_evas are the "window content" sizes,
excluding the framespace which thus must be added to all calls
to ecore_x / Xlib.
2016-12-02 17:21:47 +09:00
Guilherme Iscaro 75619fc290 Ecore Evas: Add multi seat support for mouse in/out. 2016-11-28 13:57:55 -02:00
Guilherme Iscaro be609118c6 Ecore_Evas: Add support for per-seat focus. 2016-11-28 13:57:55 -02:00
Chris Michael 8d97b8b204 ecore-evas-drm: Implement ecore_evas_screen_dpi_get for drm canvas
Small patch to implement support for ecore_evas_screen_dpi get on the
drm canvas. This will be used in enlightenment (e_scale) to get the
screen dpi of the compositor canvas when we call e_scale_update.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-28 10:09:41 -05:00
Bruno Dilly 1e62cd562e ecore_wl2: avoid adding repeated devices
Summary:
After changes done on commit 9f8e2e0d9c
it was possible to have multiple devices with the same
id added throught the function
_ecore_evas_wl_common_cb_global_added().

To avoid such issue, let's check if the device was already
created first.

Reviewers: iscaro

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4428
2016-11-24 18:31:23 -02:00
Jean-Philippe Andre b2dbf9d9dd win: Fix maximized geometry with CSD in X
There is still a geometry issue after un-maximizing.
2016-11-23 13:04:12 +09:00
Jean-Philippe Andre 4722b685cf ecore_evas/x: Inform WM about borders and shadows
This exploits the existing X Atom "GTK_FRAME_EXTENTS"
2016-11-23 13:04:12 +09:00
Jean-Philippe Andre 86e18c3f61 ecore_evas/x: Take framespace into account during resize
This is another step towards CSD support for X.
2016-11-23 13:04:12 +09:00
Derek Foreman f2fa8f67f5 ecore_evas_drm: Fix render freezes
Missed setting pending to true in one of the paths, this resulted in
an extra pageflip being scheduled too soon and returning EBUSY.

This was more likely to happen on slow systems, and is hopefully the last
remaining cause of render freeze on the RPI3.
2016-11-21 16:23:03 -06:00
Derek Foreman 24608d9950 ecore_evas_drm: Stop errant page from flip handler
This was required due to bugs elsewhere, and could potentially cause
stutters in display.  Now that we don't need it we're better off without.
2016-11-16 14:26:58 -06:00
Derek Foreman 8611aa83bc ecore_evas_drm: Don't do a flip if we know a frame is coming
If the async renderer is running then something's going to trigger a
pageflip naturally, and if we do one now we'll block it.
2016-11-16 14:26:58 -06:00
Guilherme Iscaro 9f8e2e0d9c Ecore Wayland: Remove ECORE_WL2_SEAT_CAPABILITIES_NO_SEAT.
Summary:
It's not possible to have an Ecore_Wl2_Input without a seat.

Ecore Evas Wayland: Remove seat existence check.

At this point every seat advertised is considered new, therefore
it will not be in the devices list.

Reviewers: barbieri, jpeg, cedric, bdilly

Reviewed By: bdilly

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4408
2016-11-16 17:50:32 -02:00
Guilherme Iscaro 9ba11c5cd0 Ecore Evas Wayland: Create the devices during Ecore_Evas setup.
Summary:
When launching an Elementary App using Wayland the elm_config will
automatically connect to the Wayland's display server and all events
regarding seats are lost, since by the time that Ecore_Evas is created
the global events were already dispatched. To fix this problem,
everytime an Ecore_Evas is created, the code must check if there
are any seat capabilities available, if so, the devices will be created.

Reviewers: bdilly, barbieri, cedric, jpeg

Subscribers: devilhorns, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4390
2016-11-16 18:26:25 +09:00
Chris Michael c58de1ce1d ecore-evas-drm: Fix call to drmHandleEvent
As we don't compile-time link to libdrm anymore, we need to make a
call to ecore_drm2_event_handle in order to process drm events.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-15 08:42:07 -05:00
Derek Foreman 20f52cd607 ecore_evas_drm: Fix bugs in pending tracking
This has been dead wrong for a while but only recently became a
showstopper when another bug was fixed that made this one manifest.
2016-11-14 14:30:11 -06:00
Derek Foreman bf7814aca0 ecore_evas_drm: Use timestamp from pageflip event for animator time
Should be more accurate this way.
2016-11-14 14:12:58 -06:00
Cedric BAIL 8215d9832c ecore: introduce adjusting main loop time on animator. 2016-11-14 11:53:01 -08:00
Derek Foreman 9ad35a6fa2 ecore_evas_wayland: Re-kill double disconnect bug on fallback
Jpeg caught this one a while back and it got re-introduced recently.
2016-11-09 16:33:49 -06:00
Chris Michael 11ef74c962 ecore-evas-wayland: Fix case of potential double-free
This patch addresses the case where we failed to allocate 'wdata' and
were calling free(ee) before going to an error handler. For the fix,
just don't free(ee) here and let the error handling do it's job.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 12:16:06 -05:00
Chris Michael 7a74a2e176 ecore-evas-wayland: Fix typo
Fix small typo which lead to undefined error statement.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:22:23 -05:00
Chris Michael b7406df4cf ecore-evas-wayland: Add warning if we fail to set engine info
Coverity reports an error handling issue here as we are not checking
the return value of evas_engine_info_set, so check that return and
issue a warning if it fails.

Fixes Coverity CID1365651

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:13:07 -05:00
Chris Michael 781a5089e5 ecore-evas-wayland: Fix NULL pointer dereference
Coverity reports that accessing 'einfo' here is a NULL pointer
dereference. evas_engine_info_get can return NULL, so we should be
checking for a valid return before trying to use it.

Fixes Coverity CID1365654

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:10:53 -05:00
Chris Michael 8a24d64030 ecore_evas_wayland: Fix null pointer dereference
Coverity reports a null pointer dereference here because
evas_engine_info_get can return NULL. Check for a valid return before
trying to use it.

Fixes Coverity CID1365655

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:09:00 -05:00
Chris Michael 90dabc831f ecore-evas-wayland: Fix use after free
Coverity reports illegal access here as we are trying to pass a freed
pointer to ecore_evas_free. Rework error handling to avoid this.

Fixes Coverity CID1365657

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:06:36 -05:00
Carsten Haitzler 4ed2e01591 remove xcb support in ecore_x and evas engines as per mailing list
as per mailing list discussion about dropping xcb support now. it
hasn't been complete for a long time, thus not recommented for being
turned on. as we are moving to a wayland world xcbmakes even less
sense. as agreed, time to clean up a bit and remove a distraction as
well as not well tested code. this also updates po's too.

@feature
2016-11-03 22:22:54 +09:00
Jean-Philippe Andre 7f57e23670 ecore_evas/x: Minor code simplification 2016-11-03 17:22:15 +09:00
Jean-Philippe Andre eb8d9387c1 wayland: Remove support for "draw_frame"
draw_frame is a legacy feature that draws a very ugly window border
with a white rect and a black text as title bar. This could be
used in wayland when using only the ecore_evas APIs, rather than
elm_win.

Note that the API ecore_evas_draw_frame_set() can not possibly work
as the flag is checked when the ecore_evas is created, so changing
the flag has no effect on existing windows.
2016-11-03 17:22:14 +09:00
Derek Foreman c425140a67 ecore_evas_wayland: Minimize differences between shm and egl
Finally bring these together as much as possible to avoid future
diversions when bugs are only fixed in one or the other.

There are functional changes - state tracking for client side effects is
now added to the shm engine, some bug fixes for the egl engine have been
brought to the shm engine.
2016-11-02 13:37:02 -05:00
Derek Foreman 4260d5d3a2 ecore_evas_wayland: Make resize code common
Brings resize code into the common implementation - there is a functional
change.  There appears to have been a bug in the egl resize where it
used the same w, h order for portrait evases as for landscape.  This was
fixed in shm.  I've used the shm variant for the common code.
2016-11-02 13:37:02 -05:00
Derek Foreman b23797c55a ecore_evas_wayland: Make rotation_set common
Rotation set can be moved into common now - should be no functional
change.
2016-11-02 13:37:01 -05:00
Derek Foreman 5d2a25a01d ecore_evas_wayland: Make transparent_set common
Moves transparent set into the common implementation - there is a
functional change here - the egl engine now calls transparent_set in
render_updates like the shm engine.

It is probable the this was the intended behaviour all along.
2016-11-02 13:37:01 -05:00
Derek Foreman 9ca6e274a4 ecore_evas_wayland: Make alpha set common
Moves alpha set into the common implementation - there is a functional
change here - the egl engine now calls alpha_do in render_updates like
the shm engine.

It is probable that this was the intended behaviour all along.
2016-11-02 13:37:01 -05:00
Derek Foreman 82277ae6b3 ecore_evas_wayland: Move more functions into the common implementation
Show and hide can be made common with almost no functional changes.
2016-11-02 13:37:01 -05:00
Derek Foreman af4a71bcf0 wayland evas engines: share engine info structure
These engines are incredibly similar - by sharing the same engine info
structure we'll be able to simplify the wayland ecore_evas bits and
make them much more maintainable.
2016-11-02 13:37:01 -05:00
Derek Foreman 55de5c61cd ecore_evas_wayland: Don't include Evas_Engine_Wayland_Egl.h
There doesn't seem to be any need for this.
2016-11-02 13:37:01 -05:00
Derek Foreman 0b9f77ac96 wayland_egl: Remove unused wl_egl_window variables 2016-11-02 13:37:01 -05:00
Derek Foreman 54cf6dac4a wayland evas engines: rename wayland display to wl_display
Continuing to make the shm and egl engines closer to eachother.
2016-11-02 13:37:00 -05:00
Derek Foreman 3f75c45122 wayland_egl: Rename surface to wl_surface
Making this code more closely match the wayland_shm engine
2016-11-02 13:37:00 -05:00
Derek Foreman 9e43a15526 wayland_egl: Remove pre_post_swap_callback_set
This stuff seems copied from gl_x11 which actually has API to use it.

In this engine nothing can actually set it, so it's just all dead code.
2016-11-02 13:37:00 -05:00
Derek Foreman b898d3f929 wayland ecore evas: move move_resize to common
It's identical in both shm and egl variants, share it.
2016-11-02 13:37:00 -05:00