Commit Graph

96 Commits

Author SHA1 Message Date
Derek Foreman 398771bf8a evas_engines: Add fn_evas_changed callback
To allow using the pageflip completion event to drive timing in the DRM
engine we need to know as soon as possible that a render has been after
a render has been considered if it will cause a page flip or not.

The fn_evas_changed callback sends this information.
2016-09-08 13:55:23 -05:00
Jean-Philippe Andre 014295fbc9 ecore_evas: Fix mouse in/out events
Apparently I broke some inputs in E (efm) like mouse wheel.
Somehow the list of objects where the pointer is in was NULL.
This was because the mouse_in/out events were not matched to
the proper window ID.

Fixes T3760
2016-06-02 14:19:18 +09:00
Jean-Philippe Andre 8e31929aab Efl.Pointer.Event: Add dup() method to copy an event 2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 05dfab8442 ecore_x: Pass in/out through ecore_input_evas
This whole input system is a massive mess. It looks like spaghetti.
Long live the giant flying monster.

This commit changes how some events are propagated in X.

Before:
 ecore_x -> evas_event -> evas

After:
 ecore_x -> ecore_input_evas -> ecore_evas -> evas_event -> evas

There are still inconsistencies between events and between X and WL,
but ecore_evas should be used for all events since it rotates the
inputs.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 5aa00004a5 ecore_evas: Register direct input cb from modules
If the ecore_evas modules were using
ecore_event_window_register() then they can also redirect
everything though the direct callback instead.
2016-05-31 19:03:04 +09:00
Carsten Haitzler 59d32121d6 ecore evas: remove printfs
forgot i still had them (wa stestign wayland with no printfs in it)
2016-02-20 23:12:17 +09:00
Carsten Haitzler ab31424ea6 ecore evas: fix configure request queue count to only count changes
we counted more requests outstanding than actually existed for x11 as
we sometimes sized to the SAME size or position. this keeps that
number more correct only incremeting outstanding count if we change.

@fix
2016-02-20 23:09:03 +09:00
Cedric BAIL bb1a1eef65 ecore_evas: introduce support for per window animator trigger.
This code is currently only using the older fallback code and not any
new event source, so all animator on all window are still triggered
whatever the case are.
2016-02-02 10:47:25 -08:00
Stefan Schmidt eb78bb2d24 ecore_evas x engine: use Eina_Bool for one-bit bitfield
Make sure we are using a unsigned var here. Best go with a Eina_Bool directly.
2015-11-13 13:31:34 +01:00
Carsten Haitzler 6a90df70bf ecore-evas x - solve internal window size flickrs in e
so there is an issue that e brings out where configure events get
queued and deferred AND e ends up requesting a new size, but new size
is wrong as its read from an old event (requested size is updated) and
in the end ecore-evas doesnt request the actual new size because
current w/h is "the same" even though it isn't... bah - it's complex
and a self-feeding event issue. just doing the move/resize solves it.

@fix
2015-10-09 13:06:20 +09:00
Mike Blumenkrantz b209100870 ecore_evas-x11: unset withdrawn flag when showing the ecore evas
while the window map event seemed like a reasonable place to unset
the withdrawn state at the time, studies and further tests have proven
that the direct show callback is even more reasonable and effective

ref T2745
2015-09-25 22:21:25 -04:00
Mike Blumenkrantz e31c703661 ecore_evas-x11: unset withdrawn state when window is mapped
according to ICCCM 4.1.4:
Newly created top-level windows are in the Withdrawn state.
Once the window has been provided with suitable properties,
the client is free to change its state...
...
Only the client can effect a transition into or out of the Withdrawn state

given that no external force can (according to spec) transition a
window out of the withdrawn state, this must be done at a reasonable
point. mapping the window seems like a reasonable point to me.

fix T2745
ref 5954289c6c

@fix
2015-09-25 21:57:37 -04:00
Seunghun Lee b38b349262 ecore-evas-x: resize window when it is rotated by window manager.
Summary:
window manager can send arguments and its meaning as follows.

1) resize:0
it means client window doesn't need to resize its window by rotation.
this case is a ELM_WIN_BASIC window in mobile profile.

2) resize:1, ee->w != w, ee->h != h (deprecated)
it means client window should be resized by rotation, and wm already resize its window.
so, client don't need to resize its window.
it's just for backward compatibility.

3) resize:1, ee->w == w, ee->h == h (addition)
it means client window should be resized by rotation, and wm don't resize it.
so, client should resize its window.

Test Plan: N/A

