Commit Graph

392 Commits

Author SHA1 Message Date
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
Carsten Haitzler 355e96bd64 more versions of vbox mods panic - blacklist all vboxvideo users from vsync 2014-08-11 16:06:54 +09:00
Gustavo Sverzut Barbieri a306c19871 ecore_x_vsync: hack to workaround bug in vboxvideo
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
2014-08-07 11:31:36 -03:00
Stefan Schmidt ee330fbaed ecore_x: Add missing since to various new ecore_x_screensaver* functions 2014-08-07 11:43:15 +02:00
Carsten Haitzler c12875ccd3 ecore vsync - add getenv env var to disable vsync attempt
this is a quick try to allow testing and fixing of the vbox vsync
kernel panic with ability to turn it off so debugging can be done
2014-08-07 14:27:07 +09:00
Carsten Haitzler 4af9664622 ecore-x - use last modifier mask found, not first to match xserver logic
this makes altgr not conflict as per
https://phab.enlightenment.org/T1273 by using the last, not first
occurance of the key in the mask modifier bits
2014-08-05 11:23:28 +09:00
Cedric BAIL fc159fbcae ecore_x: don't go below 0.
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.
2014-08-04 11:56:50 +02:00
Carsten Haitzler 38bed2cd8a fix warning about unused var 2014-08-02 22:54:23 +09:00
Carsten Haitzler 812494ca58 ecore-x vsync tool. fix multi-client handling so ticking continues
a mistaking in using the wrong tick var caused ticking to stop when a
client that is ticking exits while another ticks. this fixes it.
2014-08-02 13:15:14 +09:00
Carsten Haitzler aad0192a89 clean vsync code - use do+while not goto. 2014-08-02 12:54:34 +09:00
Carsten Haitzler b0d4793d6f ecore-x-vsync - rearragnge to move vsync event input to thread
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.
2014-08-02 12:03:35 +09:00
Carsten Haitzler 0e330cfbe4 fix wakeups to not happen for now until i fix vsync 2014-08-01 19:00:18 +09:00
Carsten Haitzler e54ec867e9 ecore-x vsync nvidia glx tool - handle clients disabling first then enabling 2014-08-01 09:33:16 +09:00
Carsten Haitzler 6e7b42111f ecore_x - vsync nvidia/glx service fix so it connects 1st not 2nd time 2014-08-01 08:47:06 +09:00
Carsten Haitzler 570c1f9692 ecore_x_vsync - protect against silly clients asking for vsync lots
this allows a client to ask multiple times and have to release the
same number of times for vsync events to stop. covers possible misuse
2014-07-31 23:16:40 +09:00
Carsten Haitzler 2be17655fa fix vsync display env var handling to be right 2014-07-30 08:38:21 +09:00
Carsten Haitzler 0010159fe7 ecore-x-vsync - oops - fixed, but debug paths left in - remove.. 2014-07-29 23:22:06 +09:00
Carsten Haitzler acf4e67420 ecore-x-vsync - found issue when vt switchign with nvidia - workaround 2014-07-29 23:19:52 +09:00
Carsten Haitzler aaefbaa43e ecore_x - vsync fix drm support to work again
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
2014-07-29 20:02:33 +09:00
Carsten Haitzler 2d63a70422 ecore x vsync animator support - add a glx based vsync ticker
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.
2014-07-28 23:00:34 +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
Carsten Haitzler 20c8065da6 fix mouse sticking when xkbmap changes whilst running
this fixes T1415
2014-07-15 20:39:13 +09:00
Carsten Haitzler e42f319d00 ecore-x - add x screensaver activate/reset calls 2014-07-07 23:36:34 +09:00
Carsten Haitzler ad8957c708 fix xcb as well as xlib - match altgr conflict fix
this matches c21120ec96 conflict fix
section (not the rest). T1273 fix
2014-07-04 18:07:15 +09:00
Carsten Haitzler c21120ec96 this fixes crazy french altgr setups that confuse binding masks
this fixes T1273 - @fix
2014-07-04 18:02:10 +09:00
Carsten Haitzler 007dd02c56 ecore_x - add some minor calls to be able to suspend/resume screensaver 2014-07-01 19:40:26 +09:00
Carsten Haitzler 4d8e12089c ecore-x - fix setting protocol atoms for icccm for 64bit
@fix
2014-05-11 09:09:03 +09:00
Mike Blumenkrantz f886c60a0d ecore_x_image_get() should not abort when shm creation fails 2014-05-09 10:18:38 -04:00
Mike Blumenkrantz 60966149ff ...also when shmat() fails 2014-05-09 10:18:29 -04:00
Mike Blumenkrantz 2719d17b17 ecore-x should print an error when shmget fails 2014-05-09 10:15:41 -04:00
Chris Michael 6994cb2a86 ecore-x: Set keycode in ecore_event structure during key press/release events
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>
2014-05-09 08:00:26 +01:00
Carsten Haitzler f921af0cb5 formatting - imrove readability of ecore x event table decl 2014-04-10 15:15:47 +09:00
Carsten Haitzler 5cdbcceccb fixes enlightenment working over non-shm paths.
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.
2014-03-26 15:54:40 +09:00
Tom Hacohen 6242271e74 Ecore x: Add back the two symbols removed in 1.9.
This fixes ABI that got broken in 1.9.

