Commit Graph

856 Commits

Author SHA1 Message Date
Derek Foreman 27316746f5 ee_wayland: Fix device leak on disconnect
Summary:
A reference was taken on these when they were added, so by passing NULL
here we're not allowing that reference to be dropped.  This results in
not only leaking the device forever, but also potentially leaving it as
a default device after it's removed so that no new attach will replace it.

Under weston all devices are removed on a VT switch, and when you switch
back the default device is wrong, which leads to problems with events
like "mouse in" which, for legacy reasons, don't take a seat, but
instead look up the default seat.

This allows the delete callback to be fired for the first time ever,
and while I've tried to fix some bugs this has revealed, I'm not
actually sure I've caught them all.
Depends on D6182

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6183
2018-05-18 13:46:47 -04:00
Wonki Kim f1c03000c9 Modify initial visibility of a extn_socket
Summary:
extn socket should be rendered even if it is not visible to answer client's requests

extn_socket was rendered even if it's not visible for the first render.
however, it's not rendered as expected because there has been changes for ecore evas idle enterer.
so that this patch changes visibility of extn_socket to answer client's requests immediately.

ref D6054

Reviewers: zmike, jypark

Subscribers: cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6167
2018-05-16 11:41:27 -04:00
Wonki Kim d92b195fe2 ecore_evas_extn: Remove aka latch logic on fn_prepare function
Summary:
current extn_socket_prepare function logic could run into dead-end
because extnbuf_lock return null on failure of taking a lock.

this patch removes aka latch logic that guide the function to dead-end.

Reviewers: cedric, raster, zmike, jypark

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6054
2018-05-16 11:41:19 -04:00
Andy Williams 114873c545 remove potential double free 2018-05-15 14:49:41 +01:00
Wonki Kim fef2a12ef6 ecore_evas_extn: Modify not to send a message if there is nothing to draw
Summary:
Seding ipc messages on ews_update_image(which is invoked as a callback of EVAS_RENDER_POST)
can makes ecore main loop awake, because sending ipc messages makes message_queue not empty.

so that this patch prevent seding ipc logic if there is nothing to draw.

Reviewers: cedric, raster

Reviewed By: raster

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6055
2018-05-09 23:58:48 +09:00
Derek Foreman 1e2626a70c ee_wayland: retain seat names when creating a new canvas
Summary:
We were creating seats with silly arbitray names like seat-11 when
creating a new canvas.
Depends on D6130

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6131
2018-05-08 13:26:57 -05:00
Derek Foreman abe295735a ee_wayland: clean up warnings
Summary:
Pretty sure these are my fault.
Depends on D6122

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6123
2018-05-08 13:26:25 -05:00
Derek Foreman 684d6a69d6 ee_wayland: remove edges flag
Summary:
Nothing needs this anymore.
Depends on D6121

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6122
2018-05-08 13:26:22 -05:00
Mike Blumenkrantz 4d62d59978 ecore-evas-win32: set draw_block until the window receives a configure event
Summary:
drawing a window before receiving a configure event results
in an unsized window, breaking spec. it also prevents ecore-evas resize
callbacks from triggering, yielding undefined returns from functions which
attempt to get the geometry of the ecore-evas

ref T6907

@fix

Depends on D6033

Reviewers: vtorri

Reviewed By: vtorri

Subscribers: cedric

Maniphest Tasks: T6907

Differential Revision: https://phab.enlightenment.org/D6034
2018-05-02 15:57:26 -04:00
Derek Foreman a61f254f19 ee_wayland: Remove pointless ack_configure
If we don't ack_configure here, it'll just automatically happen in
ecore_wl2_commit() next time we render anyway.

If we do ack_configure here, we can totally screw up E's internal window
handling.

Removing it seems like a win.
2018-04-24 15:44:09 -05:00
Derek Foreman a297f17ac3 ee_wayland: Add some NULL checks
These just protect against caller stupidity.  Double register or double
unregister shouldn't happen anyway.
2018-04-20 13:00:28 -05:00
Derek Foreman dbf65eb96a ecore_evas_wayland: Handle region updates and alpha setting in engine
Instead of having elm handle all this stuff, handle it in ee.  This fixes
a loooong standing bug where we would always use an alpha enabled surface
because CSD needs shadows - even if we aren't drawing CSD.
2018-04-20 13:00:28 -05:00
Derek Foreman 5af84afced ecore_evas_wayland: Replace transparent_set with alpha_set
transparent_set is a legacy path that should do exactly what alpha_set
does these days, so squash them into the same function.
2018-04-20 13:00:27 -05:00
Derek Foreman d20c0bf964 ecore_evas_wayland: Remove content rectangle from engine data
It's no longer used.
2018-04-20 13:00:27 -05:00
Derek Foreman 541ab76e45 ecore_evas_wayland: Calculate content size from shadow and framespace
Instead of using wdata->content, calculate these values.
2018-04-20 13:00:27 -05:00
Derek Foreman a252c3445d ee_wayland: Stop using manual_render_set
Now we use draw_block instead, so we don't accidentally stomp on other
code's usage of manual_render_set