Reviewers: gwanglim, raster, jypark, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2831
2015-07-29 11:14:11 -04:00
Seunghun Lee 3adb6127ff ecore-evas-x: fix typo
Test Plan: N/A

Reviewers: gwanglim, raster, jypark, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-07-28 03:05:37 +02:00
Ji-Youn Park 8c66b70aa9 ecore_evas: fix iconified state set bug
if app set iconified state false, ecore evas call activate instead of show.
2015-06-26 19:18:09 +09:00
Carsten Haitzler 25983dcedd evas render2 work - begin to make rectangles deal with render 2 basic
infra
2015-06-09 17:34:39 +09:00
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Chris Michael c66275c99b ecore-evas-x: Fix issue of wrong interface function pointer being set
Summary: This fixes Coverity CID1267461 where the pointer to the
interface shape_input_reset function was being assigned multiple
times. It looks like this is just a copy/paste error.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-20 12:58:42 -04:00
Wonsik Jung 25502e37f8 evas_gl: Add feature to set depth/stencil/msaa bit to window surface.
Summary:
When Evas GL runs with direct rendering, it can not set depth, stencil and msaa to Window surface.
This patch is possible to use "option" input paramater of ecore_evas_gl_x11_options_new.
So, new API is not needed.

The other patch is in elementary. The elementary patch will be used this patch.

Test Plan: Test elm gl veiw in elementary_test and JP's test app.

Reviewers: spacegrapher, cedric, raster, jpeg

Reviewed By: jpeg

Subscribers: cedric, mer.kim

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Note: jpeg changed the original patch a bit (fix style and depth value)
2015-03-16 14:50:56 +09:00
Mike Blumenkrantz 7171135792 ecore evas should not crash when unsetting pointer
ref D812

disappointed.jpg
2015-02-06 17:54:08 -05:00
Carsten Haitzler e483d25082 ecore-x - undo api/abi break with input selecting before release 2015-02-04 18:58:48 +09:00
Mike Blumenkrantz 6a934f703c ee engines should not crash when re-setting the same title/name_class
@fix
2015-01-22 14:39:10 -05:00
Mike Blumenkrantz 836650e364 ecore-evas-x should check itself before it wrecks itself when re-setting the same name/class 2015-01-15 01:30:27 -05:00
Myoungwoon Kim 10582235c5 ecore_evas_x: Free XCounter values leak.
Summary:
Whenever creating a window via elm_win_add(), save netwm_sync_counter values to edata->netwm_sync_counter
by ecore_x_sync_counter_new().
However, never free the values when a window has been destroyed.
So this patch is for free the values in _ecore_evas_x_free().

@fix

Reviewers: cedric, raster, Hermet, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D1855
2015-01-08 08:35:55 -05:00
Hosang Kim cc89a541de ecore_evas_x: Fixed strange condition.
Summary:
To satisfy this condition, ee->visible will be EINA_FALSE. But when iconify is requested, ee->visible is usually EINA_TRUE.

@fix

Reviewers: raster, Hermet, seoz

Reviewed By: seoz

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1710
2014-11-29 01:10:39 +09:00
Jason Gerecke 26c943bac0 Expose device (e.g. pen) axis information to applications
Summary:
This patch set adds the necessary code to expose device axis state to applications. This was primarily written with graphics tablets in mind, which -- in addition to acting like a mouse -- also provide information about pen pressure, tilt, etc. Other devices could potentially benefit from this API as well: touchscreens, joysticks, knob controllers, "spaceballs", etc.

Whenever an update to the device state is recieved, an "Axis update" event is synthesized. This event contains the updated information, typically scaled and normalized to a particular logical range (e.g. zero to one for pressure, -pi to pi radians for angles, etc.). Information about the tool which generated the event is also stored so that applications can disambiguate events from multiple devices (or in the case of multitouch screens, individual fingers).

This API is only wired up for use with X11 at the moment. Support for other backends (e.g. Wayland) should be easy to add for those familiar them.

**Note**: The following is a list of changes from the "v2" patches originally sent to the mailinglist

//Define and implement new Ecore_Event_Axis_Update events//
 * Harcode axis labels instead of including xserver-properties.h
 * Use C89-style comments
 * Use doxygen comments
 * Update comment text to note axes with unbounded/undefined ranges/units
 * Create "Ecore_Axis" and "Ecore_Axis_Label" typedefs
 * Reference typedef'd instead of raw types
 * Adjust how we count through valuators to support tilt/az
 * Add support for tilt and azimuth
 * Tweak memory management in case number of valuators differ
 * Expand TWIST axis normalization to declared range
 * Only normalize TWIST axis if resolution == 1 (wacom bug)
 * Cache label atoms on first use to minimize round-trips

