Commit Graph

676 Commits

Author SHA1 Message Date
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Woochanlee d702f714fe ecore_wl2_window: Fix incorrectly implemented null check.
Summary: It checks 'window->xdg_toplevel'  two times.

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7065
2018-09-19 07:01:01 -04:00
Marcel Hollerbach 4aa480f6d3 ecore_wl2: add support for intree loading of the module
Summary: the module was not loaded when we were running intree.

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7023
2018-09-12 08:39:14 -04:00
Derek Foreman b43033e393 ecore_wl2: Move surface module file to modules directory
It is now similar to how other modules are handled.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-09-11 09:54:49 +02:00
Yeongjong Lee 02d83ebcd4 docs: Fix typos in API reference doc and comments.
Reviewers: Hermet, segfaultxavi

Reviewed By: Hermet, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6948
2018-08-31 17:45:31 +09:00
Hermet Park 568ddfe397 ecore wl2: change logging level.
Summary: ease the error message to warning because it's not serious one.

Reviewers: devilhorns, ManMower

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6899
2018-08-23 07:29:35 -04:00
Marcel Hollerbach bda4565d9c ecore_wl2&elput: correctly fill the key structure
Summary: the key structure has two fields key and keyname, those should be identical to the keystructures from x. the method xkb_keysym_to_utf8 however returns different values for keys like "minus" thus only relying on xkb_keysym_name files this issue.

Reviewers: eagleeye, devilhorns

Reviewed By: eagleeye

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6520
2018-07-10 14:44:36 -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 ee3df4efc3 ecore_wl2: Better error handling for dmabuf sync ioctls
Summary:
Turns out these can fail with EINTR or EAGAIN, and we're supposed
to try again.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6250
2018-06-19 13:43:55 -04:00
Derek Foreman e4641649e2 ecore_wl2: purge surface buffers in semi_free
Summary:
This fixes a session recovery bug with software render.

An attempt to re-use a buffer in a new wayland connection resulted
in another disconnect and broken rendering.
Depends on D6281

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6282
2018-06-15 13:18:56 -05:00
Derek Foreman 54a877981c ecore_wl2: Add purge to ecore_wl2_window_surface_flush
Summary:
It's convenient to be able to pass this through this api too.

@betabreak
Depends on D6280

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6281
2018-06-15 13:18:53 -05:00
Derek Foreman b8d6923782 ecore_wl2: Handle purging flush in dmabuf module
Summary:
Allow destroying all buffers, even attached ones, in the dmabuf surface
module.
Depends on D6279

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6280
2018-06-15 13:18:39 -05:00
Derek Foreman a310667bec ecore_wl2: Add a purge option to surface flush
Summary:
We need to be able to forcibly destroy all surface buffers to make
session recovery work safely for software rendering.

@betabreak
Depends on D6278

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6279
2018-06-15 13:18:30 -05:00
Derek Foreman 551101b4cd ecore_wl2: Set the parent window's surface to NULL on surface destroy
Summary:
Prevents potential use after free.
Depends on D6277

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6278
2018-06-15 13:18:15 -05:00
Derek Foreman 03793c4c64 ecore_wl2: Remove ecore_wl2_window_raise
Summary:
Since this can't be done, it probably doesn't need API.

@betabreak
Depends on D6276

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6277
2018-06-15 13:18:00 -05:00
Derek Foreman 4ec261064f ecore_wl2: Fix dmabuf locking
Summary:
The ioctls weren't properly used so no locking took place at all, leading
to rendering anomalies when placing dmabuf buffers in hardware planes.

Also, forgetting to check error returns left no indication that the
ioctl was failing, so we now emit a warning if the ioctl fails.

Reviewers: zmike

Reviewed By: zmike

Subscribers: devilhorns, cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6237
2018-06-05 11:40:37 -05:00
Derek Foreman 249ae8e5f0 ecore_wl2_window: Silence early commit ERR for mouse cursors
Summary:
Our wayland mouse cursor code can trigger commits with commit pending
when mousing into a window across CSD, which results in quickly setting
the default cursors then an animated resize cursor before the first commit
has finished.

