Commit Graph

49 Commits

Author SHA1 Message Date
Marcel Hollerbach d8a4888142 e_grabinput: do not pass a faulty time
Summary:
currently there is ecore_x_current_time passed, which is the time of the
last event. if this is passed to ecore_x_window_focus_at_time the request can be
ignored because the last event can be in the past. Instead using
ecore_x_window_focus fixes this, because current time is passed, which
means that x is just using this event at the time it is called.

@fix T2948

Test Plan: Try to run spotify and try to trigger the bug, I cannot anymore.

Reviewers: zmike

Subscribers: cedric, billiob

Maniphest Tasks: T2948

Differential Revision: https://phab.enlightenment.org/D3471
2016-01-10 12:19:05 +01:00
Mike Blumenkrantz ed51a3ea61 remove wayland function usage from grabinput methods
these never did anythng useful and no longer even compile
2016-01-06 13:02:41 -05:00
Chris Michael f5741f1cb4 Fix using global ewd variable by making it part of e_comp_wl
ref T2919

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-09 13:16:48 -05:00
Chris Michael 86d5cfb939 port e_grabinput to use Ecore_Wl2
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-09 13:16:48 -05:00
Mike Blumenkrantz fa75d181d4 block internal usage of x11 input grabs under wayland
these shouldn't be necessary since we control the input
2015-08-06 19:31:20 -04:00
Mike Blumenkrantz 17f0ce3713 move grabinput focus fix timer to x11 compositor and fix it to Work Better
see inline comments about x11 focus eventing for details

fix T2547
2015-07-06 15:46:02 -04:00
Mike Blumenkrantz 2d3c43a39c replace some x11 compositor checks with calls to util function 2015-07-01 16:25:45 -04:00
Chris Michael 28c8392a5c correctly fix check for compositor in e_grabinput
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-01 12:20:32 -04:00
Chris Michael 09592f57ff e_grabinput: Don't call ecore_x functions if we are not an X compositor
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-01 12:17:54 -04:00
Mike Blumenkrantz c8bdacc727 fix grabinput to work better with multiple compositor backends
check root window to determine existence of X11 compositor,
use both wayland and non-wayland define codepaths where available
2015-06-25 20:12:03 -04:00
Chris Michael 0a94e8ba71 enlightenment: Make E build again with EFL from git
sed -i 's/EAPI/E_API/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 15:13:10 -04:00
Mike Blumenkrantz 76eec883b7 add e_grabinput_mouse_win_get() 2015-04-27 14:31:52 -04:00
Mike Blumenkrantz 471dcb24cb __UNUSED__ -> EINA_UNUSED
this has been bugging me forever. __UNUSED__ is no longer a valid macro here.
2015-03-18 18:09:09 -04:00
Chris Michael 323f41122e pass the proper window to ecore_wl functions
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-29 10:15:36 -05:00
Chris Michael 6f2f7c0e94 fix copy/paste errors
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-29 10:12:08 -05:00
Chris Michael a889f55c34 start making e_grabinput work for wayland (nb: not finished yet)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-29 09:54:43 -05:00
Mike Blumenkrantz 3e5b2ba96a move more grabinput code to not fail in wl
#barrel
2015-01-22 15:45:16 -05:00
Mike Blumenkrantz 5e5a533a6d move grabinput focus fix timer to be X-only 2015-01-22 15:30:25 -05:00
Mike Blumenkrantz 0d82fcf71c remove e_comp_get() use in grabinput 2015-01-20 19:20:07 -05:00
Chris Michael e82da5e67a cleanup compiler warnings when building for wayland-only
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-03 14:02:25 -04:00
Chris Michael 915f8f0613 @bugfix: Fix building for WAYLAND_ONLY by using the proper define
sed -i 's/WAYLAND_ONLY/HAVE_WAYLAND_ONLY/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-18 07:43:04 +00:00
Mike Blumenkrantz 12d7405a0f huge wl fixup (wayland clients actually working again)
* try to clear up build system for separating out ecore-x

* add #ifdefs for lots of ecore-x stuff

* break out some internal e wl functions for reuse in api

* store wl surface buffers as an inlist

* add protocol-specific client compositor data

** move lots of X client attributes here

* add pixmap type checks to a number of X-specific things, such as grabinput, to block them for non-X clients

* rearrange startup order to work with wayland

* move X screensaver code to e_comp_x

* flag modules still requiring X with -DNEED_X
2014-01-14 20:28:57 -05:00
Mike Blumenkrantz 86656e4df9 compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.

* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.

** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes

** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects

** protocol-specific window management and compositor functionality is now kept exclusively in backend files

** e_pixmap api provides generic client finding and rendering api

** screen/xinerama screens are now provided directly by compositor on startup and re-set on change

** e_comp_render_update finally replaced with eina_tiler

** wayland compositor no longer creates X windows

** compositor e_layout removed entirely

* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra

* e_manager is just for screensaver and keybind stuff now, possibly remove later?

* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor

** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.

*** do NOT set interceptors on a client's comp_object. seriously.

* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor

* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get

* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas

* deskmirror is (more) broken for now

* illume is totally fucked

* Ecore_X_Window replaced with Ecore_Window in most cases

* edge binding XWindows replaced with regular canvas objects

* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result

comp files and descriptions:

e_comp.c - overall compositor functions, rendering/update loop, shape cutting

