Commit Graph

811 Commits

Author SHA1 Message Date
Stefan Schmidt 0f52bbb00e ecore_evas: add double header include safety
Reported-By: https://lgtm.com/projects/g/Enlightenment/efl
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10887
2019-12-17 09:59:44 +01:00
Christopher Michael dedeb77b02 ecore-evas-wayland: Minor formatting fixes
NB: No functional changes
2019-10-22 10:59:29 -04:00
Christopher Michael 68b107ff59 ecore_evas_wayland: Fix array step size
Fix bug where eina_array step size was being increased by 10 everytime
a handler was pushed to the array. There is no need to increase array
size by 10 each time we add 1 pointer to handler.

@fix
2019-10-22 10:12:51 -04:00
Christopher Michael f7fdb9c7f6 ecore-evas-wayland: Add handler to array
Small patch to fix bug where last event handler was not being added to
the event_hdls array

@fix
2019-10-22 10:11:24 -04:00
Christopher Michael 520b844f4a ecore-evas-wayland: Minor formatting fix
NB: No functional changes
2019-10-22 10:06:23 -04:00
Christopher Michael ea2b24b182 ecore-evas-wayland: Minor formatting fix
NB: No functional changes
2019-10-22 10:04:01 -04:00
Mike Blumenkrantz 7a122db342 efl/engines: fix null derefs
Summary: CIDs 1402640, 1402709

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10448
2019-10-18 13:29:44 -04:00
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
Mike Blumenkrantz fddc27ed40 ecore-evas/x: detect and track wm existence, apply visibility correctly
Summary:
this attempts to monitor the _NET_SUPPORTING_WM_CHECK atom to verify whether
a wm exists, and bypasses waiting for a configure event from a nonexistent wm
if the screen is not currently managed

fix T7838

Depends on D10014

Reviewers: devilhorns

Reviewed By: devilhorns

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

Tags: #efl

Maniphest Tasks: T7838

Differential Revision: https://phab.enlightenment.org/D9900
2019-09-26 11:22:44 -04:00
Vincent Torri 01b987df59 make mman.h private
Summary:
integrate mman.h to make Evil private to the EFL, as mman.h does not exist on Windows. After a discussion with raster, i include sys/mman.h only on non Windows platform.

One issue, though, is that src/modules/emotion/generic/Emotion_Generic_Plugin.h has inlined functions using mmap()

Test Plan: compilation on Windows

Reviewers: cedric, raster, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9542
2019-08-19 09:55:13 -04:00
Carsten Haitzler b6bc80d2da ecore evas drm - fix code that forgets to del an fd handler
also.. note the badness of the code design mixing a global singleton
with a "per struct" set of data like fd handlers for the same devices
initted only once but... anyway. it's messy.
2019-08-07 18:14:06 +01:00
Christopher Michael b273bf7f9a ecore_wl2: Move ecore_wl2_window_rotation_change functions to be
internal

These functions are not used in efl wayland clients nor are they used
in Enlightenment. As such, there is no reason that they need to be
public API so this commit moves them to be Internal and updates
Ecore_Evas engine code to include the internal header.

ref T8013
2019-08-06 08:40:41 -04:00
Carsten Haitzler 9ea4bb8fc7 ecore evas drm - fix multi-dlopening of lib into symbol space
only load libglapi once... not multiple times by storing static ptr to
lib handle.

fix CID 1402692
2019-08-05 13:55:38 +01:00
Carsten Haitzler d9dbd2fbea ecore evas x and e sync rendering - disable as it's unused
this has been optional and unused by e for a very long time ot try
sync front-buffered software rendering with the wm/compositor. we may
as well remove the bloat that is here that is unused... it's been
inactive for many years anyway.
2019-08-02 16:41:12 +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
Vincent Torri 7a882ab02c ecore_evas win32: fix warning reported by clang
Test Plan: compilation

