Commit Graph

260 Commits

Author SHA1 Message Date
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Mike Blumenkrantz ae095bb5c5 ecore-x: use async pointer grab mode in ecore_x_window_key_grab()
using a sync grab here causes the device to be frozen in the xserver,
preventing any event processing on the device until the grab ends. it also
prevents new grabs, such as the ones which would be created by xkill when
launched from a keybinding; this means that as long as the grabbed key is
held, the pointer is effectively dead to the world.

I attempted to find the reason for using sync pointer grabs here,
but the original commit message was:

  aaaahmmm.. no.. this.. oops

see https://git.enlightenment.org/legacy/ecore.git/commit/?id=f62faeae288fc8211d5f97b43d3b81de87db0942

fix T2228
2015-04-29 22:05:44 -04:00
Carsten Haitzler efdca32fe8 ecore_x - axis events - if event struct alloc fails, free axis data
this frees the axis data coming in if struct alloc fails - should
basically never happen, but if it does we don't lose axis data as
caller asumes this data will be freed in the event

related to CID 1256115
2015-04-21 10:32:40 +09:00
Carsten Haitzler 9a03009364 ecore x vsync - ensure drm fb is set to close on exec - intended
@fix - minor - fixes T2138 as muc as efl can (dri card0 file)
2015-04-11 09:45:26 +09:00
Jean-Philippe ANDRE 0ef41604e8 Ecore: Use calloc() to initialize Ecore_Event_Key fully
Some fields (eg. data) may not be properly initialized.
Use calloc() instead of malloc() will ensure proper initialization
even if we add more fields.

These fields (data) would even be passed down to Evas as
Evas_Event_Key_Down for instance.
2015-03-25 15:34:23 -07:00
Chris Michael 99e0695e42 ecore-xcb: Fix 'variable set but not used' message
Summary: As we do not use the returned Ecore_Event here, there is no
need to assign it

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-27 09:44:16 -05:00
Stefan Schmidt 5f1ea9403f ecore_x/xcb: Remove xcb-xprint code to get the root window list and use fallback
This was the only user of xcb-xprint and we already have a fallback in place for
it. I talked to Chris about it and he was fine with it before his morning coffee.
More serious this should be ok and we can get rid of this part which starts to
make trouble in distros by now. E.g. gentoo is disabling it completely and many
others just ship upstream which means no pc file. Arch seems to patch it in but
we are on the safe side with just using the fallback.
2015-02-27 15:19:34 +01:00
Chris Michael 5030782290 ecore-x: Port deprecated API and new API function to xcb
Summary: This ports the deprecated screensaver_suspend and new API
screensaver_suspend to work with xcb.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-04 11:28:01 -05:00
Chris Michael 52564251bc ecore-x: Deprecate old misspelled API function and add new one
Summary: This deprecates the old misspelled screensaver_suspend API
function and adds a new one.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-04 11:26:53 -05:00
Chris Michael cf9f64cfc6 ecore-x: Deprecate misspelled screensaver API function
Summary: This API function is misspelled, so after speaking with
Stefan, we've decided to deprecate this function add add a properly
spelled one.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-04 11:26:46 -05:00
Carsten Haitzler e483d25082 ecore-x - undo api/abi break with input selecting before release 2015-02-04 18:58:48 +09:00
Chris Michael 5987b1c702 ecore-xcb: Add missing EINA_UNUSED for function paramater
Summary: Depth is not used in the ecore_x_window_full_new function, so
add missing EINA_UNUSED

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 11:04:51 -05:00
Chris Michael 10c4a78281 ecore-xcb: Fix ecore_x_window_full_new function to compile again
Summary: Let's use the proper variable names when assigning return
mask values.

