Commit Graph

303 Commits

Author SHA1 Message Date
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
Elyes HAOUAS 153f479d3f tree-wide: fix typos all over the place
Fix some typos

Differential Revision: https://phab.enlightenment.org/D11778
2020-05-14 12:04:51 +02:00
Carsten Haitzler 273ec41687 e actions - handle params not being provided by user bindings
fix CID 1425456
2020-04-23 01:00:10 +01:00
Carsten Haitzler c16a58d75f warn - silence invalid alignment warning
these potrs are to structs we malloc thus will be universally aligned
for all data so... not valid. throw in a void * cast to do that.
2019-09-20 10:54:12 +01:00
Carsten Haitzler 48c4ea17f2 e - fix up resize/move by kbd to work again
this used to work years ago ... it seems tihave broken. this fixes it
all up to work again so you can bind a move/resize of a window tothe
kbd and then use arrow keys etc. like you used to....

@fix
2019-09-04 19:17:12 +01:00
Carsten Haitzler cbe3858b15 desklock - add explicit manually invoked api and a blocking api
this is so parts of e (moduels etc.) could block a lock for some
reason and differentiate between an automatic lock and a manually
invoked one.
2018-12-15 16:13:28 +00:00
Carsten Haitzler 5a1e9a995c e laptop lid fixes to bring back behavior and trim down glitches
so i spent a few days lopening and closing the lids of a few laptops,
plugging and unplugging external screens in, plugging and unplugging
ac power and doing lots of combinations of these. this led to a whole
slew of interrealted issues that were pretty hard to detangle into
just single issues, so this is all one blob.

this fixes:

1. if a lid close gets a monitor unplug from x or e's randr wants to
unplug then this lead to slow unsuspend or lid open times as e was
reconfirguring the screens entireluy on lid open. dont do that. just
keep things as is, unless we have an external display, then reconfigure.

2. we had 2 systems monitoring for a wake. a poller and a systemd
event. this was redundant and lead to interesting things in the debug
output, so clean that up and on systemd systsems use the systemd wake
events

3. some systems dont shut down their screens on lid close, so they
stay open until screensaver timeouts kick in. bad. so also force the
screen to go off on lid close (if the lid screen is the only one we
have).

4. x seems to have a bug where if you force dpms off etc. to turn the
screen on, it still thinks it's of and wont dpms off again after that
until you eother give some input to have the wake event make the dpms
system in x think its now time to go on, or you toggle dpms on and
off, so i found toggling tricks x into thinking the right thing.

this makes some debugging also be consistent with printfs.

all in all i have a pretty well supported laptop doing swimmingly with
e and a not so well designed (acpi dsdt - missing many events like
acpi battery ones, ac power change acpi events, missing logic to power
off a closed screen in firmware or hardware and leaving it to sw...
not this laptop has a tocuh panel and extra fun points awarded since
the touch panel doesnt shut off on lid close... AND it reprots touch
events when it closes  as it touches the keys/case... hooray! that has
another work-around local to my system, as efl has no mechanism to do
this).

@fix
2018-05-18 21:45:20 +09:00
Carsten Haitzler 0fada40917 smart suspend - honor suspend on ac or not flag as it should
so if you closed the lid ANd didn't have external screens ANd had ac
plugged in ... e would suspend even if youdidn't have "suspend on ac"
checked in blanking dialog. respect this and handle it properly.

@fix

side note... i've notced acpid no longer reporting lid events on one
of my systems. this is very sucky. you now have to open
/dev/input/event2 (this may vary from device to device) to get lid
events... it's an input device. this means elput needs to start doing
this as we cant get power button or lid events anymore .... and we may
have to do this for x11 too.
2017-10-18 13:33:47 +09:00
Carsten Haitzler 041748b017 window focus - fix focus switch action next/prev walk dead code 2017-09-09 09:57:22 +09:00
Mike Blumenkrantz 5dc267ec84 block all desk flips during window resize
this breaks *

fix T5984
2017-09-06 13:32:25 -04:00
Mike Blumenkrantz ef6197b119 do not force client focus setting after calling e_desk_last_focused_focus()
in some cases focus setting must be deferred, and forcing focus in these cases
will create focus bugs

ref 9ae24a3a4a
2017-09-01 13:40:12 -04:00
Mike Blumenkrantz 2afaea3b49 remove e_util_pointer_center()
this is yet another utility function which duplicates code from elsewhere and
does it incorrectly