@fix.
2014-03-13 11:06:57 +00:00
Chris Michael 11d250e5fc ecore-x: Predefine Ecore_X_Atom and Ecore_X_Icon
@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>
2014-03-12 08:42:01 +00:00
Jihoon Kim 449f9b76ba ecore_evas: fix version of APIs to support for window auxiliary hint recently
EFL 1.9 was already out, it's 1.10 phase now.
2014-02-28 08:43:31 +09: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
Daniel Hirt 3160b044fb ecore_x_selection: fix selection data freeing
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].
2014-02-09 13:12:39 +02: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
Jaehwan Kim be4d28be6c ecore_x: fix wrong Atom name. 2014-02-08 12:34:42 +09:00
Carsten Haitzler dc9d37de0b ecore-x xpresent - fix build if you DONT have xpresent there. 2014-02-07 17:33:01 +09:00
Doyoun Kang 50b941f907 ecore_x: added @since comment about ecore_x_e_illume_window_state_send
Reviewers: seoz

CC: zmike, cedric, raster

Differential Revision: https://phab.enlightenment.org/D526
2014-02-07 17:06:22 +09:00
Jaehwan Kim 71c7d0e9ad ecore_x: Add ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_OVER.
This Atom is for accessibility.
In the touch screen, when the finger moves continuously, it is uesd.
2014-02-07 14:51:28 +09:00
Doyoun Kang 541ef547ab ecore_x: Added API - ecore_x_e_illume_window_state_send
Summary:
there exists ecore_x_e_illume_window_state_set and ecore_x_e_illume_window_state_get,
but no ecore_x_e_illume_window_state_send.

Reviewers: raster, seoz, cedric

Reviewed By: seoz

CC: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D512
2014-02-07 13:05:00 +09:00
Mike Blumenkrantz 052fc85cd3 okay, bring back xrandr < 1.4 compat for ecore_x_randr_output_name_get
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
2014-01-21 16:07:38 -05:00
Mike Blumenkrantz 8cbd7c1622 nul terminate string from ecore_x_randr_output_name_get 2014-01-21 14:58:31 -05:00
Mike Blumenkrantz 1feed7a1ae ecore_x_randr_output_name_get fixme removed
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.
2014-01-20 22:16:18 -05:00
Jaehyun Cho 4432cd2e8e [ecore_x] Fix to handle paste null data case.
Summary: Do nothing when null data is pasted.

Reviewers: Hermet, raster

Reviewed By: raster

CC: seoz, raster, cedric

