Commit Graph

298 Commits

Author SHA1 Message Date
Carsten Haitzler ca32732373 ecore_evas/wl2 0 fux xdg close cb for window when it's closed remotely
this should fix this:

https://matrix.org/_matrix/media/r0/download/matrix.org/lhFneENlWAjuXDaJfSYuJjjJ

unfortunately this means adding an api and then using it in ecore_evas.

@fix
2019-10-14 22:58:27 +01:00
Carsten Haitzler a4bcd15498 ecore_evas wl - make ERR's into WRNS as they really are just that 2019-06-04 15:23:55 +01:00
Hermet Park 53599a8d39 ecore wayland: expand internal interface to pass engine option list.
This is a prepartion patch to support msaa in wayland.
ui window needs to deliver engine options (stencil, depth, msaa bits)
to evas engine side, ecore_evas_wayland_egl should have the argument to pass.
2019-04-25 16:56:40 +09:00
Derek Foreman 12af5537c5 ee_wayland: Use object geometry instead of window geometry
wayland window geometry isn't currently being handled properly, but the
ecore_evas geometry should be correct and coherent.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7435
2018-12-14 10:29:58 -06:00
Derek Foreman 56f7097e17 ee_wayland: Replace set_config.geometry direct use with getters
I'm going to deal with some ugly geometry problems in the getter func
shortly.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7432
2018-12-14 10:29:54 -06:00
Derek Foreman 1f709470c5 ee_wayland: Set opaque region for alphaless surfaces
Theoretically this shouldn't be necessary, but it may be possible for
a backend to give us a visual with translucency even if we didn't ask
for one.

also better comments.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-11-19 10:11:29 -06:00
Hermet Park 6010d3e8c5 ecore wayland: fix a regression bug of wayland_transparent_get().
Summary:
wayland transparent func was replaced with alpha's.

By this, transparent common attribute is no more valid,
ecore_evas_transparent_get() doesn't work.

This is a regression bug by 5af84afced

Reviewers: ManMower, devilhorns

Reviewed By: ManMower, devilhorns

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6856
2018-08-17 11:30:20 -04:00
Derek Foreman 4e07f505c3 ee_wayland: Remove spurious manual_render
Summary:
The line prior to this damages the canvas and should result in a render
anyway.

Forcing a manual render here (without regard to the manual_render_set
state) will cause a post render callback to fire for clients that
think they've disabled automatic rendering.

fix T7275

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers, zmike

Tags: #efl

Maniphest Tasks: T7275

Differential Revision: https://phab.enlightenment.org/D6809
2018-08-10 11:38:25 -04:00
Derek Foreman 7bb0c661bd ee_wayland: Update configured state on short-circuit ack-configure
Summary:
When we BAIL from the configure callback with an immediate ack we don't
properly update state, commit the ack, or allow ecore_wl2 to process
a deferred ack_configure that happened during async rendering.

Using a commit here instead should update internal state properly.

ref T7243
Depends on D6783

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Maniphest Tasks: T7243

Differential Revision: https://phab.enlightenment.org/D6784
2018-08-08 14:58:47 -04:00
Derek Foreman c45348770c Revert "ee_wayland: Remove pointless ack_configure"
Summary:
This reverts commit a61f254f19.
and a follow up commit that removed some warnings

Apparently this is instrumental in enlightenment's window maximize
animation processing.

The removed bits would force an ack configure when an inbound
configure didn't result in a change that would cause a re-render.
Since this calculation needs knowledge of state ecore_wl2 doesn't
track, it does need to happen here.

ref T7243

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Maniphest Tasks: T7243

Differential Revision: https://phab.enlightenment.org/D6783
2018-08-08 14:58:44 -04:00
Mike Blumenkrantz c54b7a4ab3 ecore-evas/wayland: fix parent setting on canvas creation
Summary:
use the correct pointer when applying the passed parent object in order to
successfully set the parent

ref 78f27a3eff

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl_display_system

Differential Revision: https://phab.enlightenment.org/D6757
2018-08-06 15:18:14 -04:00
Derek Foreman 24e5aa668a ee_wayland: Update maximize and fullscreen state after configure
Summary:
If the compositor drops fullscreen or maximize for us the CSD to change
that state would become broken, as ecore_wl2 thought the window state
was whatever we last set it to from the client side.

Update that state on configure event.

fix T7211

Reviewers: devilhorns, zmike, eagleeye

Reviewed By: devilhorns, zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7211

Differential Revision: https://phab.enlightenment.org/D6684
2018-07-25 15:53:39 -05:00
Umesh Tanwar 67684dec73 ecore_evas: when window resized in ecore_evas, check evas rotate state.
Summary:
when ecore_evas is resized, get evas' size,
but angle not checked, so put a check.

@fix

Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Reviewers: Hermet, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6627
2018-07-18 08:10:22 -04:00
Derek Foreman 0fe553cf06 ecore_wl2: Remove ecore_wl2_display_window_find
Summary:
This is now totally trivial and needs not exist.
Depends on D6522

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6523
2018-07-06 10:16:36 -04:00
Derek Foreman 78f27a3eff ecore_wl2: Replace window ids with pointers
Summary:
There's no benefit to generating ids instead of just using the
Ecore_Wl2_Window pointer in events.

This has the added benefit of working around a really nasty hash collision
bug when multiple ecore_evas engines are used at once.

ref T7053
ref T6222

@beta_break
Depends on D6521

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7053, T6222

Differential Revision: https://phab.enlightenment.org/D6522
2018-07-06 10:16:21 -04:00
Derek Foreman acb125419f ee_wayland: Remove extraneous unregister
Summary:
ecore_event_window_unregister(ee->prop.window) is actually *exactly*
the same as ecore_evas_input_event_unregister(ee)

So this sequence just uselessly tries to remove something from an empty
hash table.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6521
2018-07-06 10:15:40 -04:00
Derek Foreman dc75d6b5d3 ee_wayland: Don't offer a raise callback
Summary: This isn't possible under wayland.

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6276
2018-06-15 13:17:39 -05:00
YeongJong Lee 420128903a ee_wayland: remove needless variable
Reviewers: ManMower, zmike

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6239
2018-06-01 09:13:14 -05:00
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
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
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 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 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
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 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
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
Mike Blumenkrantz ffa276fce3 wayland: add xdg-shell vfinal support for client-side
@feature
2018-01-10 11:39:52 -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
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
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