fix T6834
2018-04-12 15:59:39 -05:00
Derek Foreman 380a58a9d9 ee_x: Rename draw_ok to draw_block and invert logic
I want to use this in other engines, but no other engine initializes this
properly, so draw_ok would be EINA_FALSE everywhere.  This way draw_block
is EINA_FALSE after calloc in all engines that don't know about it.

ref T6834
2018-04-12 15:59:39 -05:00
Derek Foreman b8e58eb4b2 ee_wayland: Remove use of draw_ok
This appears vestigial, as the evas render path we use has no custom
draw_ok handling, so nothing ever reads this variable.

ref T6834
2018-04-12 15:59:39 -05:00
Derek Foreman 4343a95e27 ee_cocoa: Remove draw_ok sets
draw_ok isn't currently used by anything but the X custom render function,
so it's doing absolutely nothing here.

ref T6834
2018-04-12 15:59:39 -05:00
Shinwoo Kim b27949dafb ecore_evas_wayland: handle 0x0 content problem
Someone could NOT use elementary and use ecore_evas only. In this case, content
size which is defined by elementary is 0x0. If content size is 0x0, then frame
size is equal to window size. But the frame size is defined by elementary as
well. So if there is not a content, then the frame size should be 0.
2018-04-10 20:38:47 +09:00
Cedric Bail a44697c37a ecore_evas: refactor logic for creating Ecore_Evas. 2018-04-02 15:12:31 -07:00
Derek Foreman e9b7844bb8 ecore_drm2: Improve early tick logic
We should only have to actually force a tick if we can't set up
the tick job, as the evas changed callback or a following render
from the tick job's tick will cause a flip.

Should remove a potential for a missed tick near the start of
ticking.
2018-03-23 16:13:39 -05:00
Derek Foreman f0a96ec53c ee_drm: prevent extra flips
Similarly to commit 8b962d24ac prevent
extra flips in the drm engine.

These are potentially more harmful to DRM as they can cause frame
drops and missed render opportunities.
2018-03-15 14:49:56 -05:00
Derek Foreman 8b962d24ac ee_wayland: Prevent extra commits
It's possible that we unregister then reregister an animator so quickly
that the ecore_evas idle enter/exiters haven't had a chance to run yet.
In this case a render will come shortly anyway and we shouldn't use a
'false' commit to kick off a frame callback.

Silences an ERR and unmeasurably improves protocol utilization.
2018-03-15 14:41:15 -05:00
Derek Foreman 812ab64413 ee_wayland: Set window visible before trying to render it
if we try to render before setting ee->visible the results aren't
likely to be... visible.
2018-03-14 16:08:07 -05:00
Carsten Haitzler cc1e1a5b56 ecore evas - drm engine - fix focus set on show to work correctly 2018-02-26 00:36:17 +09:00
Derek Foreman 0a66978041 ee_wayland: Fix ecore_wl2 refcounting breakage on some failures
If we have a blacklisted gl implementation then we'll create a canvas,
it'll fail to be useful, and we'll free it - which calls
ecore_wl2_shutdown(), but then we'll also call ecore_wl2_shutdown()
a second time further down the failure path.

Take a bonus reference before freeing the failed canvas to keep refcounts
sane.
2018-02-21 16:42:08 -06:00
Myoungwoon Roy, Kim 1308fe5338 ecore-evas: Replace ecore_wl_dpi_get with ecore_wl2_output_dpi_get
Summary: This patch replaces ecore_wl_dpi_get with ecore_wl2_output_dpi_get using Ecore_Wl2_Output

Test Plan: Execute test suite

Reviewers: cedric, raster, jpeg, stefan_schmidt, Jaehyun_Cho, devilhorns

Reviewed By: devilhorns

Differential Revision: https://phab.enlightenment.org/D5804
2018-02-19 06:40:03 -05:00
Chris Michael 32d32d402f ecore-evas-drm: Use output viewport in ecore_evas_animator_tick calls
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-13 11:44:23 -05:00
Vincent Torri d54f0f66cf Evas: remove depth usage in GDI and DirectDraw engines
Test Plan: compilation and elementary_test

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, raster

