Commit Graph

55 Commits

Author SHA1 Message Date
Marcel Hollerbach 841c8f477f focus: do not revert to another client when client is unfocused
This was a nice idea to fix most focus bugs at once. However, due to the
runtime of e many things can get "randomly" focused, for exmaple: volume
control on the frame, internal dialogs, config value screens when
grabbing for keys, widgets when they get created in a gadget. The list
is quite long. However, fixing all those little bugs is hard and partly
impossible as the behaviour is correct in the context of a toolkit, not
in the context of a compositor.

Long term we should split window-focus and canvas-focus from each other,
then bugs like these would not be a problem anymore.
2022-01-09 15:51:34 +01:00
Elyes HAOUAS 3524bc167c tree-wide: get rid of trailing whitespace (part 1)
Remove trailing white spaces.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11780
2020-05-14 12:30:31 +02:00
Carsten Haitzler bcd612e78d revert last focus fixes - they both end up worse than before.
Revert "fix spurious pointer jumps due to previous commit bugfix"
This reverts commit 550de9a680.
Revert "focus - fix emacs buffer switch focus set reported by felipe"
This reverts commit 690ab94c06.
2020-04-17 19:02:23 +01:00
Carsten Haitzler 550de9a680 fix spurious pointer jumps due to previous commit bugfix
690ab94c06 fixed one bug and added
another - this fixes the other spurious pointer warps.
2020-04-17 18:50:13 +01:00
Derek Foreman 73aecd73ab Replace all timer_add with timer_loop_add
So yeah, I've literally used sed to replace every occurrence of
ecore_time_add() with ecore_timer_loop_add() because I'm reasonably
confident that no part of E has a legitimate need for timer based on the
exact current time.

It would be really nice if I'm not wrong. :)

The reason for this is the incredible spew of clock_gettime() calls I'm
seeing on an ARM system (that should have a vdso for gettime, but...)
This can amount to thousands of system calls per second.

 #YOLO
2017-02-03 15:52:28 -06:00
Carsten Haitzler 3903d44666 e - BLOODY BUILD AGAIN - DAMN FLOAT WARNINGS...
i swear ... all of this shit over a warning that CAUSED more bugs than
it eveer fixed? sersiously...

ARGH!
2017-01-07 14:05:17 +09:00
Mike Blumenkrantz c242029cf7 resolve widget-related float-equal warnings
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-01-06 12:57:33 -05:00
Mike Blumenkrantz 33ec963be2 redo all x11 client mouse grabbing for focus
I did an audit of this and it seemed that it no longer served the purpose
for which it was originally intended. specifically, this is for enforcing
click: raise/focus options, and so grabs must be in play on client windows
only when they are not focused to ensure that we get mouse events and can
then focus them. the grabs must then be removed once the window has focus
to avoid spurious mouse eventing
2015-07-01 15:26:28 -04:00
Carsten Haitzler afb62b4989 e passive window grabs - fix side-effect leave/enter events on clients
when you have click to focus we have a passive grab set up. somewhere
that window changed to the parent window instead of the client. this
leads to a side effect of a leave and enter event on clients for every
click. generally clients are ok with this, but some seem to have buggy
event handling. these enter/leave events are a side effect of the
passive grab even though we allow/replay the event.

this fixes that by placing passive grabs on the client window itself
instead of the parent.

@fix
2015-06-28 17:24:29 +09: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 3e50235e5b fix comp fake layer init for wl compositors
fix T2363
2015-04-24 14:12:44 -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 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 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 bd6bbdd5f4 only set mouse-in focus if target window is not already the focused window
T483 again
2013-12-20 15:50:16 -05:00
Mike Blumenkrantz 848dec15fb revise d739ed0e2e to not break changing focus policies
thise commit added focus_policy member to E_Border as something to be used for setting a per-window focus policy. setting it on each window is a huge pain if the global policy ever changes, so it's better to use this member only as an override for the global policy which can be checked to see if it's been set
2013-11-21 12:38:35 -05:00
Sebastian Dransfeld d739ed0e2e handle desktop applications better
Fixes T201
2013-11-21 13:26:09 +01:00
Mike Blumenkrantz d17ab08019 block mouse down focus event focus setting on already-focused windows
fixes steam menus with click focus, which previously would close immediately after opening when they lost focus
2013-11-20 15:32:30 -05:00
Mike Blumenkrantz f1a65ee922 remove "border_raise_on_focus" config option
buckle up. for the first time in history, a config option is getting removed instead of added.

the reasons for this removal are many, but let's go way back to the beginning and see why it was added:
oh wait, we can't because the commit message (from 2006) is

>>    patches that i said were in - commit. (see my reply emails)

>>    also finish off a TODO item or 2

reading through the TODO items which were also crossed off in that commit, I'm assuming that this was the "option to NOT raise on focus in click to focus" item.

== REASON 1 ==

the problem here is that there's another, BETTER option called "click raises window" (always_click_to_raise) which does the same thing, except it doesn't totally fuck you when you get a random X focus event, which happens more often than you might think.

this means that, to avoid broken behavior which might cause your windows to spastically raise for a few frames in common cases (using winlist...) with click-to-focus, you have to know that this is the default-enabled option that's fucking you, and you have to remember to manually disable it every time. if you DON'T know that this is the option that's fucking you, and you just see windows randomly raising on their own, you'll probably either ignore it or file a bug, when this is supposed to be a "feature" that actually worked in reverse, since it was intended only for disabling.

== REASON 2 ==

there's also auto-raise, which can be set to 0.0s, which is effectively the same thing since it also triggers on focus but can be configured not to fuck your window stack

