Commit Graph

353 Commits

Author SHA1 Message Date
Jean-Philippe Andre 7b25619213 ecore xi2: Discard "axis" inputs from standard mice
Mice in X with xi2 send Axis events which are badly defined,
and carry basically useless information, as we also receive
proper mouse events. Notably, all mice input events are
"Rel something" but in fact they are absolute values (even
the wheel information is a counter increasing every time you
scroll).

This should not break any application as such axis events
carried only values with label ECORE_AXIS_LABEL_UNKNOWN.
This also fixes a leak when n == 0 (no "valuator" found
in the list, this used to be unlikely, now happens at every
mouse event).
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre c507f56110 ecore_x: Early check image bpp based on depth
This fixes argb windows transparency in E software compositor.

My current problem is that I have no idea what changed, why this
is needed now, and how things could actually work before.

Fixes T4389

@fix
2016-08-24 14:42:16 +09:00
Stefan Schmidt 461c5d2787 ecore: xcb: make sure length_name is always initialized
lib/ecore_x/xcb/ecore_xcb_icccm.c: In function ‘ecore_x_icccm_name_class_set’:
lib/ecore_x/xcb/ecore_xcb_icccm.c:320:11: warning: ‘length_name’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
         s += length_name + 1;

Looking at the code this is indeed possible so better play safe here.
2016-07-29 14:20:16 +02:00
Carsten Haitzler bd91ebbbd7 efl - ecore-x - work around e's badness in makeing an x image for all wins
so e is being stupid and creating an ecore-x image forevery single
window if in x11 mode if it needs it or not. this results in having ti
allocate an actual x image and shm segments. work around this and get
bit order from somewhere else than the x image itself thus avoiding
the allocation until a real get or put is done.

@fix
2016-07-27 10:32:41 +09:00
Carsten Haitzler 93a683daad evas and ecore_x shm segment management - fix over allocation and perms
so our sysv shm segments were both over-permissive (nothing bad
really, just other users could read and write to/from our pixel data
destined for the screen... they could do this to x11 directly anyway
so no real issue), but be more restrictive and use 0600 as xserver
runs as root so can read/write anyway and we only want our own uid
access. but even more - fix our shm segment flushing to not keep lots
of segments floating about like a bad smell when we don't need them.
we had a cache but it wasnt flushed when it should be since async
rendering turned up. this fixes that and we're back to agressively
flushing them out when idle.

@fix
2016-07-26 13:21:50 +09:00
Carsten Haitzler 1e6375cbe3 ecore x xrandr - fix possible divide by zero
fixes CID 1039437 , 1039438
2016-07-11 21:17:39 +09:00
Benjamin Jacobs e03d4142ef ecore_x: NULL derefs.
Reviewers: raster, devilhorns

Subscribers: raster, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4018
2016-07-11 14:20:00 +09:00
Benjamin Jacobs 109d040e3d ecore-xcb: Fix XCB to be usable again
Summary:
Well mostly, it seems there is an issue with multi-key events and
enlightenment. Let's merge this first before opening a ticket.

Reviewers: devilhorns

Subscribers: cedric, jpeg

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

@fix
2016-06-06 15:46:24 -04:00
Carsten Haitzler 072674dbe2 efl - ecore c+ ecore-imf - fix odd case input when faking a real event
so ibus module for ecore-imf likes to send an x event back to
ourselves faking a key... this works unless we are looking at
modifiers that make make for odd combos with keysyms turned into
keycodes. so actualyl use the correct original keycode plus state
unless we are having to explicitly send a keysym from ibus core.

this fixes T3703

@fix
2016-05-27 23:57:30 +09:00
Mike Blumenkrantz 7510e42c1b elm_win: implement v2 of teamwork api using window-based display protocol
this adds support for wayland and makes teamwork integration trivial for any
application

@feature
2016-05-20 14:54:06 -04:00
Cedric BAIL 0c4880e99d efl: everyone should now rely on Eina MIN/MAX redefinition. 2016-05-09 16:58:53 -07:00
Duna Oh fbe4e4b6ad Ecore: Use calloc() to initialize Ecore_Event_Mouse_XXXX
Summary:
To ensure initialize all fields of Ecore_Event_Mouse_XXX,
use calloc() instead of malloc().

Test Plan: N/A

Reviewers: gwanglim, cedric, raster, devilhorns, ManMower, zmike

Subscribers: jpeg, input.hacker, JHyun