//Implement EVAS_CALLBACK_AXIS_UPDATE event and friends//
 * Update to doxygen comments
 * Update comment text to note axes with unbounded/undefined ranges/units
 * Typedef 'Evas_Axis_Label', 'Evas_Axis'
 * Move typedef for 'Evas_Event_Axis_Update'
 * Reference typedef'd instead of raw types

//Wire the Ecore and Evas implementations of axis update events together//
 * Expose ecore_event_evas_axis_update in Ecore_Input_Evas.h
 * Move ecore_event_evas_axis_update to more logical position

//DEBUG: Add axis update logging to evas-multi-touch.c//
 * Removed from patch set

//Make evas-multi-touch demo use new axis functionality//
 * Have pressure adjust rectangle brightness instead of size
 * Use more available axis data when rendering rectangle (azimuth, tilt, twist)

Test Plan: The evas-multi-touch demo was updated to support axis update events. A graphics tablet was then used to verify that the pressure, azimuth, tilt, and twist data was coming through correctly.

Reviewers: cedric, raster

Subscribers: cedric

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

Conflicts:
	src/lib/ecore_input/Ecore_Input.h

Carsten Haitzler -

** fixed forward enum typedefs (make things unhappy)
** fixed conflict above
** fixed wrong param type for _evas_canvas_event_feed_axis_update()
** fixed @sinces to be 1.13
** fixed formatting/indeting
** fixed order of operation reliance in if's with ()'s to be clear
** fixed functions to be static that should have been
2014-11-25 12:43:15 +09:00
Carsten Haitzler 516691de9b ecore-evas - fix focus skip flag to be one way
this fixes focus skip being set if someone else sets skip
pager/taskbar. it's a one-way prop. if focus skip is set THEN skip
pager/taskbar is set. not the other way.
2014-11-23 22:01:34 +09:00
Carsten Haitzler 5954289c6c ecore_evas - ecore_evas's should start withdrawn then normal on show
this fixes initial state of an ee where you couldn't detect when the
window had been accepted by the wm (goes to normal state from
withdrawn).

@fix
2014-10-29 19:34:33 +09:00
Carsten Haitzler 696346c467 evas gl rgba visual/rendering fix try ... again
so this is a re-try at the evas gl destination alpha fix. this is what
cedric tried, but done RIGHT. it required adding an ecore_x call to
create a window with correct visual/colormap. it requires doing
visuals totally correctly all the way from ecore_evas to the evas
gl_x11 core. nvidia drivers are very picky about visuals. i also had
to vid the egl/gles code too to do the same thing. nvidia gles/egl
drivers are also picky, mesa is not. this all requires a lot of code
changes. it's far from trivial

this isn't backported for a few reasons:

1. verify this fix doesn't break for anyone.

i tested:

nvidia glx + egl/gles
intel glx + egl/gles
radeon glx

it needs wider testing. nouveau, fglrx for starters and maybe
some other gles/egl drivers.

2. have some review time
3. time to settle before blasting to stable branches

@fix
2014-10-26 00:34:40 +09:00
Cedric BAIL 08521b77ec ecore_evas: let's be consistent and always report an error. 2014-09-30 18:19:15 +02:00
Gwanglim Lee a9a7ed6c52 ecore_evas: Ecore_Evas_X - Fix broken rendering during rotation with resize
Summary:
When ee is trying to do rotation, ee should check whether given rotation value
is portrait or not. Then it sets output size of evas canvas according to rotation value.
But, ECORE_EVAS_PORTRAIT macro used in ee x engine only checks ee's rotation value, even
if ee's rotation value is not updated yet. Thus we should change the logic to compare with
given rotation value, not ee's rotation, before setting output size of evas.

This fixes T1371 problem.
@fix

Test Plan:
1. run elementary_test -to "window states"
2. check resize
3. rotation 0 ~ 270

Reviewers: jpeg, raster, cedric, zmike, devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric

Maniphest Tasks: T1371

Differential Revision: https://phab.enlightenment.org/D1351
2014-08-27 19:35:27 +09:00
Cedric BAIL 5747c6fcea ecore_evas: Ecore_Evas_X - make sure that ecore evas post render is always called.
This fix a case where when doing asynchronous rendering and no update was done,
the post render evas event would never be triggered and so no call to ecore evas
post render callback were made. Now the async X backend follow all other backend
behavior.