Differential Revision: https://phab.enlightenment.org/D473
2014-01-20 22:15:33 +09:00
Daniel Juyung Seo 2830507661 ecore_x_gesture: Cast maek pointer correctly.
Confirmed by the original author of libxgesture, Sungjin Park.
2014-01-15 20:48:33 +09:00
Sebastian Dransfeld 74bfb950c6 ecore_x: set cursor with xinput2
For some reason XDefineCursor might malfunction when using xinput2. So
when using xinput2, use XIDefineCursor. Also see:

https://bugs.launchpad.net/compiz/+bug/1179155
2014-01-15 08:30:25 +01:00
Seunghun Lee c4010a5da6 ecore ecore_x_e: check 0 and -1 for ecore_x_window_prop_window_get(). According to note for ecore_x_window_prop_window_get() :
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
2014-01-14 18:48:16 +09:00
Mike Blumenkrantz a279e13ecd ecore-x present fixups 2014-01-13 12:14:50 -05:00
Mike Blumenkrantz 131e0e1983 ecore-x now supports XPRESENT
see http://cgit.freedesktop.org/xorg/proto/presentproto/plain/presentproto.txt
2014-01-13 10:19:11 -05:00
Jaehyun Cho 4daf83269a [ecore_x] Set data of selection event for XDND selection
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
2014-01-10 15:46:15 +09:00
Carsten Haitzler e8c13118eb fix mingw build for setuid fix/checks 2014-01-08 22:06:41 +09:00
Carsten Haitzler b95ef3801f setuid safeness - ensure if an app that is setuid doesn't do bad things
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.
2014-01-08 19:46:23 +09:00
Jihoon Kim 8fcedfc017 fix 'found unknown command' warning in generating doxygen 2014-01-06 14:01:15 +09:00
Carsten Haitzler 2ef0f53401 ecore-x - rename new api 2013-12-27 12:02:48 +09:00
Chris Michael 3926b25279 Cleanup ecore_x_window_permanent_create function:
- 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>
2013-12-26 11:40:32 +00:00
Carsten Haitzler eb8b643bf2 ecore-x - add call to create a permanent window that is not deleted on exit 2013-12-26 19:01:23 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
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.
2013-12-26 12:27:13 +09:00
Daniel Juyung Seo 17fe60d0db ecore gesture: removed unused variable. 2013-12-18 23:18:15 +09:00
discomfitor 0f46b8d7ec fix ecore-x shadow warning 2013-12-12 09:31:08 -05:00
Sebastian Dransfeld 50569a69c9 ecore_x: ensure positive malloc size
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
2013-12-10 09:10:54 +01:00
Sebastian Dransfeld 4a24b84185 ecore_x: remove double free
We first free'd the data in the else, then at the end.

Now we free old_data just before return, and at the end.

Fixes CID 1135637
2013-12-10 08:30:23 +01:00
Carsten Haitzler 82841fefe3 fix seb "fix" commit that causes lots of segvs.
this fixes 04e0a6d95e which introduced
copy & paste segv's by properly terminating the right buffer.
2013-12-09 18:39:07 +09:00
Daniel Zaoui 1ae7a4f5e2 Ecore: add DnD abort from source
This can be used to cancel a DnD drag operation in the middle.
2013-12-09 09:11:27 +02:00
Sebastian Dransfeld 8b72bd6e6d ecore_x: Fix bug in ecore_x_region_invert
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
2013-12-07 21:11:34 +01:00
Sebastian Dransfeld c8b8738612 ecore_x: Remove NULL check
to get here, old_data != NULL.

Fixes CID 1039648 and 1039649
2013-12-07 21:11:34 +01:00
Sebastian Dransfeld 1905fd4858 ecore_x: Use free, not XFree
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.
2013-12-07 21:11:34 +01:00
Sebastian Dransfeld f4c71fba21 ecore_x: supported isn't an optional argument
if supported is NULL, this function isn't of any use.

Fixes CID 1039430
2013-12-07 21:11:34 +01:00
Sebastian Dransfeld 31d0a2d71c ecore_x: Only use att if call succeeds.
XGetWindowAttributes isn't guaranteed to succeed.