Differential Revision: https://phab.enlightenment.org/D3906
2016-04-20 08:33:20 -04:00
Marcel Hollerbach 8400c9d3d2 ecore_x: fix emission of ECORE_X_EVENT_XKB_NEWKBD_NOTIFY
Summary:
the event XkbNewKeyboardNotify was never selected with
XkbSelectEventDetails so the event type could never occur.

The event is now each time emitted when a new event to the keyboard
happens. To clarify a bit: A new keyboard is always detected in x when
the set of keymaps changes.

@fix

Reviewers: raster, devilhorns, zmike

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3867
2016-04-07 14:02:29 +02:00
Chris Michael aba46af602 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing
ecore_x_randr_crtc_panning_area_set function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 11:43:14 -04:00
Chris Michael ca8e13712f ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing
ecore_x_randr_edid_display_interface_type_get function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 10:14:19 -04:00
Chris Michael ef15639e33 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing function
ecore_x_randr_screen_backlight_level_set

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:58:11 -04:00
Chris Michael bb8011a637 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing API function
ecore_x_randr_edid_dpms_off_available_get

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:46:57 -04:00
Chris Michael a19756be38 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing
ecore_x_randr_edid_dpms_standby_available_get function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:45:20 -04:00
Chris Michael 760fb0326c ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing
ecore_x_randr_edid_display_serial_get function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:43:04 -04:00
Chris Michael 48bfcd106f ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing
ecore_x_randr_edid_display_ascii_get function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:39:33 -04:00
Chris Michael 25b0dced34 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing API function
ecore_x_randr_edid_dpms_standby_available_get

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:34:59 -04:00
Chris Michael 4d048e5725 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing function
ecore_x_randr_edid_dpms_available_get

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:23:22 -04:00
Chris Michael 84149511da ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing API function
ecore_x_randr_edid_manufacturer_serial_number_get

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:20:53 -04:00
Chris Michael 66b8698be2 ecore-xcb: Add implementation for missing Ecore_X API
This patch adds an xcb implementation for ecore_x_randr_edid_model_get
function which was missing from ecore-xcb.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:18:10 -04:00
Chris Michael 6ce9ab87e8 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for
ecore_x_randr_edid_manufacturer_model_get function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:16:49 -04:00
Chris Michael 7c2e5a0c3e ecore-xcb: Add missing API function
ecore_x_randr_edid_manufacturer_name_get

This patch adds an implementation inside ecore-xcb for missing API
function ecore_x_randr_manufacturer_name_get

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:11:41 -04:00
Chris Michael debc4da837 ecore-xcb: Add missing API function ecore_x_randr_edid_info_has_valid_checksum
This patch adds an implementation for
ecore_x_randr_edid_info_has_valid_checksum which was missing in the
ecore-xcb codebase.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:06:06 -04:00
Chris Michael b89d219093 ecore-xcb: Add missing ecore_x_randr_output_crtc_set API function
This patch adds definition of missing API function
ecore_x_randr_output_crtc_set.

NB: This function also has no code in the xlib implementation

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 08:59:24 -04:00
Chris Michael 0ed9d246e5 ecore-xcb: Implement missing keyrouter and keygrab functions for xcb
This patch implements missing API functions (in ecore xcb) for
ecore_x_window_keygrab_set, ecore_x_window_keygrab_unset,
ecore_x_e_keyrouter_set, ecore_x_e_keyrouter_get. These
were missing from the initial commit of keygrab/keyrouter code.

Fixes T3377