fix T3164
2017-09-01 13:40:11 -04:00
Carsten Haitzler 9ae24a3a4a e client focus - fix focus if moving focused window to new desk - long
fix client focus the very very very long way vs
418319fc94
2017-09-01 19:29:03 +09:00
Carsten Haitzler 5ec93f15ff e actions - add actions for moving focus around - feature request
was simple. winlist already had it. added action to focus next/prev or
up/down/left/right. useful for tiling... :)

@feature
2017-08-29 20:31:30 +09:00
Mike Blumenkrantz c31cb51499 replace <br> with <ps/> for all text 2017-08-21 10:16:35 -04:00
Mike Blumenkrantz b246cc27ee handle focus reverting correctly when using desk flip all actions
perform the focus revert once the last desk has finished flipping and based
on all available visible windows

fix T3495
2017-08-18 15:52:50 -04:00
Mike Blumenkrantz a59328b34a add internal action for showing a menu using object geometry 2017-08-18 15:52:50 -04:00
Mike Blumenkrantz 5cfc3c846e make menu_show action pop the menu in automatically-calculated direction 2017-08-04 16:05:16 -04:00
Carsten Haitzler 9c984ea9cf e ptr cast via void fix to reduce warnings
so we cast a lot of ptrs to other types as that is then the actual
type of the object. all these objects are allocated by malloc nad
friends so this is ok. but gcc on arm is not happy and warns. maybe it
assume this ptr could be to an element in an array of structs of this
type and so on thus will have specific alignment enforced by compiler
but our casting may disturb it? anyway. cast via void first fixes it.
we can focus on other real warnings and errors instead.
2017-02-12 16:25:35 +09: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
Mike Blumenkrantz 7264ac9e96 resolve binding+action float-equal warnings
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-01-06 12:57:34 -05:00
Mike Blumenkrantz a6bed1841a use focused client for window actions if passed object is not a client object
in the case where an action is triggered from the compositor or manager contexts
the passed object will not be a client, causing actions to fail when they should
succeed

fix T3854
2016-06-09 11:26:17 -04:00
Carsten Haitzler 62bcd72eef e - suspend.hibernat intelligently - dont account for ac power
this means only lid/screen status affects intelligent suspending. it's
not what people expect and doesnt rely on ecore getting mains power
stuff right too.
2016-05-17 00:33:47 +09:00
Mike Blumenkrantz a9415f696b allow some client zone/desk move actions to occur on action client 2016-03-31 14:02:25 -04:00
Mike Blumenkrantz fe5d2e6e61 add bool return for mouse-based E_Action callbacks
in many cases, a mouse action's callback will fail to execute as a result of multiple
objects being under the pointer at the time of the event. in this case,
the callback should be able to determine whether action callback processing should
continue.

as an example, when attempting to execute an action which only activates for
client objects, if the passed object is not a client then the callback should return
false to indicate that it was not able to perform the action for the given object,
allowing further actions to be attempted on this object
2016-02-03 18:09:18 -05:00
Mike Blumenkrantz ba40fb5cb4 add wayland-only mouse action for translating a button press to a key
in some cases it might be desirable to remap a mouse button to a key.
this is not very user-friendly since it requires device-specific key names
which need to be translated to/from files such as /usr/share/X11/xkb/keycodes/evdev

 #SamsungFeatures
2016-01-20 17:05:30 -05:00
Mike Blumenkrantz 00d3cdd7ab remove WAYLAND_ONLY ifdefs from kbd layout change actions 2016-01-19 16:03:58 -05:00
Mike Blumenkrantz 2b38eb9712 block border-affecting client functions for csd clients 2015-09-24 16:33:56 -04:00
Toan Pham d3a1a72b98 added quick tile to corner feature
Summary: added quick tile to corner feature, Fixes T2408

Reviewers: zmike

Subscribers: abyomi0, cedric

Maniphest Tasks: T2408, T2419

Differential Revision: https://phab.enlightenment.org/D2638
2015-06-16 15:08:21 -04:00
Toan Pham fa40a9406b fixed window focus and keyboard input issues
Summary: fixed window focus and keyboard input issues if the to-be-focused window is in an iconized state

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2644
2015-06-11 20:05:09 -04:00
Toan Pham 09d9384f1d Changed search pattern to focus window by name to case-insensitive.
Summary: Sometimes a window has a name that's not like the application name, for example.  chromium-browser application will have a window name: Chromium-browser.  Most users will try to match the window name with "chromium-browser", but it wont work b/c the e's window name match is case sensitive.  Most users, would not know that the window name of chrome is "Chromium-browser", so it is pretty much impossible for them to setup a focus-to-window-name binding properly.

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2645
2015-06-11 14:38:10 -04:00
Nicolas Marcotte 3e3dc6dcc5 added a macro and a fucntion to switch to desktop D on screen S as specified in https://phab.enlightenment.org/T2218
Summary: Merge branch 'master' of https://git.enlightenment.org/core/enlightenment initnal implementation of https://phab.enlightenment.org/T2218

