Commit Graph

67 Commits

Author SHA1 Message Date
Carsten Haitzler f6e4be1005 e wl screen dimming.blanking/timeouts/lock handling redo/fixup
so there was a fair bit of stick-tape and chewing gum in putting the
wl screensaving in e_Screensaver.c ... it thus was very different to
the x stuff. it SHOULd have had e_comp_wl handle idle timeout like the
xserver did and then glue in the same way the x code did to be
conistsent. instead of trying to fix the chewing gum ball there in
e_Screensver.c to find the logic holes ... i made it work like the
code as indicated above. this now makes it work reliably. dim
reliably. lock reliably. it even doesnt exit on ctrl+alt+backspace
once desklock is up now to allow locks to really lock... (dont use
locks during dev then if you need ctl+alt+backspace).

at least now all this dpms/screensavwr/brightness/backlight/lock goop
is consistent between wl and x11 and wl seems reliabkle now (to me).

knock this off as an annoyance fixed.

@fix
2020-06-28 15:06:37 +01: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 2c91a2c24d backlight - update timer on power plug/unplug
this ensures a different timeout can be applied if you plug or unplug
power.
2019-09-21 23:04:09 +01:00
Carsten Haitzler 1783c32839 backlight - add battery timeout in addition to regular dim timeout
this allows for a shorter timeout when on battery vs when on ac for
backlight dimming. this is actually important so when on ac dimming
can interrupt minimally bur when on battery it can be much more
aggressive.
2019-09-18 18:59:54 +01:00
Carsten Haitzler d961e31436 blanking - special timeout immediately and force dpms todo
make special timeout universal and in all cases. cleaner with better
power management as we turn off bakclights earlier in some cases etc.
2019-09-11 10:56:21 +01:00
Michael Bouchaud (yoz) 5cded14b76 screensaver: Allow to set hibernate on blank into blanking setup
Summary:
This patch introduce an alternative to suspend on blank.
Hibernate on blank.

@fix T1886
@features

Reviewers: zmike!, devilhorns

Subscribers: cedric

Tags: #enlightenment-git

Maniphest Tasks: T1886

Differential Revision: https://phab.enlightenment.org/D7602
2019-05-16 13:50:27 +01:00
Carsten Haitzler 839d7f4dc2 e blanking - offer option to not use dpms
so a new bug in a gpu driver. if dpms is enabled, wakeup doesn't
happen. mouse doesn't do anything, rendering doesn't happen... i can
use the keyboard and ctrl+alt+enmd restart e or killall -HUP
enlightenment and e restarts and renders ... but nothing appears.
interestingly if i let it timeout again and wake it up a second
time... things render (but e is confused it seems and mouse input
doesnt work until i restart e). it's some kind of xorg/driver bug here
with this dpms - no dpms and all is fine. all e does with regards to
dplms is enable or disbale it (and set the timeouts) so e isn't doing
antyhign special otherwise with dpms on vs off ... so somethnig deeper
down the stack here, but to get a desktop that works at least for now,
add an option to not use dpms.
2018-07-17 13:19:48 +09: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
Mike Blumenkrantz c31cb51499 replace <br> with <ps/> for all text 2017-08-21 10:16:35 -04:00
Carsten Haitzler f43d2b881c e blanking - add new special "locked timeout" that can be shorter
this allows you to have a different timeout when locked thats much
shorter to save screen/power more unless you log in.

@feature
2017-07-14 09:43:29 +09:00
Carsten Haitzler d0c5fb465b support connected standby (non-s3 sleep/freeze) that new lpatops sport
this requires we have to force dpms on to reduce power. to avoid
glitches with the pointer staying around in x we need to support
suspending it too so it hides cleanly like the screen dims or undims.
also use the new powersave freeze mode to do this.

note that i've tested this on s3 supporting laptops and non-s3 and it
"works for me". it may require more testing and work. there is more to
power saving than just this as well but for now that's out of scope as
you have to mess with linux device autosuspend timeouts and a bunch
more (wowlan ... blahblah).

i need to find the source of the intermittent wakeups too in e. there
is a long lived timeout (8-ish seconds?) but more specifically e keeps
waking up from fd's and then reading /sys stuff about battery - some
event is causing us to do this... maybe to suspend this or make
battery checking very rare when in freeze mode (or screen off) etc.

so this fixes some glitches as well as supports a new way of sleeping
"alive" when hardware literally doesnt support normal s3 sleep... so
kind of a fix with a feature.
2017-07-10 10:18:50 +09:00
Carsten Haitzler 69f757edad further fixes to screensaver/banking with window states like fullscreen
this is a further fix for T5464 to actually make the intended option
work at all. what was there was broken. now it works. init order was
wrong - screensaver was relying on event id's from e_client socde that
were not initted yet AND the handlers didnt account for "dont blank
when fullscreen window is there" at all. @fix
2017-05-07 14:35:14 +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 be69ae562f only create wayland screensaver timer in wayland mode
probably fix T2867
2015-11-23 14:47:37 -05:00
Mike Blumenkrantz d4aa1ba7c2 add functionality for blocking wl screensaver activation 2015-08-04 19:39:09 -04:00
Mike Blumenkrantz 8278e20183 reduce delay before running screensaver-off animations in wayland
this feels a bit more natural while still displaying animations after dpms
has finished cycling
2015-07-28 16:58:53 -04:00
Mike Blumenkrantz 784af9c097 do not create wayland screensaver timer when screensaver is disabled
ref T2609
2015-07-28 12:41:05 -04:00
Mike Blumenkrantz c4024acfd2 ensure expected screensaver blanking in x11 compositors with HAVE_WAYLAND 2015-07-27 18:24:34 -04:00
Mike Blumenkrantz 812ceafec6 fix wl screensaver activation when deactivating during fade 2015-07-27 17:32:11 -04:00
Mike Blumenkrantz 9efb05a865 add E_EVENT_SCREENSAVER_OFF_PRE
for hooking dpms changes which occur before animations play
2015-07-27 16:54:01 -04:00
Mike Blumenkrantz 4543e26ca6 remove e_screensaver_force_update()
this was just used to set up x11 screensaver stuff, which has now been
relocated to the related comp_init function
2015-07-27 15:54:15 -04:00
Mike Blumenkrantz 7f638d98bf add functioning wayland screensaver support
block xscreensaver events, manage input<->activation eventing