Reviewers: zmike, raster, cedric, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9025
2019-05-27 15:58:51 +09:00
Christopher Michael af70c4ff6d ecore-evas-drm: Check if vblank is supported
Small patch to check if the video driver supports drmWaitVBlank. If
not, we can fall back to timer based animators and avoid freezing (due
to usage of vsync'd animators).

@fix
2019-05-22 07:44:00 -04:00
Mike Blumenkrantz 741a4313f0 meson: remove semicolons in windows build
Summary: Depends on D8859

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8860
2019-05-08 10:14:48 -04:00
Mike Blumenkrantz c1b638dfa4 meson: fix and enable win32 ecore-evas engine build
these defines must be set in order to provide the expected engine functionality

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8733
2019-05-06 17:00:55 +02:00
Mike Blumenkrantz 9922f08de0 meson: add sdl deps for corresponding ecore-evas engine
this fixes the sdl engine build
Depends on D8730

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8731
2019-05-06 17:00:54 +02:00
Carsten Haitzler fd5d87a26c ecore evas drm - make vsync animators a possible ifdef
this makes it easyeir to swizzle on and off
2019-04-30 11:51:06 +01:00
Hermet Park 1c974289e4 ecore_evas wayland: fix a build break.
Summary: missed changing here.

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8712
2019-04-25 18:56:39 +09: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
Christopher Michael b36833f49b ecore-evas-x: Fix double free
Coverity reports, and reading the code confirms, that the variable
'out' has already been freed (or is NULL) when reaching this line of
execution.

Fixes CID1382851

@fix
2019-04-24 08:52:02 -04:00
Marcel Hollerbach d40b18540e meson: enable strict linking
Summary: with this commit you can compile efl with -Wl,-z,defs.

Reviewers: zmike

Reviewed By: zmike

Subscribers: simotek, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8677
2019-04-23 09:06:52 -04:00
Christopher Michael 8011277dfc ecore-evas-drm: Enable rotation to work again
Summary:
This patch removes the ability to do hardware rotation (it's broken
anyway), and refactors the _drm_rotation_do function to just use
software (ecore_evas & evas) rotation.

ref T7690

Depends on D8115

Reviewers: raster, cedric, zmike

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8116
2019-03-22 12:41:29 -04:00
Mike Blumenkrantz 98e37dd123 ecore-evas/extn: use evas from events when updating key masks
Summary:
plug canvases do not have ee->evas, so this fixes unlimited error messages
while also fixing the corresponding functionality

@fix
fix T5536

Reviewers: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T5536

Differential Revision: https://phab.enlightenment.org/D7681
2019-01-22 12:05:32 -05:00
Christopher Michael 31475f80a0 ecore-evas-drm: Minor formatting fix
NB: No functional changes
2019-01-17 10:58:43 -05:00
Christopher Michael 374373a370 ecore-evas-drm: Refactor _ecore_evas_new_internal
This patch does a small refactor of _ecore_evas_new_internal function
to separate canvas setup for gl & software. This was done so that when
we create a canvas on a per-output bases (multi-output support), the
code inside _ecore_evas_new_internal will be cleaner and easier to
follow.

NB: No real functional changes here until muti-output lands

Differential Revision: https://phab.enlightenment.org/D7679
2019-01-17 09:37:39 -06:00
Christopher Michael 8079d6d38a ecore-drm2: Pass output as data to drmModePageFlip and drmModeAtomicCommit
In order to support per-output ticking, the drmModePageFlip and
drmModeAtomicCommit functions need to pass the actual Output as data
to the pageflip callback so that the pageflip callback function can
pass the proper rectangle to ecore_evas_animator_tick

Differential Revision: https://phab.enlightenment.org/D7678
2019-01-17 09:37:33 -06: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
Carsten Haitzler 0bec6826b1 ecore evas extn - warn - ensure all fields in ecore evas func struct set 2018-11-09 11:44:00 +00:00
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
Mike Blumenkrantz 69fae8c7bf evas: remove render2
Summary:
this is more or less a dead project, having not been actively developed
in over 2 years and instead forcing people to expend more time and energy
to keep it compiling across refactors

fix T7227

Reviewers: stefan_schmidt, Hermet, ManMower, devilhorns

Reviewed By: Hermet, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7227

Differential Revision: https://phab.enlightenment.org/D6878
2018-08-21 10:36:55 -04: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
Mike Blumenkrantz 631fd714c3 ecore-evas/x: rework draw_block unsetting from ConfigureNotify
Summary:
draw_block should only be unset if the event is triggered by the wm
or the window is an override, otherwise it prematurely begins rendering
the window at a size which may or may not be accurate

ref T7008

Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: ManMower, cedric, #reviewers, #committers

Tags: #efl_display_system

Maniphest Tasks: T7008

Differential Revision: https://phab.enlightenment.org/D6793
2018-08-14 17:11:32 -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 91a4bcd10e ee_drm: Fix tick job timestamps for funny GPU clocks
Summary:
The animator timestamps were only getting the offset applied when they
came from page flips.  The "early tick" logic failed to apply the offset.

This likely only changes behaviour on vmware's graphics stack, and
only the env var ECORE_EVAS_DRM_GPU_CLOCK_WRONG is set.

Reviewers: devilhorns

Reviewed By: devilhorns

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6792
2018-08-08 16:58:33 -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
Derek Foreman e382bac1a0 wayland: Fix elementary setting window parents at creation time
Summary:
We need to pass the entire pointer, not just 32-bits of it.

Fixes a crash with enlightenment sandbox gadgets where
ecore_wl2_window_alpha_get() is called with an invalid pointer while
trying to display a pop-up.

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6775
2018-08-08 09:37:30 -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
Mike Blumenkrantz 4aad39ce03 ecore-evas-x: set draw_block until the window receives a configure event (#2)
Summary:
drawing a non-override 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

this patch improves upon the previous version by handling the case of windows
which are created with the correct initial size, bypassing an initial configure
event

there is still a lot of work to be done in this engine to improve/consolidate
resize-related code and ensure protocol correctness

ref T7008
fix T6907

Reviewers: devilhorns, ManMower

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7008, T6907

Differential Revision: https://phab.enlightenment.org/D6275
2018-06-27 13:49:57 +09:00