Fixing this is non trivial, and the bug is just a harmless inefficiency
of little impact, so just disable the ERR for that specific case instead.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6184
2018-05-22 12:33:36 -04:00
Derek Foreman 0ef79bb941 ecore_wl2: complain loudly when move or resize doesn't provide a seat
Summary:
We now have the ability to provide the seat information properly, so
fire off an ERR if a caller doesn't.
Depends on D6131

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6132
2018-05-08 13:27:00 -05:00
Derek Foreman 23d5ee88d5 ecore_wl2: warn on unused result from ecore_wl2_input_seat_id_get
Summary:
Make it harder to misuse this function in the future.
Depends on D6129

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6130
2018-05-08 13:26:54 -05:00
Derek Foreman ed60eddff5 ecore_wl2: Fix window drag mouse eventing
Summary:
When a CSD button interaction under wayland leads to a compositor action
like move or resize, we essentially "give back" that button press to the
compositor, and it never sends us a mouse up for it.

We need to internally fire a mouse up event to fix up state so the client
doesn't think the mouse is still down.  Until now we've been doing this
by setting a flag when we start a move/resize and checking it at next
pointer enter for the window.

This leads to unsolvable races and wacky bookkeeping, and runs afoul of
the fact that we're not actually guaranteed a pointer enter immediately
after a move completes.  There is absolutely no way at all on wayland to
know if a move or resize operation has completed.

So, let's just fire the mouse up immediately on start of interaction,
which is raceless.

This fixes a years old bug where dragging a window might leave a stuck
mouse up, and allow hilighting text without drag after the window drag
completes.  (elementary-test -to "text editor" with multiple windows open
exhibits this bug)
Depends on D6127

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6128
2018-05-08 13:26:46 -05:00
Derek Foreman f78ff5f445 ecore_wl2: Remove ecore_wl2_input_grab/ungrab
Summary:
These should never be called, so they shouldn't be API.

This kind of internal state fiddling should happen implicitly in the
API that need it.

@beta_break
Depends on D6126

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6127
2018-05-08 13:26:42 -05:00
Derek Foreman 77f946a92c elm_win: Remove move stop callback
Summary:
This is only fired to trigger a cursor set under wayland, but that cursor
set should be done unconditionally on mouse in.

However, mouse in was being discarded because mouse out was being deferred
when the window was "grabbed" for moving.

If instead we just let the mouse out occur as it should, the cursor
is properly updated on mouse in.
Depends on D6118

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6119
2018-05-08 13:25:54 -05:00
Derek Foreman 8bd47cf83c ecore_wl2: reduce wayland display flushes
Clean up various places where we do flushes that we don't need to
because some immediately following action is going to cause a flush.
Also fix places where we flush without actually doing anything.
2018-04-20 13:00:28 -05:00
Derek Foreman 4837f32443 ecore_wl2: Share same region between input and opaque when possible
If input and opaque region are the same (they usually are) we can use
the same region for both.
2018-04-20 13:00:28 -05:00
Derek Foreman 0ca813dbd0 ecore_wl2: Refactor region create
Trivial refactor
2018-04-20 13:00:28 -05:00
Derek Foreman 486bd23ca1 ecore_wl2: Make ecore_wl2_window_false_commit more robust
False commit when a commit is already pending is an error, but for safety
it should be a nop.

Currently it would overwrite the existing frame callback which could
cause problems on window destruction.
2018-04-20 13:00:28 -05:00
Derek Foreman f53bc90c62 ecore_wl2: Don't unmap buffers at unlock
We should be using dmabuf sync ioctls instead of mmap/munmap every draw,
this makes that happen.  The surface code continues to do what its always
done, and map/unlock.
2018-04-20 13:00:28 -05:00
Derek Foreman 324c4ede00 ecore_wl2: Add ERR for buffer lock errors
Should never double lock or double unlock, this isn't refcounted, and
probably doesn't need to be.
2018-04-20 13:00:28 -05:00
Derek Foreman 6b3f999cf4 ecore_wl2: Add dma_buf lock/unlock ioctls
These should help with coherency later when we don't unmap for every
surface post.
2018-04-20 13:00:28 -05:00
Derek Foreman 1fddfdfaae ecore_wl2: Add lock/unlock function pointers to buffers
For backend specific lock/unlock behaviour
2018-04-20 13:00:28 -05:00
Derek Foreman 52e2ef8b22 ecore_wl2: Add ecore_wl2_buffer_lock
Currently we're making mapping implicitly take a lock.
2018-04-20 13:00:28 -05:00
Derek Foreman f73bc10201 ecore_wl2: Don't do anything but update alpha in alpha_set
This is now done in ecore_evas where it should be.  alpha_set now does
only what its name claims it does - sets whether a surface has an alpha
channel or not.
2018-04-20 13:00:28 -05:00
Derek Foreman ab7419908c ecore_wl2: Reconfigure window on alpha set
This allows software renderers to reconfigure their buffers to actually
change whether alpha is present.
2018-04-20 13:00:27 -05:00
Derek Foreman fc973b9640 ecore_wl2: Remove window_transparent_set
This is exactly the same as alpha_set, so it really doesn't have much
reason to exist.
2018-04-20 13:00:27 -05:00
Derek Foreman 8b5b9989af ecore_wl2_dmabuf: Properly reconfigure on surface alpha change
When alpha changes we need to blow away all our buffers in reconfigure,
even if they're still the right dimensions.  Otherwise we can end up
rendering to an XRGB buffer when we wanted to use ARGB and we won't have
proper transparency.
2018-04-20 13:00:27 -05:00
Derek Foreman a10feaed0c ecore_wl2: Add ecore_wl2_surface_alpha_get query
We'll need this for some surface modules to properly handle alpha changes
2018-04-20 13:00:27 -05:00
Derek Foreman 6da0933d60 ecore_wl2: Add alpha to reconfigure
Currently we only ever make wayland windows with alpha, this is a step
towards changing that.
2018-04-20 13:00:27 -05:00
Derek Foreman e50b43d02f ecore_wl2: handle configure_complete after handling configure
since configure_complete may result in a draw op, configure should be
handled first so the size is correct.
2018-04-17 11:12:27 -05:00
Derek Foreman 48e0c6ea90 ecore_wl2: Fix ecore_wl2_window_output_find
Window geometry x, y are the offset from the top left corner of the
buffer, and not screen co-ordinates, so has nothing to do with output
geometry and can't be used to determine which window we're on.

