Commit Graph

406 Commits

Author SHA1 Message Date
Carsten Haitzler 42e691d9b4 ecore-x - add some xi2 api's for fiddling with device properties
add some infra to be able to get and set device properties (as well
as know if devices changed to we can refersh a gui or re-apply saved
settings etc.). it doesn't do everything but... it adds enough to
build on in e.
2019-11-16 13:02:10 +00:00
Mike Blumenkrantz d2d4fcce48 ecore-x: protect against accidentally "un-managing" the root window
Summary:
block calls to XSelectInput with the root window if the root window is
currently being "managed" in-process in order to avoid breaking the
running wm
Depends on D10013

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10014
2019-09-26 11:23:24 -04:00
Mike Blumenkrantz 2f7b359183 ecore-x: add internal function for selecting just properties of root window
Summary:
this is just a shortcut for watching properties in the case where no wm is
active in the process
Depends on D10012

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10013
2019-09-26 11:23:12 -04:00
Mike Blumenkrantz 2bc6754d39 ecore-x: track whether ecore-x is internally "managing" the root window
Summary:
when ecore_x_window_manage is called, this is probably only for the case of
managing the root window, i.e., running a window manager. store this state
internally so that we can avoid calling additional XSelectInput later and
fucking up the expected eventing

Depends on D9899

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10012
2019-09-26 11:23:01 -04:00
Mike Blumenkrantz 9d16a44334 ecore-x: fix null derefs in window prop code
Summary:
handle cases where null params could be passed and cause crashes

@fix

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9899
2019-09-26 11:22:32 -04:00
Mike Blumenkrantz 2138010127 events: don't check for zeroed event types before registering them
Summary:
this handles the case of reinitializing a component, but it's totally
broken in the case of doing a full ecore restart
Depends on D9253

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9254
2019-07-10 13:57:35 -04:00
Carsten Haitzler d16809d648 ecore_x - restore move event skipper that was removed long ago
so i've been wondering what is going on for a few days... and i've
figured it out finally... my mouse seems ot like to generate 1000
events per second. not your usual 100 or 200. it only happened on this
one machine so i was wondering what on earth was up. this machine was
different in other ways like an arm cpu, differing gpu (rx550),
different distro and so on. this is creating a storm of motion events..
and this is causing all sorts of overhead in just trying to deal with
them all like generate more internal events, emit signals for every
one of them and so on. there is no attempt to play catch-up or
anything - just build up a bigger and bigger queue of them to deal
with. this is NOT GOOD. this restores our old commented out event
skipper that got commented out during some xcb work actually -
not on its own. it was a huge xcb patch that commented it out.

this restores it and makes it a little cleaner with a bool and now the
perf issues i was seeing are gone. this is such a major performance
fix that this deserves a backport.

@fix @optimize
2019-06-18 11:26:52 +01:00
Mike Blumenkrantz f1b29fbbe7 ecore-x: protect ecore_x_shutdown from creating a negative init count
Summary:
@fix
Depends on D8972

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8973
2019-05-29 12:29:04 -04:00
Mike Blumenkrantz 59526ba58d build: use only BUILD_ECORE_IMF_XIM as a define
Summary:
meson and autotools were a bit out of sync with this, resulting in
unexpected behavior

Reviewers: billiob

Reviewed By: billiob

Subscribers: billiob, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8641
2019-04-17 15:45:35 -04:00
Xavi Artigas 68c530080b docs: Fix common misspellings in H files
Fixed all appearances of words from this list in H files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 13:28:48 +02:00
Thierry 56f06d21c1 ecore-x: only modify _ecore_key_grabs when key is toggled
A New entry is added to _ecore_key_grabs even when no key was grabbed.

Summary:  The key grab and ungrab functions should return which keycode was used. Proposed by pascal@ordissimo.com

Reviewers: zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7923
2019-02-13 11:39:39 -05:00
Marcel Hollerbach e43f090265 cmake: remove!
This build was never complete and also was not maintained probebly.

It is also dropped in favour of meson which is cool, merged, works & is fast.