Reviewers: raster

Subscribers: raster, cedric

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

Fixed:
Modified patch to use existing macros for walking all screens.
2015-05-15 16:13:13 +09:00
Daniel Kolesa 82116f63ab remove str(n)dupa usages
str(n)dupa are GNU extensions that duplicate a string, using an alloca'd
buffer. This patch removes their definitions from e.h (which should only
contain E's own API, without fallback definitions for libc functions)
which were wrong anyway (they failed in cases where str(n)dupa was an
actual function, not a macro).

Instead, we replace them depending on context with alloca+memcpy+strlen
or a static buffer (used in contexts where we are sure that the buffer
will contain the string entirely)

@fix
2015-05-11 16:45:30 +01: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 b632afa546 more accurately determine whether a mouse grab is active in some parts of e 2015-04-27 14:32:19 -04:00
Mike Blumenkrantz 8ed4ee3b38 remove E_Comp->x/y
canvas coords start at 0,0...always
2015-03-19 16:59:59 -04:00
Mike Blumenkrantz 58447e9508 completely remove E_Manager
the final step in flattening all the canvas/screen apis
2015-03-19 16:53:32 -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
Mike Blumenkrantz 09ec213a31 remove e_util_zone_current_get() usage 2015-03-13 17:58:45 -04:00
Mike Blumenkrantz ba7c1ac49c remove E_Zone->comp member 2015-03-13 17:44:24 -04:00
Mike Blumenkrantz 34d906fa42 e_zone functions no longer require E_Comp param 2015-03-13 17:28:49 -04:00
Mike Blumenkrantz 1fe1c94245 comp canvas functions no longer require an E_Comp param 2015-03-13 16:07:08 -04:00
Mike Blumenkrantz 91edd1ce2f E_CLIENT_*FOREACH() macros no longer take a E_Comp param 2015-03-13 15:45:07 -04:00
Mike Blumenkrantz 091142b032 remove E_Client->comp 2015-03-13 15:41:21 -04:00
Mike Blumenkrantz b8d4072a13 e_util_comp_zone_number_get() -> e_comp_zone_number_get() 2015-03-13 15:18:16 -04:00
Carsten Haitzler 7faf6666e5 e - actions - smart suspend/hibernate - also dont do when on mains power 2015-02-23 12:11:50 +09:00
Chris Michael 0094ba4bf7 enlightenment: Fix building for wayland-only
We don't have e_randr2 calls for wayland yet, so ifdef those out if we
are building for wayland only

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-17 10:46:19 -05:00
Carsten Haitzler c37a55d573 actions - add smart suspend + hibernate actions for laptop usage
this adds 2 actions that only suspend a laptop (or hibernate) if there
are no external screens enabled. if there is no lid screen eg like a
desktop, then it will still go on as usual.
2015-02-15 10:53:54 +09:00
Chris Michael 56da400c39 make enlightenment build again for wayland-only
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-26 08:54:38 -05:00
Carsten Haitzler 33d4531f1d e - rewrite randr code entirely. core and dialog. dialog is basic atm
the dialog for now is simple and lets you just raw edit the properties
per screen in a dialog. nothing fancy. not user firendly. but it works.

the randr core has been totally rewritten and tested against a range
of drivers and setups before even getting a commit. it works solidly
and configures screens reliably now. drivers tested:

nvidia
intel
radeon

some drivers still are unreliable in terms of delivering plug/unplug
events for outputs (both intel and radeon are flakey - nvidia is solid
and reliable). so to fix this there is now a screen redo action you
can bind to a hotkey or something and have e re-evaluate current
screen setup and apply ny pending config if needed.

also to make reconfiguring prettier the screen is faded to black
first, then configured, then faded back in. some drivers work
flawlessly with this, others still flicker some garbage.

i admit - i haven't tested nouveau, but my general take on this is the
randr code is now in far better shape than where it was (minus pretty
and easy dialog). the dialog can be done next, but i'd like to get the
core in now for more testing.

@fix
2015-01-25 22:50:23 +09:00