with a timer it'll wait untuil after mainloop is running before it
times out and thus shows the dialog ensuring it appears once the
compositor is fully up. this should avoid weird sized windows.
@fix
we never told users before. we should. this would sovle some issues
i've seen of people saying that closing the lid doesn't work with e
and they didn't install acpid (even though packages often recommend it).
this improves usability.
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
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.
Subject: [E-devel] [e] Patch acpi
A little patch to fix a possible warning - and overflow.
'buf' is PATH_MAX, but PATH_MAX is not necessary 1024. If
PATH_MAX < 1024 -> overflow.
Also, fgets() fills the buffer and nullterminate it, so we
don't need to buff[0] = '\0'.
SVN revision: 81024
acpi message at once (will happen IF e is paused/hung/suspended and
multiple acpi events happen during that time).
also no need for multiple acpi event id's - the type is already in the
struct itself. it's dup;icating the work. simplify.
also... vaio "hotkey" style support. new mapping ethod needed for
that. who knows what other bizarre acpi hardware is out there. may
need more. also make a note that we may want a mapping system some
time that maps acpi event to faking an x key event.
also... allow acpi bindings to bind to anything in gui.
SVN revision: 56790
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
NB: To be used in the acpi bindings config dialog. This allows us to freeze
all existing events so that if the user presses the power button
(or something else) when adding a new binding, their machine does not
power off.
SVN revision: 49416
Add acpi bindings to config.
Add handlers in e_acpi for common/default acpi events.
Add actions for some missing ACPI events.
- NB: Dim/Undim screen do nothing currently except a printf.
SVN revision: 49309
Create a device hash to match standard device names to types.
Cleanup E_EVENT_ACPI (add missing ones, remove not needed ones).
Actually parse out the ACPI data which we receive.
You can now actually use this ACPI code for event listening, but the
Status field of the event structure needs sanatizing yet (turn into
something meaningful).
SVN revision: 48928