@fix
2014-08-21 12:33:37 +02:00
Carsten Haitzler 8ea2356bcd fix coverity leak detection in ecore_evas_x hints...
this fixes CID 1188012
2014-08-13 16:15:42 +09:00
Carsten Haitzler 2da95771d4 ecore-evas - enable attempting to turn on dri2 vsync
this enables the x11 dri2 vsync enabling code for x11 ecore-evas
2014-07-25 14:45:50 +09:00
Chris Michael edb1202a84 ecore-evas: Fix formatting and remove whitespace
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-06-25 13:20:49 -04:00
Chris Michael 87af84c3e3 ecore-evas: Fix cursor position getting reset to 0,0 when using
ecore_evas_cursor_object_set

NB: Previously, if we mad calls to ecore_evas_cursor_object_set to update the
mouse cursor hotspot, the mouse cursor would be repositioned at 0,0 on
the canvas due to x & y being set to 0,0. We fix that here by fetching
the current mouse position Regardless if we are changing the object or
not (ie: perhaps we are just updating the hotspot and not the object)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-06-25 13:20:49 -04:00
Guillaume Friloux 5d053c7549 Fix unused var warning. 2014-05-30 14:34:13 +02:00
Guillaume Friloux 68e55258d1 Fix unused var warning 2014-05-30 14:26:55 +02:00
Guillaume Friloux e1c6438007 Fix unused var warning. 2014-05-30 14:24:42 +02:00
Cedric Bail 2401bb047d ecore_evas: avoid using non initialized value for cursor position in X backend.
CID 1195445.
2014-04-17 21:16:12 +02:00
Carsten Haitzler 165efe2254 ecore-evas - fix object cursor to not delete the same cursor when set
this fixes a misbehavior with ecore evas object cursors when you set
one, the old one is deleted, but if the old is the same, the new one
you set gets deleted, rather than just updated.

@fix
2014-04-02 20:47:28 +09:00
Chris Michael 58c5edd9af ecore-evas-x: Fix resource leak from eina_str_split_full usage
@bugfix: This fixes Coverity CID 1188012

Coverity reported resource leak from eina_str_split_full return which
was only being freed if the number was > 0. This is incorrect as
eina_str_split_full will still allocate the array and thus it should
be freed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-05 14:36:39 +00:00
Chris Michael 8e48e864ae ecore-evas-x: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-05 14:32:15 +00:00
Gwanglim Lee cbf6f94c80 ecore_evas: Added support for window auxiliary hint
Summary:
The window auxiliary hint is the value which is used to decide
which actions should be made available to the user by the WM. If you
want to set specific hint to your window, then you should check whether
it exists in the supported auxiliary hints that are registered in the
root window by the window manager.

Once you've added an auxiliary hint, you can get a new ID which is used
to change value and delete hint. The window manager sends the response
message to the application on receiving auxiliary hint change event.

A list of auxiliary hint within the Ecore_Evas has this format:

  ID:HINT:VALUE,ID:HINT:VALUE,...

Reviewers: raster, cedric, seoz, Hermet

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D543
2014-02-28 07:20:01 +09:00
Gwanglim Lee 77092d94d4 ecore_evas: added window manager rotation to manage the rotation of windows by the WM.
Summary: The window manager rotation allows the WM to controls the rotation of application windows. It is designed to support synchronized rotation for the multiple application windows at same time.

Reviewers: raster, seoz, cedric, Hermet

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D529
2014-02-09 09:46:51 +09:00
ChunEon Park 892b1c5be3 ecore_evas - applied macro to check rotation state.
also, let the potrait compare on the higher priority.

if you can suggest better macro name, then please modify it.
2014-01-18 22:26:10 +09:00
ChunEon Park 8cd92c17e0 Revert "ecore_evas - use the macro orthogonal check."
This reverts commit 43acf1e82f.

some partial changes are incorrectly applied.
2014-01-18 22:04:25 +09:00
ChunEon Park 43acf1e82f ecore_evas - use the macro orthogonal check. 2014-01-18 21:53:56 +09:00
ChunEon Park fb59ac34a1 ecore_evas - use eina_bool instead of the char for interal data. 2014-01-13 14:26:36 +09:00
Daniel Juyung Seo d4a3b9a233 ecore_evas_x: Call _ecore_evas_x_sync_clear() after
_ecore_evas_x_gl_window_new() to ensure eglDestroySurface is called
before XDestroyWindow call.

In case of gl engine, eglDestroySurface should be called before
XDestroyWindow.
Special thanks to Changwoo Kim <ce2010.kim@samsung.com> for the idea.
2014-01-12 17:22:40 +09:00