Differential Revision: https://phab.enlightenment.org/D7010
2018-12-20 20:07:26 +01:00
Carsten Haitzler 5e01bbe7bd build - meson - fix ecore-x to detect xcursor to fix rgba cursors 2018-10-18 13:42:10 +01:00
Carsten Haitzler d67e9875c8 ecore_x - add nouveau into the whitelist and clean up so it's a list
it was a lot of if cases before now it's an array with min version
parameters and globs for matching drivers etc. - much cleaner and
neater to afdd things to the whtielist now.
2018-10-11 16:25:05 +01:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Carsten Haitzler 18cccd8798 ecore x - fix vsync to not block amdgpu drivers
amdgpu vsync works so don't block is so those drivers get proper
vsynced rendering as well.

@fix
2018-07-24 13:09:55 +09:00
Mike Blumenkrantz a524ab1fe3 ecore-x: add some useful xkb function wrappers
@feature
2018-01-24 16:18:51 -05:00
Mike Blumenkrantz b28d6ac5e6 ecore-x: re-add implementation of ecore_x_connection_get()
this symbol has been missing since the removal of xcb

@fix
2018-01-24 16:18:51 -05:00
Mike Blumenkrantz 067ec7bd5c ecore-x: filter XkbNewKeyboardNotifyEvent before emitting ecore-x event
this is only relevant to watchers of the ecore-x event if there is a keycode
change

@fix
2018-01-24 16:18:51 -05:00
Mike Blumenkrantz 4b38020f89 ecore-x: add more info to Ecore_X_Event_Xkb event
this event corresponds to xkb state changes which are useful when working
with xkb instances

@feature
2018-01-24 16:18:51 -05:00
Mike Blumenkrantz ff1a0475c3 ecore-x: add more null checks for functions
@fix
2018-01-22 17:34:37 -05:00
Mike Blumenkrantz 7c087d209a ecore-x: perform internal shutdown on io error if callback is set
avoid crashing in callback when referencing dead display or handling events

@fix
2018-01-22 17:34:37 -05:00
Vincent Torri 4ae6eeb2cf efl: remove _MSC_VER (Visual Studio macro) usage in source code 2018-01-04 12:59:47 -08:00
Jean-Philippe Andre ff24ac2d6d efl: Reset ecore event types on init
This fixes cycles of init/shutdown/init where ecore event types would
become invalid, since they are now stored in a dynamic array rather than
a statically stored array.

The risk here is that if a module of EFL tends to init/shutdown in a
"normal" scenario then the event type array will grow in a leaking
manner. This could be fixed by resetting those event ID's only when the
loop actually exits (EFL_EVENT_DEL on the main loop). I'm not using
EFL_EVENT_DEL in this patch as this would add too many event callbacks
to the main loop object, which may result in slightly slower event calls
to it, affecting the overall performance.
2017-12-19 11:14:37 +09:00
Prince Kumar Dubey 284276b2ec ecore: removing assignment operation to avoid warning.
Summary: assignment to local variable "ret" has no meaning as it is not used after assignment. So, removing assignment operation to avoid warning.

Reviewers: raster, cedric

Subscribers: jpeg, rajeshps

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-10-16 13:29:02 -07:00
Prince Kumar Dubey 41197981ab efl: unsigned int/long never be less than zero. Fixed.
Reviewers: raster, cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:07:28 -07:00
Mike Blumenkrantz 72e9d604a3 ecore-x: reject successive MappingNotify events if they are identical
in some cases loading an xmodmap on enlightenment startup can trigger an infinite
number of identical events which hard locks the xserver for a very, very long time

@fix
2017-09-22 10:10:07 -04:00
Jean-Philippe Andre 5c8670fb2b ecore_x: Avoid crash on NULL
This happens in E with software compositing, since E's commit
5702f0975e890f07cfb. E should be fixed shortly but segv is not
acceptable. Without segv E is still massively broken so it's
not like the bug would be hidden (large black areas in windows,
after switch vdesks with enough windows).
2017-08-02 13:34:45 +09:00
Marcel Hollerbach aca00f8502 ecore_x: init XEvents before passing to x
it turns out that xlib is going to copy the complete struct into
something internal. This might lead to the condition that a uninitalized
value might be part of the struct, and when later the struct is read
again the code might do wrong stuff since that value could be set now to
a randomly other meaningfull value.

This turned out on me in e as i could not write any letters like ßöäü,
since that lead to a not returning call to _XReply internal of xlib.
Dugging that showed that xlib was waiting on a reply of a call that
never got executed, and the XEvent it is waiting on just contians a
randomly correct value.