Differential Revision: https://phab.enlightenment.org/D5792
2018-02-07 22:20:20 +09:00
Vincent Torri 4916973a60 efl: remove inclusion of dirent.h where it is not used
Test Plan: compilation

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2018-01-12 11:06:12 -08:00
Mike Blumenkrantz ffa276fce3 wayland: add xdg-shell vfinal support for client-side
@feature
2018-01-10 11:39:52 -05:00
Chris Michael 1711363725 ecore-evas-drm: Check for XDG_SEAT existence
Small patch to allow specifying a different seat via XDG_SEAT env
variable. If no seat name is passed as ecore_evas options, then we
would always default to 'seat0'. As this may not be desirable in all
situations, allow for an override via XDG_SEAT env var.

ref T6455

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-12-01 15:32:35 -05:00
Derek Foreman 6a48d56dca wayland ee: Don't clear the window pointer during session recovery
The same pointer is valid post recovery, and anything that used to
check this for NULL now checks that the window's display is NULL
which is handled in ecore_wl2 now.
2017-12-01 10:58:44 -06:00
Derek Foreman 15fdbca653 wayland evas: Remove Ecore_Wl2_Display from engine info
We've got the Ecore_Wl2_Window so we can always get the display from
that.
2017-12-01 10:58:44 -06:00
Derek Foreman 8cf0bfc9ef wayland: stop tracking compositor_version in engine
We don't need it anymore now that damage is posted from inside ecore_wl2.
2017-11-10 13:43:45 -06:00
Carsten Haitzler 6a47c2243e efl ui win - make win centering work with multiple screens
this should fix T6323
@fix
2017-11-07 13:53:27 +09:00
Jean-Philippe Andre 9cec14918c evas: Move evas_canvas.eo to legacy-only
This isn't meant to be installed. The canvas API in EO is based around
the interfaces Efl.Canvas and the widget Efl.Ui.Win. Anything else is
not EO (eg: ecore_evas, evas, ...)

Note: evas_canvas3d is the last remaining thing that is installed along
EO files, but those are all beta APIs.
2017-11-01 11:22:33 +09:00
Derek Foreman 059613222a ecore_evas_wayland: Fix session recovery
Turns out when apps reconnect to the compositor they don't always
realize they need to redraw themselves.  Force a manual render
at startup if we end up in a state where an update is needed but
has probably been dropped on the floor.
2017-10-30 14:23:07 -05:00
Mike Blumenkrantz f375661e0b wayland: use eina array for ecore-evas event handlers
thx to @jpeg for reporting how dumb this was
2017-10-25 10:44:16 -04:00
Mike Blumenkrantz ffac7fc539 wayland: fix window stack implementation
ref T5350
2017-10-25 10:44:16 -04:00
Derek Foreman 3dd90f61a9 ee_wayland: Don't use wrong window size
Borderless windows, such as internal windows, need to be the exact size
they're passed by a configure event.
2017-10-16 16:17:29 -05:00
Prince Kumar Dubey cb4a17ab22 ecore_evas: preprocessor flag "BUILD_ECORE_EVAS_SOFTWARE_GDI" is not closed properly, if not defined, leads to build break.
Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:05:43 -07:00
Derek Foreman 10b6383640 ecore_wl2: Synchronize state with surface commits
This is really several inseparable commits mashed together, as doing this
a piece at a time would introduce broken intermediate revisions.

Double buffer incoming "configure" state from the compositor so it's held
back during asynchronous render and processed at frame completion.

Hold off on certain requests if their API has been invoked during async
render.

This should fix a lot of races, cosmetic issues, issues where weston can
kill our clients for acking configure (or not) at bad times, etc.
2017-10-12 12:24:03 -05:00
Derek Foreman 64b36c6767 ecore_evas_wayland: Use ecore_wl2_false_commit to trigger frame callbacks
This will allow us to receive a tick without changing any other state.
2017-10-12 12:24:03 -05:00
Derek Foreman 0a185d3efd ecore_wl2: Add new API to latch window state for updates
Add an API to call at the beginning of render to latch state at
that moment, and use it for the wayland engine.
2017-10-12 12:24:03 -05:00
Derek Foreman 0badc0522b ecore_wl2: Split configurations into client set and compositor requested
This should lead to clearer and more maintainable code than having one
pile of state that's asynchronously fiddled with by both client and
compositor.
2017-10-12 12:24:03 -05:00
Derek Foreman 10b3a41ab0 ecore_wl2: Move some state into its own struct
These need to be double buffered, and that will be done in a follow up
patch.
2017-10-12 12:24:03 -05:00
Derek Foreman a3ac6043ab ecore_wayland: Use ecore_wl2_window_resizing_get() to get resizing
Use the getter instead of directly accessing the structs.
2017-10-12 12:24:03 -05:00
Derek Foreman ceb90779ff evas_shm: Remove wl_dmabuf and wl_shm from engine info
All queries for these are now on the ecore_wl2_display
2017-10-12 12:24:03 -05:00
Chris Michael 5a93b22d50 ecore-evas-drm: Reduce code duplication
Minor code cleanup to reduce duplicated function calls.

NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-11 13:07:09 -04:00
Chris Michael 5e36b1c7c1 ecore-evas-drm: Implement support for hardware output rotations
This patch adds support for doing output rotations via hardware. This
is implemented inside the Ecore_Evas engine so that it is transparent
to the caller of ecore_evas_rotation_set.

ref T5999

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-04 11:41:59 -04:00
Carsten Haitzler 92e8935fa6 ecore evas - wayland - avoid divide by 0 if height is 0
fixes CID 1379247
2017-09-28 15:28:00 +09:00
Chris Michael 9efac538cc ecore-evas-drm: Implement actual evas engine rotations in drm
This patch implements handling of evas output rotation for the
ecore_evas drm engine.

ref T5999

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-09-19 13:10:33 -04:00
Chris Michael 7bbafe034b ecore-evas-drm: Formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-09-19 09:04:34 -04:00
Derek Foreman 388f8c41c8 wayland: Store Ecore_Wl2_Display instead of wl_display in engines
We'll need to call ecore_wl2 functions on it soon, and anything that
really needs the wl_display can query it.
2017-08-30 14:11:47 -05:00
Cedric BAIL d179a5c2a9 efl: remove PS3 backend.
This backend has received no patch and maintenance from anyone who could
actually test it over the last few years. After talking with KaKaRoTo it
is best to remove it. If anyone want to take over its maintenance, you
are welcome to revert this patch.
2017-08-25 10:48:42 -07:00
Derek Foreman 8c917daa06 wayland: Tick like a boss
Instead of the clever but awful manual_render_set hack, actually do ticks
based on frame callbacks.

Fix T5850
2017-08-18 14:27:32 -05:00
Derek Foreman a8c44938f3 wayland: Switch to ecore_wl2_window_commit()
Use ecore_wl2_window_commit() instead of directly calling wl_surface_commit
2017-08-18 14:27:32 -05:00
Derek Foreman e3b9fbaed8 wayland: Put Ecore_Wl2_Win instead of wl_surface into the engines
We'll need to track some state in a common way, so attaching it to the
window seems like a good idea.
2017-08-18 14:27:31 -05:00
Jean-Philippe Andre a43740c074 ecore_evas_extn: Fix socket & plug windows
Socket & Plug were broken after 38e6780262.
Multiple problems here:
 - The invalid path was used for the lock file.
 - The invalid buffer ID was used for unlock in render_post. That's
   because the buffer was switched during output_flush which happens
   before render_post. So the buffer would remain locked forever on the
   server side (unless maybe some animation was happening there).

@fix
2017-08-18 14:53:20 +09:00
Bryce Harrington 67fff04cc7 evas: Fix spelling/grammar errors
Summary:
Fixes some basic punctuation and grammar errors, corrects spelling and
word order/choice in various places.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5098
2017-08-17 10:45:35 -04:00
Vincent Torri c2abb9a946 ecore_evas: win32 module - fix possibly uninitialized variables
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-14 10:16:59 -07:00
Mike Blumenkrantz 5ffb7d423c wayland: set min/max size hints to surface before show
with deferred surface creation the first canvas change of hints may not
be able to trigger protocol methods for size hints, so ensure that hints are
set
2017-08-11 18:43:13 -04:00
Mike Blumenkrantz f00a49835d wayland: remove xdg5 support
this has not been used or tested since last year and there are no major
compositors which lack xdg6 support
2017-08-11 18:43:12 -04:00
Mike Blumenkrantz 398ffe40a3 wayland: fix xdg-shell popup windows
@fix
2017-08-11 18:43:12 -04:00
Derek Foreman cb57ea7587 ecore_evas_drm: Tick from the animator registration callback
If we're not ticking already when a new animator is started then we have
to wait for a vblank to get a tick.  That's not great.