Fixes CID 1039692
2013-12-07 21:11:34 +01:00
Sebastian Dransfeld 6b1438af05 ecore_x: Only do memset if len < 20
If len is 20, n is 0, and nothing to memset.

Fixes CID 1039311
2013-12-07 21:11:34 +01:00
Sebastian Dransfeld aca33ef3d9 ecore_x: always free data and return value
if we are the selected parser, we are responsible for free'ing data and
returning a selection value.
2013-12-07 21:11:33 +01:00
Sebastian Dransfeld f22f861f61 ecore_x: Check if we have data
data could be NULL and size == 0, so check for this.

Fixes CID 1039264
2013-12-07 21:11:33 +01:00
Sebastian Dransfeld 04e0a6d95e ecore_x: '\0' terminate converted text
This makes ecore_x text converter behave like elm text converter.

Fixes CID 1039310
2013-12-07 21:11:33 +01:00
Sebastian Dransfeld 50feb1f8da ecore_x: Use eina_inlist
ecore_x_selection implemented it's own single linked list. Use
eina_inlist instead.
2013-12-07 21:11:33 +01:00
Sebastian Dransfeld d09ceaf4c1 ecore_x: Only send XdndEnter when we have types
If ecore_x_window_prop_property_get fails, we have no types to drop so
don't send XdndEnter.

Fixes CID 1039693
2013-12-07 21:11:33 +01:00
Sebastian Dransfeld 31fde249d4 ecore_x: Also check for !prop here
We check if prop is NULL after first property check, do it here too.

Fixes CID 1039429
2013-12-07 21:11:33 +01:00
Daniel Juyung Seo e2467724da ecore ecore_x_e: check 0 and -1 for ecore_x_window_prop_card32_get() return value which mean fail.
- ecore_x_window_prop_card32_get() returns:
  -1 if the property was not successfully fetched.
  0 if the property exists but has no elements.