@fix
2017-08-01 18:16:23 +02:00
Carsten Haitzler d371ece4a9 ecore x - convert to using unsed instead of dummy state,ents after ret
found by PVS studio
2017-07-31 12:12:40 +09:00
Carsten Haitzler 7620d5d957 ecore-x - remove useless extra assignments of value to itself
usless code that does nothing - not a bug though

found by PVS studio
2017-07-29 11:22:54 +09:00
Carsten Haitzler 52fdb5e830 ecore-x - add ecore x dpms force api
add api that allows us to force dpms on or off. needed to fix e
support for non-suspend new systems that don't do S3 ...

@feature
2017-07-04 14:50:53 +09:00
Chris Michael cd311db990 ecore-x: Minor formatting fix
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-09 12:29:25 -04:00
Jean-Philippe Andre 64b90fd22e ecore_x: Fix build warning (invalid enum used) 2017-05-16 20:47:48 +09:00
thierry E 07024ab6c8 ecore_x: add function to show and hide X cursor.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-05-09 10:15:02 -07:00
thierry E 71c8f1de27 ecore_x: handle DPMS state for a more accurate idling evaluation.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-05-09 10:15:01 -07:00
Carsten Haitzler d8dd685966 window stacks - make these unstable bta api for now
until settled, make these as beta for now.
2017-03-28 13:51:39 +09:00
Cedric BAIL 4eeb4e8706 ecore_x: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Stefan Schmidt f4304615df ecore_x: add singce tags for ecore_x_stack_* functions added during 1.19 cycle 2017-02-14 21:47:15 +01:00
Marcel Hollerbach bcdde959e6 cmake: add ecore_x 2017-02-07 09:24:52 +01:00
Marcel Hollerbach e34f36be12 ecore_x: we dont need this version file anymore
it indicated a while back which backend was used, we only have xlib
left.
2017-02-07 09:24:52 +01:00
Carsten Haitzler cc5dd2bd87 efl window stacks - implement pop to for x11 in the portable way 2016-12-22 15:17:43 +09:00
Carsten Haitzler 39af0d88aa efl stack wins - add base property/boolean to indicate win is a base
part of adding stacks...
2016-12-20 10:57:55 +09:00
Carsten Haitzler 56b0b6490d ecore-x - add missing atom fetches!
ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_STATE
ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY
ECORE_X_ATOM_E_KEYROUTER_SUPPORTED
ECORE_X_ATOM_E_KEYROUTER_WINDOW_KEYTABLE

all had no atom fetches! fix..

@fix
2016-12-16 16:16:53 +09:00
Carsten Haitzler 90be06df9e ecore-x - add e stack type atom and api's to set and get it 2016-12-16 16:16:53 +09:00
Hannes Janetzek 1b0690dd9a ecore-x: fix Mode_switch key mapping
- remove redundant XKeysymToString when sym == sym2

@fix
2016-12-15 11:35:41 -05:00
Jean-Philippe Andre 4722b685cf ecore_evas/x: Inform WM about borders and shadows
This exploits the existing X Atom "GTK_FRAME_EXTENTS"
2016-11-23 13:04:12 +09:00
Gustavo Sverzut Barbieri 010b14bc37 ecore_x_vsync: not using Ecore_Con.h anymore. 2016-11-21 19:47:35 -02:00
Carsten Haitzler 4ed2e01591 remove xcb support in ecore_x and evas engines as per mailing list
as per mailing list discussion about dropping xcb support now. it
hasn't been complete for a long time, thus not recommented for being
turned on. as we are moving to a wayland world xcbmakes even less
sense. as agreed, time to clean up a bit and remove a distraction as
well as not well tested code. this also updates po's too.

@feature
2016-11-03 22:22:54 +09:00
Carsten Haitzler 973eaedf51 improve responsivness of timer sleeping threads for vsync with prctl
prctl allows us on some platforms to request a thread be woken up more
agressively e.g. due to a timeout bu setting timerslack. since we use
a dedicated thread just for vsync events, this is a very good idea to
ask the kernel to be as exact as possible for this thread as it only
wakes up once per frame (or should only) and accuracy is important. so
use this.

also improve prctl checks to be more explicit in configure.ac and use
these ifdefs in ecore exe too where prctl is used as well.

@feature
2016-10-28 22:58:36 +09:00