If we can, use the time of the last vblank to generate an immediate tick
to avoid this latency.
2017-08-11 17:11:12 -05:00
Derek Foreman e893d7de7d ecore_evas_drm: Let ecore_drm2 track pending page flips
Since the engines can call the flip functions, we need to protect the
ticker from missing those flips.  Thus, we let ecore_drm2, which obviously
sees all flips, track them.
2017-08-11 17:11:12 -05:00
Derek Foreman 5ecfe6a8b5 ecore_drm2: Remove ecore_drm2_output_crtc_size_get()
Replaced with ecore_drm2_output_info_get()
2017-08-09 14:56:59 -05:00
Derek Foreman 846db0e0e7 ecore_drm2: Remove ecore_drm2_output_geometry_get()
Replaced with ecore_drm2_output_info_get()
2017-08-09 14:56:59 -05:00
Derek Foreman afd65a8a99 ecore_drm2: Merge ecore_drm2_device_free and _close
There's no reason to have them be separate, all callers must do them
back to back, so let's just combine them.
2017-08-09 14:56:58 -05:00
Derek Foreman d8a9b895bb ecore_drm2: Merge ecore_drm2_device_find and ecore_drm2_device_open
There's never a reason to find a device and not open it, so all callers
end up calling these two functions back to back.
2017-08-09 14:56:58 -05:00
Derek Foreman 8ff59b2c55 ecore_drm2: Pass Ecore_Drm2_Device instead of fd to most functions
Intended to simplify the upcoming commit that merges device find and
device open into a single function that returns a device.

The fd is something callers shouldn't really need to get their hands on,
right now there are still a few places where it's needed, but those will
be gone soon too.
2017-08-09 14:56:58 -05:00
Chris Michael 4cf448274c ecore-evas-wayland: Add handler for Iconify State Change event
Small patch to add a handler for catching Window Iconify State Change
events

'#divergence'

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-08-08 10:00:11 -04:00
Mike Blumenkrantz 15126b2f4f ecore-evas wayland: remove move() function
this is conceptually wrong to include in a wayland engine
2017-08-07 13:26:50 -04:00
Mike Blumenkrantz a827f418d9 ecore-evas wayland: clamp max size hints to 0 2017-08-07 11:05:58 -04:00
Carsten Haitzler d954510b10 ecore evas wayland - add explicit falltrhough tags for warning removal 2017-08-06 11:50:49 +09:00
Mike Blumenkrantz 64754b682e ecore-evas-wayland: rework window hint calcs to be more accurate
this is still pretty broken for some directions, client-side aspect fml
2017-08-04 16:17:33 -04:00
Mike Blumenkrantz ef5812188a ecore-evas-wayland: update size when size hints are changed
ensure hinted size is used

@fix
2017-08-04 16:10:45 -04:00
Mike Blumenkrantz f03028d22f wayland: fix min/max size setting
also don't set arbitrary hints on init

@fix
2017-08-04 16:10:42 -04:00
Derek Foreman 1a175cd537 ecore_evas_drm: Only check for gpu time offset if env var set
Since most systems shouldn't need this, and it's possible
that it's causing trouble for some systems, make it off by
default.

Fix T5806
2017-07-29 08:52:16 -05:00
Derek Foreman 2b16fc4278 ecore_evas_drm: Calculate gpu blank time offset once at startup
So vmware's graphics driver reports the MONOTONIC drm cap, yet uses
CLOCK_REALTIME instead.  This leaves us with a gigantic offset between the
gpu timestamp and the times ecore_time_get() gets from CLOCK_MONOTONIC.

Since ticking screws directly with loop time this results in some long
distance clock jumping.

This commit fixes drm/gl_drm operation under vmware.
2017-07-28 15:35:03 -05:00
Mike Blumenkrantz 6bb56b3f56 ecore-wl2: implement support for aux hints
this is a direct copy of a feature from tizen git with no modifications other
than what was required for compilation and functionality

https://review.tizen.org/git/?p=platform/upstream/efl.git;a=commitdiff_plain;h=01e72b7e3484ece4b589f95315990ba2c366c231
https://review.tizen.org/git/?p=platform/upstream/efl.git;a=commitdiff;h=670d84b579f248ae0e3df48e9953fe8128da9468

fix T5780

@feature
2017-07-28 15:43:48 -04:00
Derek Foreman 8e500c6835 ecore_drm2: Allow picking a sequence number for blanktime_get
This lets us do a blocking wait for a vsync.  Something we should try to
do as infrequently as possible, but in some cases we need it one time at
startup to catch graphics driver bugs.
2017-07-28 10:41:11 -05:00
Jiyoun Park 6d4ebf9bc6 ecore_evas_wayland: fix bug ecore_evas cannot update the evas when rotation
usecase:
    show -> rotation -> hide -> show
    ecore_evas_wayland didn't check the rotation.
    when ee is landscapemode, it cannot update the right area of evas.
2017-07-26 15:28:02 +09:00
Mike Blumenkrantz 337f3796d6 ecore-evas-wayland: destroy frame callback on hide
ensure cursor surfaces can render again after being hidden

 #TheDisappointer