NB: How did all this even get Into git with someone checking it and
compiling it ??

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 11:04:50 -05:00
Chris Michael 1ba4cb369f ecore-xcb: Fix function formatting
Summary: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 11:04:50 -05:00
Chris Michael 583c1300c1 ecore-xcb: Fix compiler build break
Summary: Use proper variable name when when trying to free selections
data

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 11:04:50 -05:00
Chris Michael 5b67da7c92 ecore-xcb: Fix unused paramater compiler warning
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 11:04:50 -05:00
Chris Michael 7bf29561e6 ecore-x: Fix build error in xcb
Summary: If we do not get the property we are looking for here, then
reset the Proper variable to 0. This fixes a build break.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 11:04:50 -05:00
Chris Michael c466fc7d53 ecore-x: Use proper XCB_ATOM_CARDINAL in call to window_property_get
Summary: XA_CARDINAL is defined for xlib, XCB_ATOM_CARDINAL is defined
for xcb, so let's use the proper one and fix a build break.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 11:04:50 -05:00
Chris Michael c971fa845c ecore-x: Remove unused variable in backlight_available code
Summary: We never actually do anything with the _backlight variable
here, so just remove it

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 11:04:50 -05:00
Chris Michael 1135469fa4 ecore-x: Add missing EINA_UNUSED for function paramater
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 11:04:50 -05:00
Chris Michael d7765bb21f ecore-x: Fix calls to disable dpms in xcb
Summary: We already have ecore_x_dpms code which handles this
properly, so call it here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-27 11:04:50 -05:00
Stefan Schmidt 77df600b5d ecore_x: Add since tag for new ecore_x_input_select() API. 2015-01-27 12:00:14 +01:00
Srivardhan Hebbar b411be4be3 ecore: fix memory leak issues.
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>
2014-12-25 21:34:50 +01:00
Carsten Haitzler 38cb8fcbe0 ecore x vsync - disable ecore_x vsync daemon due to unresolved problems 2014-12-24 17:36:03 +09:00
Carsten Haitzler 83a3b45e33 ecore-xi2 - fix issue with ifdefs and moustache nesting
don't ask how this worked at all... it did... until you change some
ifdefs
2014-11-25 18:21:26 +09:00
Carsten Haitzler 8d1b586b90 ecore-x - xi2 - only compile functions when used by xi2 2014-11-25 16:09:28 +09:00
Carsten Haitzler 5bc509a0c0 ecore x - mark unused param as unused (warning--) 2014-11-25 16:07:09 +09:00
Carsten Haitzler 2b3b240951 ecore-x - xi2 support - unbreak build break i added.
this only breaks when you enable xi2.2
2014-11-25 15:37:16 +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
Jean Guyomarc'h 704c448141 warnings: remove 2 "equality comparison with extraneous parentheses"
Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-11-05 00:15:52 +01:00
Carsten Haitzler 779e0829c0 ecore vsync - add debug and files to touch to disable vsync
this makes it just that much more convenient to disable the ecore x
vsync stuff in case you have troubles
2014-10-31 11:28:03 +09:00
Daniel Zaoui 0961dd92d9 dnd/x: fix type set for case there is no type list exists
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
2014-10-27 08:10:11 +02: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
Nicolas Aguirre 3032ebc3e2 ecore_x: add documentation for Ecore_X_Version structure. 2014-10-20 18:01:54 +02:00
Carsten Haitzler 3b794720e8 ecore vsync - enable for radeon - i've tested it to work. 2014-10-05 21:42:00 +09:00
Carsten Haitzler 60bc2cc1ce ecore vsync - fix up dual nvidia + dri/drm driver discovery
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
2014-09-28 11:34:40 +09:00
Carsten Haitzler 222b49ba7c ecore_x_vsync - fix tiny leaklet of drmversion
@fix
2014-09-24 19:34:40 +09:00
Mike Blumenkrantz 5375e154fe fix config.h inclusion across the tree 2014-09-23 15:56:46 -04:00
Carsten Haitzler 13295d7350 efl - vsync - deal with both broken and non-broken libdrm
@fix
2014-09-23 21:31:54 +09:00
Amitesh Singh 7a02b10573 ecore_x: No need to free NULL value.
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
2014-09-22 13:43:10 -04:00
Stefan Schmidt edcee427fd ecore_x_vsync: Remove ahadowign variable.
Also make sure we reset ok to FALSE here to keep the logic below correct.
This was actually a vlaid local shadow problem.
2014-09-04 13:16:30 +02:00
Carsten Haitzler 61efcf37f8 ecore - x vsync - whitelies only intel drm driver
do a version/driver name check and only support intel (as it's the one
i KNOW works - except if you turn on EXA).
2014-09-04 18:13:10 +09:00
Mike Blumenkrantz 3408f1bd6d shutup ecore-x vsync stupid log domain failures
@fix
2014-08-28 14:09:39 -04:00
Carsten Haitzler e4ed80dc1e ecore vsync - work around old kernels by blacklisting them
this is a bug workaround apparently old kernels that seems to get
vsync and timestamps wrong. 3.14 kernels and up only for now

@bug
2014-08-27 18:26:58 +09:00
Carsten Haitzler f8e036d5af ecore-x - handle prop get fail for xdnd type set
fix CID 1039693
2014-08-27 16:33:06 +09:00
Carsten Haitzler 18410e17ef ecore vsync - don't schedule vsync moe than needed - add debug too
this doesn't fix anything, but in going over the code finding driver
bug i notice we schedule once too often and we need more easy to use
debug info
2014-08-27 01:19:22 +09:00
Carsten Haitzler c6193f7497 ecore x vsync - if schedule fails, use fallback timeout to adapt faster 2014-08-24 19:51:42 +09:00
Cedric BAIL 2a51029340 ecore_x: fix debug message and try to shutdown in time. 2014-08-21 12:04:53 +02:00
Julien Isorce d3c56d5c74 xlib: fix undefined behaviour when freeing colormap too early
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
2014-08-21 18:40:02 +09:00
Carsten Haitzler e430ee9467 ecore x vsync - be more conservative about DISPLAY string src
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.
2014-08-13 18:10:58 +09:00