== REASON 3 ==

aaand finally, this option makes any sort of pointer focus model impossible to use, since your windows will constantly be raising all over as you move the mouse

tl;dr: I'm removing it, e-dealwithit.gif
2013-10-07 06:49:33 +01:00
Mike Blumenkrantz 1f442e8d96 always raise with click-to-raise. seriously this time. ALWAYS. 2013-09-25 08:25:24 +01:00
Mike Blumenkrantz 68f9e980e7 first we check focus model WITHOUT also applying automatically applied raise option, then we check focus option, THEN we check raise option 2013-09-05 13:44:34 +01:00
Mike Blumenkrantz 6074a0b25f click to raise ALWAYS raises. ALWAYS. 2013-09-05 13:42:48 +01:00
Mike Blumenkrantz d26ad22720 fix raise on focus setting 2013-08-19 10:00:48 +01:00
Mike Blumenkrantz ae8d726c5a remove old x focus hack for mouse in 2013-05-22 11:06:31 +01:00
Mike Blumenkrantz 60ad9ed93e formatting
SVN revision: 74850
2012-08-03 14:02:14 +00:00
Mike Blumenkrantz 207c0aed10 rename E_BINDING_CONTEXT_BORDER to E_BINDING_CONTEXT_WINDOW: technically this is in reference to an E_Border, but it gets confusing when looking at code that deals with both windows (E_Borders) and window borders/frames themselves. this name change will clarify the difference
SVN revision: 71841
2012-06-08 10:10:16 +00:00
Hannes Janetzek f3b8b6ccb7 e17: remove redundant checks. lock_focus_out is check in e_boder_focus_set*
SVN revision: 57648
2011-03-10 02:44:02 +00:00
Sebastian Dransfeld cb22b9355f Need to be able to set focus several times
When a modal window closes, we get several mouse in events for some
reason. If we are not able to set focus several times, the focus ends up
the wrong place.

SVN revision: 56937
2011-02-10 21:39:15 +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
Christopher Michael 90fd4f14bf Add __UNUSED__ where needed.
SVN revision: 51309
2010-08-18 18:17:04 +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
Cedric BAIL c6a118d738 * e: remove warning due to Ecore API change.
SVN revision: 49833
2010-06-24 16:19:12 +00:00
Carsten Haitzler 4513a24797 no more round trips! bad bad bad!
SVN revision: 46459
2010-02-25 12:26:10 +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 97eec41ad9 patches that i said were in - commit. (see my reply emails)
also finish off a TODO item or 2


SVN revision: 23267
2006-06-07 23:30:15 +00:00
sebastid 6a638a7806 Fix EAPI warnings.
SVN revision: 19597
2006-01-07 10:39:46 +00:00
Carsten Haitzler 0b001f8114 '
turn off click always focuses by default


SVN revision: 18763
2005-12-01 09:06:23 +00:00
rbdpngn 13d9bc775a Delete the old timer before setting the timer pointer to NULL.
SVN revision: 17045
2005-09-28 19:44:58 +00:00
tsauerbeck e3822ca730 'clicking-a-window-always-focuses-it' otherwise known as 'always-click-to-focus' is in. doesn't apply instantly, need to restart. i think that's the same with always-click-to-raise, so i'm not trying to do something about it
SVN revision: 16992
2005-09-27 16:36:14 +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 00616d3fec wheel bindings! WERD! hard-coded ones for now, need to make these config
values that can be set/changed/deleted via ipc and are saved/loaded :)


SVN revision: 16847
2005-09-22 12:47:45 +00:00
Carsten Haitzler 9e7cd72067 ok lots of things here...
1. e17 is now relocatable. the wm will determine its install prefix on the
fly when it is run. so you can use --prefix=/usr/local/e17 and just move the
base dir (/usr/local/e17) to anywhere you like at any later time and e will
adjust and find it. it still has built in fallbacks too so it will use the
compiled prefix as normal if its hunting and 2 checks dont pass.

2. edit mode for gadgets will work with alt+left click on a gadget and
instantly end when u lift the mouse. alst ctrl+alt+g will activate/deactivate
edit mode

3. borderless windows are not allowed to be shaded

4. shaded windows are not allowed to have their border changed

5. just have never seen the pager mess up bug - so until there is some way
of reproducing it or even knowing its still there - remove

6. autoraise timers should be fixed on focus changes

7. stickiness remembering works in the pager now on start of a remembered app


SVN revision: 15966
2005-07-31 06:22:31 +00:00
Carsten Haitzler b7e6e8b1f2 implement most of the locks
SVN revision: 15638
2005-07-04 10:24:22 +00:00
Carsten Haitzler 4c016e0a0a grab buttons 1, 2 and 3
SVN revision: 14919
2005-05-23 06:09:52 +00:00
sebastid 9fd4cc15e7 Sloppy focus.
SVN revision: 14875
2005-05-20 18:46:32 +00:00
Carsten Haitzler 3520914ccd and now it shoudl be able to change click to focs <-> mouse focus dynamically
and it all shoudl work - i hope.


SVN revision: 14870
2005-05-20 10:14:51 +00:00
Carsten Haitzler 38ab99da69 click to focus works... if you turn it on and restart.
SVN revision: 14869
2005-05-20 09:27:06 +00:00
Carsten Haitzler 45a7d1f244 some virtualisation of focus
SVN revision: 14867
2005-05-20 07:32:42 +00:00
sebastid e61b2b515a Compiler warnings.
SVN revision: 14730
2005-05-12 13:56:30 +00:00
sebastid 7857096ed3 Formatting
SVN revision: 13240
2005-02-08 11:51:41 +00:00