@fix
2017-07-21 16:17:54 -04:00
Mike Blumenkrantz 93bac8ce4a wayland: stop creating 1x1 surfaces on init
fix T5226

 #IGot99TicketsBut1x1AintOne
2017-07-21 16:17:54 -04:00
Derek Foreman e53b0c262a ecore_evas_drm: Provide a last_tick_get callback
Allow the drm engine to provide a tick timestamp for the previous vblank
interval.

ref T5462
2017-07-13 18:07:42 -05:00
Derek Foreman aa8d9c1829 ecore_evas: Add a function pointer for last_tick_get
Engines that provide their own tickers may need to be able to provide the
time of the last tick even if they weren't sending ticks to EFL at the
time.

This is a feature added during freeze as it's necessary to resolve a bug.

ref T5462
2017-07-13 18:07:42 -05:00
Derek Foreman e69cc0f552 ecore_evas engines: Add some nulls to the func arrays
Purely cosmetic, but gets the comments back in sync with reality.
2017-07-13 18:07:41 -05:00
Derek Foreman d3c10fb1eb ecore_evas_drm: Partially revert "Refuse to start a ticker for a manually rendered canvas"
BAILing here can break animators permanently, so best to just log the
issue and move on (and potentially allow the ticker to wake us from DPMS).

ref T5462

Partially reverts a795629e8c
2017-07-11 16:50:23 -05:00
Derek Foreman a795629e8c ecore_evas_drm: Refuse to start a ticker for a manually rendered canvas
With atomic mode setting this has the hilarious side effect of waking
up the display from dpms.

Attempting to tick when manual render is set is likely a bug, so
log an ERR.

fix T5462
2017-07-10 16:25:59 -05:00
Vincent Torri 937a0d6411 Ecore_Evas win32 module: fix memory leak 2017-07-09 13:34:19 +02:00
Vincent Torri bdb62b6bbe Add ecore_win32_cursor_show() API and ecore_evas_win32_cursor_(un)set() functions
This fixes double mouse cursor in elm entries on Windows (for example)

@feature
@fix
2017-07-09 13:34:09 +02:00
Jean-Philippe Andre 76a668f022 ecore_evas_x: Track changes in framespace size
If the framespace size has changed and by accident (or in fact, by
design) the evas size + framespace size is equal to the size sent
by the X server, ecore_evas_x was skipping the resize event. This
patch adds a tracking of the framespace size so that we redraw the
canvas if it changed.

This will fix issues with the main menu (since it's in the framespace,
23 pixels tall with the default theme & scale).

Note that all this is partly because the ecore evas size is the size
without the framespace, so weird calculations are made during resize...

Ref T5482
2017-07-05 17:43:59 +09:00
Chris Michael 09375bf5b5 Revert "ecore-evas-wayland: Add support for setting window stack mode"
This commit reverts support for setting window stacking mode from
ecore_evas_wayland as per IRC dicussion with cedric

This reverts commit a3cf0d3a54.
2017-06-15 13:08:39 -04:00
Chris Michael a3cf0d3a54 ecore-evas-wayland: Add support for setting window stack mode
This patch adds support for updating ecore_wl2_window stack mode when
the ecore_evas_layer_set is called.

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-15 11:39:27 -04:00
Chris Michael 8b29ae7609 ecore-evas-wayland: Add support for focus_skip_set
This patch adds support for ecore_evas_focus_skip_set in the wayland
engine.

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-15 10:42:28 -04:00
Chris Michael 522ee10b45 ecore-evas-wayland: Add support for setting auxiliary hints
This patch adds function pointers to the Wayland Interface that can be
used for supporting auxiliary hints on a given window

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 12:57:29 -04:00
Jean-Philippe Andre e8f9f109a6 evas: Rename device Class to Type, remove Sub_Class
1. The word "class" is a pain point with many languages where
   it's a keyword. Type is a little better. Also, the property
   was already named "device_type" and not "device_class".

2. Remove Efl.Input.Device.Sub_Class
   It's not used inside EFL upstream codebase, and unlikely to
   be used anywhere else (even in Tizen).

Hopefully no one used the Efl_ enum types. So far only the Evas_
types should be in used.