ref 5c3a08433a

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-04 11:01:48 -04:00
Chris Michael 0482c38131 ecore-xcb: Fix wrong initialization
As Ecore_X_Window is an 'int' type, we should not be initializing it
to NULL. This causes compiler warnings about initialization makes
integer from pointer without a cast.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-04 08:41:27 -04:00
Chris Michael da0b4d4850 ecore-x: add safety checks for _ecore_x_disp in some functions
xlib immediately crashes upon being passed a null DISPLAY object,
so every function in ecore-x should likely have safety checks such as these.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-23 08:43:50 -05:00
Chris Michael a0ad57bb16 ecore-x: add safety checks for _ecore_x_disp in some functions
xlib immediately crashes upon being passed a null DISPLAY object,
so every function in ecore-x should likely have safety checks such as these.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-22 14:50:35 -05:00
Chris Michael 2be9bfc2a8 ecore-x: Add safety checks for NULL display in dpms functions
xlib immediately crashes upon being passed a NULL display object,
so every function in ecore-x should likely have safety checks such as these.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-17 08:16:29 -05:00
Chris Michael 5b2580b62e ecore-x: Add safety checks for NULL _ecore_x_disp in dnd functions
xlib immediately crashes upon being passed a NULL display object,
so every function in ecore-x should likely have safety checks such as
these.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-16 15:51:58 -05:00
Chris Michael 3bc6a4bedf ecore-x: Add EINA_SAFETY checks for missing display
xlib immediately crashes upon being passed a null DISPLAY object,
so every function in ecore-x should likely have safety checks such
as these.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-12 08:28:10 -05:00
Chris Michael ef13b57948 ecore-x: Add EINA_SAFETY checks for missing display
xlib immediately crashes upon being passed a null DISPLAY object,
so every function in ecore-x should likely have safety checks such
as these.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-12 08:28:10 -05:00
Chris Michael eb11b7f26e ecore-x: Add EINA_SAFETY checks for missing display
xlib immediately crashes upon being passed a null DISPLAY object,
so every function in ecore-x should likely have safety checks such
as these.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-12 08:28:10 -05:00
Chris Michael 43fa91f428 ecore-x: Fix compiler warnings about return values
This is an "oopsie" fix from my previous commit wrt adding EINA_SAFETY
checks. I made an oopsie and didn't realize that these 2 functions
were expecting int returns.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-11 11:21:50 -05:00
Chris Michael adeb28a1c0 ecore-x: Add EINA_SAFETY checks for missing display
xlib immediately crashes upon being passed a null DISPLAY object,
so every function in ecore-x should likely have safety checks such
as these.

@ref 210b3e6c62

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-11 10:12:10 -05:00
Mike Blumenkrantz 210b3e6c62 ecore-x: add safety checks for _ecore_x_disp in some functions
xlib immediately crashes upon being passed a null DISPLAY object,
so every function in ecore-x should likely have safety checks such as
these. an easy project for anyone who has some free time

@fix
2016-01-18 17:19:00 -05:00
Ji-Youn Park d0d9747853 ecore_x: fix memory leak
fix memory leak in xcb event handler.
   @fix
2015-12-24 13:11:45 +08:30
Ji-Youn Park 1a3cb45f1c ecore_x: fix memory leak
check return value type of XGetWindowProperty.
   @fix
2015-12-24 09:57:34 +08:30
Carsten Haitzler 7d57dfbe9c efl - ecore-x randr - fix coverity issue found after previous leak fix
fix coverity issue pointed out in the previous commit fix:

dadc1451e7

use after free of ptr (free was in wrong spot)

@fix
2015-12-09 14:21:10 +09:00
Carsten Haitzler dadc1451e7 efl - ecore-x xrandr - fix memleaks of properties fetched
while doing some debugging, ifound we have been leaking these xrandr
properites that were malloced in certain cases. this fixes these leaks.

@fix
2015-12-07 20:07:31 +09:00
Vincent Torri 3b44645363 efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:04:36 +01:00
Jean Guyomarc'h 4ab8471ef0 ecore_x: factorize multiple calls to strlen()
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
indefini fb75f6df5a ecore_x: don't add a x selection clear event if the time is the same as when selection was made.
Summary:
Without this, selection can get cleared when changing focus.
For example, if we have 2 entries:
The first entry is focused and has a selection.
When we focus the second entry, we want to select all the text.
But the old selection gets unfocused and sends a clear signal
to the new focused entry and it gets unselected.

This should fix T2739.

Reviewers: raster, tasn, devilhorns

Subscribers: herdsman, thiepha, cedric

Maniphest Tasks: T2739

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
Carsten Haitzler 60d78b5b97 efl - make drm vsync handle broken drm irq timestamps
i found that intel drm device gives BROKEN timestamps vs system clock
- it is off by about 0.3 to 0.4ms - this means the vsync event is in
the future vs when we actually wake up and do processing - this leads
to bizare timelines and likely odd event and animation handling.

fix this by detecting it and figuring out an average delay and
offsetting events by that in future, but until then, use "now" when
the drm thread wakes up as the timestamp.

@fix
2015-10-28 20:45:07 +09:00
Srivardhan Hebbar 30ad41cf99 ecore_x: remove useless assignment.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-21 14:01:41 -07:00
Srivardhan Hebbar a3ff6aff61 ecore_x: removing useless assignment variable.
Summary:
Assigning to NULL has no effect in the function calling this. So changed it to void.
Some compiler complain about this kind of construct. It is better to use the (void)
construct for silencing unused parameter with different kind of configure option.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-20 14:01:15 -07:00