fix T2525
2015-07-27 15:46:57 -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 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 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
Stefan Schmidt baad02c03a e_screensaver: de-e_comp_get()ify 2015-01-23 13:49:54 +01:00
Mike Blumenkrantz 99589eb5af remove E_Win+e_canvas, convert all internal wins to use elm_win
known issues:

* keybindings for efm windows (eg. ctrl+w) are broken until the rest of the conversion is completed
2014-11-20 15:26:21 -05:00
Chris Michael 8e4a45a40e fix e_screensaver_update compiler warnings when building for
wayland-only

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-28 12:30:29 -04:00
Chris Michael 0e643b36f7 only declare certain variables if we are building for X
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:35 -04:00
Carsten Haitzler 412095fe67 have e disable screensaver on resume to force screen on
this fixes T1384
2014-07-07 23:35:06 +09:00
Mike Blumenkrantz c04d754ac5 enabling drm output module should NOT require X-less build.
these defines all need to be changed from HAVE_WAYLAND_ONLY to something like WITH_X or we're going to have lots of problems with xwayland later on
2014-03-18 16:14:04 -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 4b58fa9a4e replace ev->keyname with ev->key
see efl 5ae4cfd1923e502731f4d8fc2bf67b1f536a9216
2014-03-13 13:03:34 -04:00
Mike Blumenkrantz a12768c465 quick screensaver blocking hack for non-X instances 2014-01-16 20:09:12 -05: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
Miculcy Brian 9d781fa8ac Backlight, screenlock and screensaver don't check for fullscreen windows - we have presentation mode for that.
SVN revision: 82772
2013-01-14 17:26:13 +00:00
Mike Blumenkrantz 9e8e755cdf formatting: all at once
SVN revision: 82625
2013-01-11 10:34:29 +00:00
Miculcy Brian 4034a15345 Added option for doing desklock, blanking or dimming even when showing fullscreen windows.
SVN revision: 82358
2013-01-07 19:46:38 +00:00
Miculcy Brian 796317970a Don't blank on fullscreen windows (as we don't run the screenlock on fullscreen windows). Check all zones for fullscreen windows.
SVN revision: 82354
2013-01-07 16:13:17 +00:00
Miculcy Brian d0c143b615 No backlight dimming when in presentation mode. Backlight fade time only applies to dimming - undimming is fixed 0.5 .
SVN revision: 82348
2013-01-07 14:28:26 +00:00
Carsten Haitzler f0c9f5121c lots of buglet-fixing. this does:
1. make idle fade timer work at all (dodnt work before)
2. fixes backlight status on e restart
3. fixes setting bl level on start
4. improves the compositor fade in/out effect by ALSO fading backlight
in and out... oh so much smoother now
5. fixes label in ui to be seconds, not minutes.
6. in order to make this all work - it adds a special screensaver
event inside of e that the screensaver subsystem generates based on
the real x one.



SVN revision: 80538
2012-12-09 06:27:42 +00:00
Mike Blumenkrantz 1eda0a3417 some text fixes from thomasg
SVN revision: 79910
2012-11-30 15:39:17 +00:00
Carsten Haitzler 16e8ff0ff5 disable the screensaver/dpms blank forcing - it fixes 1 xorg issue but
triggers others on other xorgs. ugh.



SVN revision: 79074
2012-11-10 01:44:50 +00:00
Mike McCormack 90e5189ca4 e: Fix warning
Signed-off-by: Mike McCormack <mikem@atratus.org>

SVN revision: 77861
2012-10-11 11:22:58 +00:00
Carsten Haitzler bdf8471cd5 try not do anything with screensaver interval except setting it to 0
SVN revision: 77748
2012-10-10 10:40:21 +00:00
Mike Blumenkrantz 7a3eb421ff spellcheck hooooooooooooooooooooooo
SVN revision: 77562
2012-10-08 06:59:58 +00:00
Carsten Haitzler 4639f361b3 more dpms /screensaver setting force set to work around an apparent
xorg bug.



SVN revision: 76342
2012-09-08 12:17:29 +00:00
Carsten Haitzler 7d595adf7b work around x dpms bug which seems to forget about doing dpms 2nd time
around so force a reset of screensaver/dpms settings after coming out
of blank.



SVN revision: 75940
2012-09-02 07:37:24 +00:00
Vincent Torri c3b0637802 e17: whitespaces--
SVN revision: 72561
2012-06-21 06:19:43 +00:00