Ref T5540
2017-06-12 15:21:55 +09:00
Chris Michael 53bfe00351 ecore-evas-drm: Remove borrowed fourcc_code from source file
As we will now use static_libs/libdrm for building ecore_evas_drm, we
no longer need to include this bit of borrowed four_cc code from libdrm

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 13:47:47 -04:00
Chris Michael cb94befb9d ecore-evas-wl: Add support for Window Manager rotations
This patch adds support to Ecore_Evas_Wayland for Window Manager
Rotations so that window managers which do support rotations are able
to rotate an EFL wayland application.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:30:42 -04:00
Chris Michael d57bdb5fbc ecore-evas-x: Remove blank line
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-08 14:29:02 -04:00
Chris Michael c0458aae38 ecore-evas-wayland: Fix potential null dereference
Quick patch to fix a potential null derefence in render_flush_pre
callback.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-08 10:01:52 -04:00
Chris Michael 0a77b4e922 ecore-evas-wl: Don't check window visibility on raising
As we won't get a request from a server to raise a window which is not
visible anyway, this check is useless.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-07 11:08:48 -04:00
Bryce Harrington 2f025184f7 evas: document the wayland ecore_evas constructors
Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:56 -07:00
Bryce Harrington aa9bda8b83 ecore_evas: correct error message reporting incorrect engine name
Summary:
_ecore_evas_wl_common_new_internal() creates both wayland_egl and
wayland_shm backed windows, so reporting that the failure was in looking
up "Wayland_Shm" could be misleading.

Also, this routine can be called with any arbitrary string as
engine_name, so including what was received in the error message might
be helpful for diagnosing bugs.

Reviewers: cedric

Reviewed By: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:56 -07:00
Mike Blumenkrantz cb18ce4a90 ee drm: null elput device pointer when deleting device 2017-06-02 18:23:42 -04:00
Mike Blumenkrantz 1e6e5047be ee engines: update engines for per-seat cursor objects
ref 5856d3b52f6124ad5b4cfe47b21f28ab6f380002
2017-06-02 18:23:42 -04:00
Mike Blumenkrantz cde843438d ee wayland: only handle events for ee with matching display object
ensure apps with multiple client connections don't mix events from different
connections

@fix
2017-06-02 18:23:42 -04:00
Derek Foreman cc70806497 ecore_evas_drm: Send a spurious pageflip when showing a canvas
This is a quick and harmless hack to make sure we don't come back to a
dead compositor on a vc switch.

A proper fix will follow eventually, I promise.

Really.  Would I lie?
2017-06-02 15:50:09 -05:00
Jean-Philippe Andre 07da746194 drm: Fix build warning (invalid enum type) 2017-05-31 17:48:26 +09:00
Mike Blumenkrantz ed4e54ebe2 wayland/drm: create evas_devices and add device pointer to input events
this is still semi-broken if a seat has many pointer-ish type devices since
pointer devices in ecore-evas were never correctly implemented to be 1:1 with
seat:cursor relationships

@feature
2017-05-26 16:27:43 -04:00
Mike Blumenkrantz 2fe7878235 wayland: move pointer-related functions to ecore_wl2_input namespace
windows do not have pointers or cursors under wayland, seats do. due to
lack of multiseat support, most components simply use the "default" seat
with these functions, but this should make the corresponding code more
easily adaptable
2017-05-19 12:41:17 -04:00
Mike Blumenkrantz 5ebdf8f341 wayland: use shell activated state to indicate focus in csd
the current (v6) xdg-shell spec reads as follows:

	  Client window decorations should be painted as if the window is
	  active. Do not assume this means that the window actually has
	  keyboard or pointer focus.

so this is not equivalent to receiving/losing input focus and should not
be propagated as such

@fix
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 1bc837c3de ecore-wl2: redo ecore_wl2_window_move() to take a seat instead of coords
this triggers a move operation and is seat-dependent
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz d7d3c9adab ecore-wl2: redo ecore_wl2_window_resize() to take a seat instead of size
this triggers a resize operation and is seat-dependent
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz d0f707ef91 ecore-evas-wayland: do not trigger resize operation when performing rotation
@fix
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 2c291f5bb8 ee wl engines: set seat id when creating seats 2017-05-19 12:41:16 -04:00
Chris Michael f160d41539 ecore-evas-wayland: Remove unused variable
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-05-09 11:47:04 -04:00
Vincent Torri 94509a3d86 Ecore_Evas (Win32): add geometry_get() method and fix dpi_get(), using the new API in Ecore_Win32.
This fixes fullscreen feature in Elm on Windows as the geometry of the desktop
was not known.