e_comp_x.c - X window management and compositor functionality

e_comp_wl.c - Wayland surface management and compositor functionality

e_comp_canvas.c - general compositor canvas functions and utilities

e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems

additional authors: ivan.briano@intel.com

feature: new compositor

removal: e_border, e_container, e_popup
2014-01-14 20:22:02 -05:00
Mike Blumenkrantz 9e8e755cdf formatting: all at once
SVN revision: 82625
2013-01-11 10:34:29 +00:00
Mike Blumenkrantz 23d0765d1a add function to return current key grab xwin
SVN revision: 80093
2012-12-03 19:03:49 +00:00
Christopher Michael 84d21bd8e5 E: Comment out fprintf's remaining from someone's debug efforts ;)
SVN revision: 75433
2012-08-19 16:46:32 +00:00
Carsten Haitzler 1739590e05 fix wad of focus issues with click-to-focus and alt+tab + fullscreen
windows.



SVN revision: 75399
2012-08-18 04:40:56 +00:00
Mike Blumenkrantz af81e70591 false alarm: this doesn't break java focus, java breaks java focus.
SVN revision: 72757
2012-06-24 08:02:00 +00:00
Carsten Haitzler 4cbdcf4def breaks java! yay!
SVN revision: 72756
2012-06-24 07:50:02 +00:00
Carsten Haitzler b2fec5b8dc try and address some focus issues...
SVN revision: 72751
2012-06-24 04:18:01 +00:00
Vincent Torri c3b0637802 e17: whitespaces--
SVN revision: 72561
2012-06-21 06:19:43 +00:00
Mike Blumenkrantz 984d2c1869 ecrustify
SVN revision: 69035
2012-03-07 22:53:50 +00:00
Carsten Haitzler 0149e51aaa focus using current time gotten from event stream.
SVN revision: 66899
2012-01-05 10:08:08 +00:00
Hannes Janetzek c51acd3708 e17: set focus at the end of border_idler_before to the last focused window.
No need to sync ecore_x_window_focus then. in next mainloop 
iteration all requests should have been processed by X, or doesnt it? 


SVN revision: 57647
2011-03-10 02:29:01 +00:00
Sebastian Dransfeld 816ca3b8fb Delay sending focus
This results in less flickering when we get a storm of in/out events

SVN revision: 56939
2011-02-10 22:16:07 +00:00
Gustavo Sverzut Barbieri 6f2213cb25 convert init/shutdown to EINTERN, move some to _update().
Do not abuse the concept of e_*_init(), make them call-once and those
that needed multiple call are renamed to e_*_update(). To make sure
convert them to EINTERN so the symbols are not exported.

Actually I guess too much is exported as EAPI while they should be
EINTERN, but that would require manual investigation, while this patch
was basically created with sed + grep.



SVN revision: 54795
2010-11-22 15:21:32 +00:00
Lucas De Marchi 6638a10e20 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00
Carsten Haitzler d58712dd80 lets sync on focus - just in case.. butit doesn't seem to help :/
SVN revision: 41834
2009-08-17 07:52:59 +00:00
Carsten Haitzler cb99a78862 fix placement to actually respect overlay allow of shelves
SVN revision: 41376
2009-07-17 01:42:37 +00:00
Carsten Haitzler e9b740c27d use the loop_time - better synced anim timepoints and less overhead on
gettimeofday :)



SVN revision: 37393
2008-11-02 02:36:10 +00:00
Carsten Haitzler dbaf8091ff emove debug printf's
SVN revision: 35676
2008-08-26 04:12:41 +00:00
Carsten Haitzler 6c0718f75f add soem debugging.
SVN revision: 35675
2008-08-26 03:04:07 +00:00
Christopher Michael c877cdcf42 Set the proper grab_mouse_win to zero when releasing grabinput.
SVN revision: 33453
2008-01-12 00:13:31 +00:00
sndev 2df7ab1a6a * Fixing missing 'return 1' in e_grabinput.c
SVN revision: 21003
2006-03-04 12:38:18 +00:00
Carsten Haitzler b089c7d1e3 add a preview widget (includes a livethumb for live downscaling - notice
previews of animated bgs's... animate now). fixed problems with image widget
withleaks and other stuff... also desklok tries to abord if grabs fail and
agressively tries to disable existing grabs


SVN revision: 20987
2006-03-04 04:11:51 +00:00
sebastid 6a638a7806 Fix EAPI warnings.
SVN revision: 19597
2006-01-07 10:39:46 +00:00
Carsten Haitzler 9063352d93 oh for gods sake! now all day was sunk into getting focus fixed for dialogs.
argh! i'll have to do the app cache after this... grrr....x


SVN revision: 16905
2005-09-24 09:04:39 +00:00
Carsten Haitzler c71c21a19d and now make sure focus goes to the right place on de-iconfiy and stuff
SVN revision: 15709
2005-07-10 10:48:08 +00:00
Carsten Haitzler 91091f83e5 grabinput handling that allows winlist to pop up FROM the menu etc. hmm -
maybe i should have a stack of these too in grabinput that sends the input
back to the previous owner if its still there... and also actually send pings
around to clients every 10 seconds or so - if they dont respond, we have a
function that can do something - but right now it does nothing. shoudl mark
the window as "hung"


SVN revision: 15445
2005-06-20 08:56:54 +00:00