Summary:
eina_inarray_new returns NULL if malloc fails. This check was not performed. So have added the check for the error case and returning NULL if any of it fails.
@fix
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1807
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
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
Summary:
DND does not work in X11 because we cannot set type.
The f8e036d5af causes this.
Since the xdnd type list does not exists at the beginning,
if we always return without setting new property, we cannot set dnd type.
This patch brings dnd work again by correcting the type set operation.
@fix
Test Plan: Try dnd tests in elementary_test.
Reviewers: raster, woohyun, JackDanielZ
Reviewed By: JackDanielZ
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1578
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
this fixes drm vsync discovery when you have both drm and nvidia
drivers seemingly present in /dev but the intel drivers are the dri
ones and nvidiactl is there (who knows if it's used). keep the nvidia
drivers working too with a name/desc check on drm driver as the drm
driver is in fact nvidia's own and set flags appropriately
@fix
NB: This reintroduces the Coverity Resouce Leak detected with CID1039276
Summary:
When ecore_x_window_prop_property_get returns 0, data is already NULL hence
no need to free NULL value. This fault was introduced in 45a2296218
while fixing coverity defects.
Reviewers: seoz, cedric, raster, devilhorns
Subscribers: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D1473
Summary:
On Ubuntu 14.04 it makes a 32 bit depth window un-responsive
to any XEvent.
Reviewers: cedric, raster
Reviewed By: raster
Subscribers: raster, capOM, cedric
Differential Revision: https://phab.enlightenment.org/D1236
i hope this addresses CID 1229131 - don't trust the DISPLAY var
content much at all - limit it to [a-z][A-Z][0-9][-] only. hopefully
coverity is happier.
there is a kernel oops when using vboxvideo 4.3.14 and one calls
drmWaitVBlank(), then do not init drm when using such driver.
https://www.virtualbox.org/ticket/13265
It seems that when things go wrong it does happen that we start with i == 0. It
will then have been walking into info[-1] 'happily'. Changing the test, to first
decrement and then compare should stop that issue.
This should @fix T1467.
this uses a thread to collect vsync input events and filter them
before forwarding them to the mainloop (as a double timestamp). this
means wakeups only happen for the actual vsync and thus animator and
not for other screens we are filtering out anyway. this should fix the
continual animator wakeups that happen if you have a dri/drm based
driver and > 1 screen.
due to mesa changes to hide dri2 symbols, i have had to work on a fix
that makes this work again by going right to drm. now it works and
animators shoudl be vsynced on drm drivers if possible (only 1 card -
use card 0). already existing nvidia solution that uses a lot more
memory is there. others - no support. timers only
this adds a slave process that is useful on nvidia drivers as there
isn't another way to get vsync evenys (that i know about). i need to
make another slave process to that includes a dri2 protocol
implementation since mesa has now hidden its dri2 symbols.
bugfix@: As we have support in the Ecore_Event structure for storing
keycode on key press/release, let's utilize it. This will simplify
wayland compositor code as we won't have to parse key names to get the
keycode.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
this technically adds a feature - it adds non-mitshm support for
ecore_x image grabbing, but that fixes a bug. it doesn't touch xcb
support though.
this fixes T1127 andshould probably be backported.
@fix: Fix building Enlightenment without X support
These changes are needed so that we can build Enlightenment without X
support. Many places in the E code reference
Ecore_X_Atom/Ecore_X_Icon. If we build E without X support, these end
up being undefined, causing build to fail, so we need to predefine them.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
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
This fixes valgrind reporting lost bytes when selecting text (e.g. in entry).
Can be reproduced in any program that has entry:
Simply run it with valgrind, select any text, and then exit.
Fixed by properly freeing the selection data, since it is either cleared or replaced.
Also, changed argument in sizeof since it didn't match the type of selections[in].
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
apparently I read the commit order wrong and this fix went in for 1.4.0, not 1.3.2, which means anyone who has 1.3.2 has been having lots of fun crashes for the past 24 hours
this was a fixme which was likely written sometime before July 2010 when the bug was fixed, just prior to the 1.3.1 release. I think it's probably okay to require that release since it's been 3+ years.
Summary:
If the property was successfully fetched the number of items stored in
val is returned, otherwise -1 is returned.
Note: Return value 0 means that the property exists but has no elements.
Reviewers: seoz
Reviewed By: seoz
CC: cedric
Differential Revision: https://phab.enlightenment.org/D457
Summary: Add data set case of selection event for XDND selection if selection atom is XDND
Reviewers: raster
Reviewed By: raster
CC: JackDanielZ, woohyun, Hermet, seoz, cedric
Differential Revision: https://phab.enlightenment.org/D446
this makes efl ignore certain env vars for thnigs and entirely removes
user modules (that no one ever used) etc. etc. to ensure that *IF* an
app is setuid, there isn't a priv escalation path that is easy.
- No need for a separate xcb_connection here as we already have a
connection at this point so let's use that.
- Fix up formatting.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
Being annoyed by different types of eina critical macros - CRI, CRIT,
CRITICAL -, I concluded to unify them to one. Discussed on IRC and
finally, CRI was chosen to meet the consistency with other macros -
ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
size_ret is used later as an argument for malloc, so it should be
positive. In addition this should ensure that
ecore_x_window_porp_property_get returns a positive value and is true if
we malloc data.
Hopefully also fixes CID 1135636
As bounds is a pointer, bounds + num will always be postive, so this is
an eternal loop. In addition, XFixesInvertRegion only accepts one
region, so num must be 1.
Fixes CID 1039469
Data returned from ecore_x_window_prop_property_get are malloced, so use
free, not XFree. Which also is consistent, as free was used on other
occasions.
I give up. people continually complain about these and submit them as crashes, so now they're only visible if you set ECORE_X_SYNC. the next step is an #ifdef ISCOMFITOR.
NB: Cannot really happen for 1.8 (as --disable-ecore-x-randr has no
effect), but really these should have been ifdef'd from the start.
NB: IMO, Don't think a ChangeLog is really needed for this....
Signed-off-by: Chris Michael <cp.michael@samsung.com>
the ECORE_X_SYNC environment variable exists to make ecore-x debugging synchronous.
printing X errors as they occur is useful for application developers; errors should not
be silenced just because they are inconvenient or plentiful.
because an error with no idea where it came from since its async is
pretty much usless noise. if you want this to be useful you literally
need to do an xsync every x call and be able to get backtraces... the
xsync then would be inside ecore-x. and of course this would be so
nastily slow that you need to make it an option at build...
allocate space for 'data'. If we return before using it, then free
'data'. If we use it later for XGetAtomName, then we can free if After
we have gotten the atom names and sent the event. (NB: XGetAtomName
will allocate it's own space for the returned name, so this is safe).
NB: Fixes Coverity CID1039271
Signed-off-by: Chris Michael <cp.michael@samsung.com>
allocates space for 'data'. We need to free that if we are going to
return before using it.
NB: Fixes Coverity CID1039270
Signed-off-by: Chris Michael <cp.michael@samsung.com>
returned from window_prop_property_get (as that does an allocation).
NB: Fixes Coverity CID1039266
Signed-off-by: Chris Michael <cp.michael@samsung.com>
getting window netwm types, then free any atoms returned by
prop_atom_list_get.
NB: Fixes Coverity CID1039265
Signed-off-by: Chris Michael <cp.michael@samsung.com>
declared our 'roots' variable as Ecore_X_Window, but were allocating
as 'Window').
buffer_alloc: "malloc(num * 8UL)" allocates memory.
CID 1039601: Allocation size mismatch (SIZECHECK)
5. incorrect_multiplication: Allocating a multiple of 8 bytes to
pointer of type Ecore_X_Window, which needs 4 bytes.
NB: Fixes Coverity CID1039601
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Add ecore_x_input_raw_select function placeholder:
NB: xcb does not have xinput 2 support yet BUT someone added those
functions to the xlib code WITHOUT adding them to the xcb code.
SPANK SPANK !!
Signed-off-by: Chris Michael <cp.michael@samsung.com>
LMAO: xcb stuff did not even compile because of this ... and how knows
how long it has been broken ...
Signed-off-by: Chris Michael <cp.michael@samsung.com>
not noticed until recently.. we add a nul byte to the end of our text
selections that we shouldnt. most toolkits/apps skip it but some..
like emacs... dont.