2013-12-02 12:46:18 +09:00
Daniel Juyung Seo a5c98947ae ecore ecore_x_e: initialize local variable to avoid having wrong value.
Thanks to devilhorns!
2013-11-27 21:43:06 +09:00
Sebastian Dransfeld 3dc5eb16cc ecore_x: accept -1 as valid mm size for no change
If we pass in w_mm = h_mm = -1 we want no change if w == cw and h == ch,
as we calculate w_mm and h_mm based on these later.
2013-11-07 09:18:16 +01:00
Sebastian Dransfeld 144d124445 ecore_x: store atoms internally
No need to request them every time.
2013-11-07 09:18:16 +01:00
Sebastian Dransfeld a7382dacfa ecore_x: get correct property
Since the function is ecore_x_randr_output_connector_type_get, I guess
we want RR_PROPERTY_CONNECTOR_TYPE, not RR_PROPERTY_CONNECTOR_NUMBER.
2013-11-07 09:18:16 +01:00
Carsten Haitzler b07c0a76ce alpha1 release autofoo/build tree work to pass distcheck and actually work 2013-11-04 18:33:35 +09:00
Chris Michael 3cc4efaf50 Fix doxy typo/grammar
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-26 12:16:10 +01:00
discomfitor 42fb964592 ecore-x xlib errors now only print when sync is enabled
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.
2013-08-25 17:15:19 +01:00
Mike Blumenkrantz 5e8e8aec7d print error when ecore-x shm check fails 2013-08-07 08:36:46 +01:00
Chris Michael 585ad86480 Patch from Phoenix Kayo <kayo@illumium.org> to fix
ecore_x_selection_parser functions for mozurl.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 07:44:50 +01:00
Chris Michael aa75297381 Add #ifdef ECORE_XRANDR around the edid functions.
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>
2013-08-01 15:18:01 +01:00
Chris Michael 55094c9eb0 Set Crtc info->outputs and info->possible to NULL initially.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-26 07:06:58 +01:00
Chris Michael 3e9edcd539 Fix typo
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-25 13:32:06 +01:00
Chris Michael 551610fa41 Guard against allocating 0 outputs and 0 possible outputs.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-25 13:09:34 +01:00
Chris Michael 8aef3fa98a Guard against trying to allocate 0 outputs.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-25 13:08:18 +01:00
Chris Michael f287fd33a7 Trap for number of crtcs < 1 so we do not try to allocate space for
zero crtcs.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-25 12:32:49 +01:00
Carsten Haitzler e945f0d196 ecore-x: fix randr query when noutputs is 0. 2013-07-24 19:22:31 +09:00
Mike Blumenkrantz ea7bc3f670 revert e7862929e4
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.
2013-07-19 09:02:33 +01:00
Carsten Haitzler e7862929e4 ecore-x: make error prints DBG not ERR so we don't get spammed
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...
2013-07-19 09:23:11 +09:00
Mike Blumenkrantz 464dd4f206 disable ecore-x trace debugging...whoops 2013-07-18 06:24:50 +01:00
Mike Blumenkrantz 60111ce8ca add ECORE_X_SYNC env variable for xlib backend 2013-07-18 06:17:40 +01:00
Mike Blumenkrantz d77d9134f8 delete e pixmap atom based on atom pixmap atom, not pixmap 2013-07-18 05:21:07 +01:00
Mike Blumenkrantz ad7933670f ecore_x_pixmap_free no longer fails when passed 0 2013-07-18 05:21:07 +01:00
Mike Blumenkrantz 23795d1733 add ECORE_X_ATOM_XDND_DIRECTSAVE0 2013-07-17 08:44:22 +01:00
Mike Blumenkrantz 3e45bbecf6 print ecore-x xlib errors when they occur 2013-07-17 08:43:38 +01:00
Carsten Haitzler c6309b44b2 fix clang sizeof complaint 2013-07-16 19:58:01 +09:00
Carsten Haitzler d07a30fa25 fix clang sizeof complaint 2013-07-16 19:57:13 +09:00
Carsten Haitzler 604fac4166 ecore-x: vsync_animator_tick_source_set fail if drmWaitVBlank fails 2013-07-16 19:39:10 +09:00
Mike Blumenkrantz c3916df200 clamp size to ximage size for ecore_x_image_get to prevent BadMatch errors 2013-07-15 09:37:54 +01:00
Mike Blumenkrantz b67be2ee25 add error messages to ximage function failures 2013-07-15 05:19:23 +01:00
Chris Michael 207ad636fe Avoid potential divide by zero error.
NB: Fixes Coverity CID1039437and CID1039438

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:55:14 +01:00
Chris Michael 7bf6ba1f67 Add missing free(data) reported by jeyzu. Thanks ;)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:22:20 +01:00
Chris Michael f880ef9045 Remove erroneous copy/paste of data free
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:04:29 +01:00
Chris Michael 45a2296218 Fix memleak reported by Coverity and replace an XFree call
NB: Fixes Coverity CID1039276

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 12:41:00 +01:00
Chris Michael 0701304205 Fix memleak reported by Coverity and replace some XFree calls with
just free.

NB: Fixes Coverity CID1039275

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 12:39:48 +01:00
Chris Michael d7600cfbee Fix memleak of window_prop_property_get
NB: Fixes Coverity CID1039274

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 12:34:28 +01:00
Chris Michael a01ce5e409 Fix memleak of window_prop_property_get
NB: Fixes Coverity CID1039273

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 12:30:34 +01:00
Chris Michael e33391ef56 Replace XFree with just free.
NB: XFree calls 'free' anyway, so this saves us a function call

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 12:28:15 +01:00
Chris Michael d7193f2830 Fix memleak reported by Coverity
NB: Fixes Coverity CID1039272

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 12:27:40 +01:00
Chris Michael 0d12ab48be Fix memleak spotted by Coverity: ecore_x_window_prop_property_get can
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>
2013-07-08 12:24:21 +01:00
Chris Michael 5969c97f7a Fix memleaks reported by Coverity: ecore_x_window_prop_property_get
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>
2013-07-08 12:17:58 +01:00
Chris Michael aea9e86eb4 Fix several memleaks reported by Coverity
NB: Fixes Coverity CID1039268

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 12:12:48 +01:00
Chris Michael 4ea1ea5bf4 Fix memleak spotted by Coverity
NB: Fixes Coverity CID1039267

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 11:58:15 +01:00
Chris Michael 02f545ecc6 Fix memleak. If we error out here, then we should free the data
returned from window_prop_property_get (as that does an allocation).