Now that we track surface enter/leave events we can just give the first
output in the list of outputs we know we're on.
2018-04-11 16:29:07 -05:00
Derek Foreman f560c76b52 ecore_wl2: Properly handle minimize request before shell surface exists
If we're asked to iconify a window before it's visible we need to track
this and apply the state as soon as we create the shell surface.

fix T6834
2018-04-11 11:48:27 -05:00
Derek Foreman 5a2c5479bf ecore_wl2: Stop pretending to fully control minimized state
Under wayland we can set minimized but not unset it, nor can we tell
if it's been unset.  This means we can't cache the value, we need to
make the protocol request any time ecore_wl2_window_iconified_set is
called.

ref T6834
2018-04-11 11:48:27 -05:00
Derek Foreman d697e7936b ecore_wl2: Remove (beta) API ecore_wl2_window_iconified_get
We actually can't ever query this, it's clearly defined that way in the
protocol.  There is absolutely no way to ever know if we're iconified.

ref T6834
2018-04-11 11:48:27 -05:00
Derek Foreman 94ddefc6fb ecore_wl2: Send a mouse-up event on reentry after client initiated resize
Apparently when we initiate a client side move in ecore_wl2 we flag that
and send a mouse-up immediately on the next pointer enter.

Do the same for resize.

At some point this might need to be revisited, we should probably be
sending a "cancel" at the start of client initiated move/resize instead
of an up at the end?

Fix T6422
2018-03-20 14:30:39 -05:00
Derek Foreman 7784405ad9 ecore_wl2: Silence a commit ERR on window hide
Cosmetic fix, should be functionally identical.  Hide can be called
asynchronously, so it's ok, and the ERR can be silenced.
2018-03-16 12:48:41 -05:00
Derek Foreman 984d8bd4ce ecore_wl2_window: Silence some spurious warnings
ecore_wl2_window_commit() must be called during window size negotiation,
but this currently trips a warning when no frame callback has been
received for the first commit.  We can't even have frame callbacks at
that point because no buffer is attached.

Don't set up the commit_pending logic until after we have a buffer.
2018-03-14 16:10:14 -05:00
Cedric Bail 012bcff80c ecore_wl2: cleanup input code to string logic to reduce compiler warning and useless memory access. 2018-03-07 10:51:46 -08:00
Chris Michael 59a689faa4 ecore-wl2: Check for valid string before passing to strlen()
As strlen() cannot accept NULL (segfaults), we should check for valid
key, keyname, and compose strings here before passing to strlen().

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-03-07 09:50:58 -05:00
Chris Michael a1bb9b313f ecore-wl2: Reduce calls to strlen
Small patch to reduce calls to strlen when sending key events. This
patch is loosely based on Phab D5567

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-03-07 09:37:25 -05:00
Derek Foreman ec3784774d ecore_wl2: Disable horizontal resize optimization
We had a "clever" optimization that would keep a buffer on resize
if it was resizing up horizontal and fit within the previously
allocated stride.

Unfortunately, there still needs to be a buffer reconfigure between
client and compositor that wasn't taking place.  Remove this for now.
2018-02-27 16:27:56 -06:00