In case of multiple displays, the desktop, where the window is displayed, is used for fullscreen.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-05-08 15:09:11 -07:00
Cedric BAIL 122c34b2ce ecore_evas: refactor win32 backend to use generic render infrastructure. 2017-05-08 15:04:09 -07:00
Cedric BAIL e541c4f500 ecore_evas: refactor wayland backend to use generic render infrastructure. 2017-05-08 15:03:51 -07:00
Cedric BAIL db1e8e2d92 ecore_evas: refactor sdl backend to use generic render infrastructure. 2017-05-08 15:03:31 -07:00
Cedric BAIL 83513f0933 ecore_evas: refactor psl1ght backend to use generic render infrastructure. 2017-05-08 15:03:10 -07:00
Cedric BAIL 3a5de3c4eb ecore_evas: refactor fb backend to reuse generic render infrastructure. 2017-05-08 15:02:50 -07:00
Cedric BAIL 727b61218b ecore_evas: refactor extn backend to use generic rendering infrastructure. 2017-05-08 15:02:15 -07:00
Cedric BAIL 3fd01561ae ecore_evas: refactor drm backend to use generic render infrastructure. 2017-05-08 15:01:49 -07:00
Cedric BAIL c24d077b6a cocoa: refactor cocoa backend to use generic render infrastructure. 2017-05-08 15:01:30 -07:00
Cedric Bail 73592d4e72 ecore_evas: first step into refactoring x backend. 2017-05-05 17:55:06 -07:00
Cedric Bail 103dfc5ba4 ecore_evas: first step into refactoring wayland backend. 2017-05-05 17:55:06 -07:00
Cedric Bail 11cf280cfa ecore_evas: first step into refactoring win32 backend. 2017-05-05 17:55:06 -07:00
Cedric Bail cc139b70f8 ecore_evas: first step into refactoring sdl backend. 2017-05-05 17:55:06 -07:00
Cedric Bail 081a134449 ecore_evas: first step into refactoring psl1ght backend. 2017-05-05 17:55:06 -07:00
Cedric Bail d1dc3b0dc5 ecore_evas: first step into refactoring fb backend. 2017-05-05 17:55:06 -07:00
Cedric Bail 042fd1dda8 ecore_evas: first step into refactoring extn backend. 2017-05-05 17:55:06 -07:00
Cedric Bail 9129adc993 ecore_evas: first step into refactoring drm backend. 2017-05-05 17:55:06 -07:00
Cedric Bail fe316636fd ecore_evas: first step into refactoring cocoa backend. 2017-05-05 17:55:06 -07:00
Vincent Torri cf2786a849 ecore_evas: fix test in the hide callback in Windows module
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-04-27 09:56:23 -07:00
Derek Foreman 0f581cb745 ecore_evas_wayland: Make local functions static 2017-04-26 13:47:46 -05:00
Derek Foreman c5550f9320 ecore_evas_wayland: Remove unused functions 2017-04-26 13:47:46 -05:00
Derek Foreman 489b87edc9 ecore_evas_wayland: Remove unnecessary function prototypes 2017-04-26 13:47:46 -05:00
Derek Foreman dcd9e09472 ecore_evas_wayland_common: Reorder functions
Try to put these in order so we don't need prototypes

No functional changes
2017-04-26 13:47:46 -05:00
Vincent Torri 540de0e254 Ecore_Evas: use window states and event property to fix ecore_evas_fullscreen_set()
This implies that elm_win_fullscreen_set() is also fixed

@fix
2017-04-26 15:07:38 +09:00
Vincent Torri 24c756b9f2 Ecore_Evas: clean up Windows module 2017-04-26 15:07:29 +09:00
Carsten Haitzler 02a7e00c01 ecore_evas extn - fix buffer n check for lock files with untrusted val
the code added by minkyoung has a definite security flaw here trusting
e->response to be within a small range when all it is is an int -
range is not limited other than that... so fix the code to check for
range like further code below does.

this commit went in 2 days ago... so not an existing bug fix.
2017-03-23 16:27:19 +09:00
Minkyoung Kim 38e6780262 ecore_evas_extn: do not update plug image when lockfile is invalid.
Summary:
This prevent invalid shared memory access.
Invalid access occur when server is resized sequentially from now to A-size
to B-size, and client receive A resize message after resizing B.
Then client try to render plug image with A-size, but shared memory is B-size
buffer. Size are mismatch. This makes segmentation fault when uploading texture(gl)
or rendering image(sw).

Test Plan: Indicator rendering on Tizen3.0 platform.

Reviewers: jypark, wonsik, dkdk, scholb.kim, jiin.moon, jpeg, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-03-21 11:05:58 -07:00
Mike Blumenkrantz 9d8bc92c4a ecore-evas-wayland: update no-op configure commit case for new acking method
ref 1b9970658f
ref 5e7456a315
2017-03-10 16:11:19 -05:00
Mike Blumenkrantz 57412cba94 ecore-evas-x: set flag for maximized state
fixes initial maximize state
2017-03-10 15:54:21 -05:00
Mike Blumenkrantz 1b9970658f ecore-evas-wayland: commit on no-op configure events
this handles the case of a window configure not triggering any visible change

fix T5192
2017-03-10 15:54:21 -05:00