NB: Fixes Coverity CID1039266

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 11:47:13 +01:00
Chris Michael e6088e2361 Fix memleak reported by Coverity: If we are going to error out when
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>
2013-07-08 11:44:23 +01:00
Carsten Haitzler 9e459ef9d6 fix new ecore_x_pixmap typedef clashes in ecore_x 2013-07-08 17:15:11 +09:00
Chris Michael 2a1b993162 Fix "Allocation size mismatch" reported by Coverity (short version: we
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>
2013-07-08 09:00:45 +01:00
Shinwoo Kim daca686168 [ecore_x] add accessibility support - enable, disable 2013-07-03 13:13:32 +09:00
Chris Michael d263e31c7f When getting crtc info, fill in missing "rotations" field so that the
value is initialized.

NB: Spank Spank whoever did this ... oh wait, that was me :( Ouch !!

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-27 10:46:34 +01:00
Deon Thomas 67df5b4ad1 Ecore DPMS Function to get the current dpms power level 2013-06-26 08:32:42 +09:00
Mike Blumenkrantz fbd09e2562 add support for text/x-moz-url DND operations 2013-05-29 13:46:11 +01:00
Chris Michael 1d58f5ff1d Don't allocate space for a mode name unless the nameLength is greater
than 0.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-24 18:25:53 +01:00
Mike Blumenkrantz ab079ae1a5 move ecore-x fd handler creation to after ecore-x init has finished so we can ignore more x events during startup 2013-05-22 10:15:37 +01:00
Chris Michael afff55eec5 Fix memleak in ecore_x_randr_crtc_settings_set.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-21 14:32:25 +01:00
Chris Michael bc31a55bda Add ecore_x_randr_config_timestamp_get to return config timestamp that
XRandr has currently.

NB: needed for some updates/fixes to randr dialog.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-11 16:30:38 +01:00
Chris Michael 559b1b3301 Add missing ecore_x_randr_crtc_info_free function to xcb.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-08 10:07:53 +01:00
Chris Michael b619f84590 Add missing ecore_x_randr_crtc_clone_set function for xcb.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-08 10:04:23 +01:00
Chris Michael f5a1889db3 Add missing randr_crtc_info_get function to xcb.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-08 09:53:43 +01:00
Chris Michael 291d45f045 Fix formatting.
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>
2013-05-08 08:56:01 +01:00
Chris Michael 185e88ae72 Fix typo ...
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>
2013-05-08 08:55:39 +01:00
Carsten Haitzler 11e0d67a71 Revert "Ecore DPMS function to get the current power level"
This reverts commit 19c4916f41.

sorry... missing xcb version of func. please re-commit when you have
an xcb version. thanks! :)
2013-05-08 15:59:11 +09:00
Carsten Haitzler eb4339bb0c get rid of trailing nul byte in selections for x11
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.
2013-05-08 13:05:33 +09:00
Deon 'PrinceAMD' Thomas 19c4916f41 Ecore DPMS function to get the current power level 2013-05-07 11:47:28 +01:00
Carsten Haitzler 6d54f4608d fix 64bit ecore-x selection overrun bug. 2013-04-23 00:08:18 +09:00
Tom Hacohen 8698e455f8 Ecore_x: init ret, otherwise it might be used uninitialized. 2013-04-18 13:46:28 +01:00
Shinwoo Kim 3b81d4aa51 [ecore_x] add accessibility support 2013-04-18 14:53:58 +09:00
Jiyoun Park 2d0d852fa9 expand indicator type to support if it want more than two indicator type 2013-04-18 14:45:11 +09:00
Carsten Haitzler 5339ab4501 small change: valgrind shus about uninitiallized data from stack...
it's unused anyway.
2013-04-18 12:49:24 +09:00
Deon 'PrinceAMD' Thomas 7df54da4c4 Ecore Pointer get root x,y position without ecore_x_window. 2013-04-18 12:07:26 +09:00
Igor Murzov 1373f0ba4a Fix incorrect printf format usage 2013-04-16 12:07:36 +04:00
Carsten Haitzler 140c1afefb valgrind complain-- 2013-04-02 12:28:06 +09:00
ChunEon Park 4198433cc0 ecore_x - use the exsiting variable. 2013-03-25 22:45:06 +09:00
Jiyoun Park 5d64ee8fa8 ecore_x : add atom to be used deiconify manual render
win will be manual render when deiconify message
2013-03-07 13:42:31 +09:00
Jiyoun Park d70feacf9b Ecore_x: Add atom related with indicator type.
It can support several types of indicator
2013-03-05 14:25:50 +09:00
Jiyoun Park 004d519f06 ecore_x : fix dangling pointer problem related with shmget fail 2013-03-05 14:01:32 +09:00
Jiyoun Park bc78f49d71 ecore_x : just fix typo 2013-03-05 13:46:14 +09:00
Henrique Dante de Almeida ca8fc827a3 efl: Fixes to support compiling with CFLAGS=-Werror
This allows compiling with gcc 4.7.2 without errors (using the
default configuration).
2013-02-26 10:55:04 -03:00
Carsten Haitzler 5a9a4fdd1f oops - still had printfs. remove. 2013-02-26 22:06:12 +09:00
Carsten Haitzler 83190eb0c2 Add ecore_x_dnd_self_begin() and ecore_x_dnd_self_drop() to allow dnd
to your own window (drop where u drag from). helpful for elm where dnd
src/dst are object based, so we talk dnd protocol to ourselves.
2013-02-21 16:49:10 +09:00
Carsten Haitzler c5ade50c9f Fix ecore-x edid fetch to ftech 128, not 100 bytes. 2013-02-20 17:16:54 +09:00
Tom Hacohen a2d710b0b6 Ecore_x: Revert "don't filter out non-master pointers in xi2.2 support."
This actually breaks genlist selection.

This reverts commit 5adb2f1ae6.
2013-02-19 15:09:32 +00:00
Carsten Haitzler 5adb2f1ae6 don't filter out non-master pointers in xi2.2 support. 2013-02-18 16:37:20 +09:00
Christopher Michael 036a067a2c Fix major memory stompage when using ecore_xcb_atom routines.
Thanks TAsn ;)

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 83807
2013-02-11 07:12:18 +00:00
Carsten Haitzler 73e9b8ea3d oops - add back in snprintf.
SVN revision: 83768
2013-02-08 09:00:29 +00:00
Carsten Haitzler c736dd323d fix ecore_x_screen_is_composited...
SVN revision: 83767
2013-02-08 08:56:00 +00:00
Carsten Haitzler afd8a714f4 devilhorns: ummmm lets not segv and run allover the stack shall we? memset the
size of memory we ALLOCATED!



SVN revision: 83757
2013-02-08 03:35:11 +00:00
Christopher Michael 37749b3d3e Add ecore_x_randr_crtc_info_free function.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 83739
2013-02-07 12:43:55 +00:00
Christopher Michael 736d81e866 Add ecore_x_randr_crtc_info_free function.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 83738
2013-02-07 12:43:51 +00:00
Christopher Michael 2fe1fa053f Fix crtc_info_get function (memcpy fails here in some cases, so
manually allocate and copy things over).

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 83737
2013-02-07 12:43:46 +00:00
Christopher Michael 20d1df8a23 Add ecore_x_randr_crtc_info_get function.
NB: This will save us Many X round-trips in the new randr dialog.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 83728
2013-02-07 09:32:24 +00:00