summaryrefslogtreecommitdiff
path: root/src/login/logind-button.c
AgeCommit message (Collapse)Author
2014-03-18util: replace close_nointr_nofail() by a more useful safe_close()Lennart Poettering
safe_close() automatically becomes a NOP when a negative fd is passed, and returns -1 unconditionally. This makes it easy to write lines like this: fd = safe_close(fd); Which will close an fd if it is open, and reset the fd variable correctly. By making use of this new scheme we can drop a > 200 lines of code that was required to test for non-negative fds or to reset the closed fd variable afterwards.
2014-02-24logind: detect whether the system is docked, and if it is inhibit lid switch ↵Lennart Poettering
processing This should make operation nicer with docking stations, but will not cover anything that does not implement SW_DOCK.
2014-02-21logind: when we wake up from suspend and the lid is still closed, go to ↵Lennart Poettering
sleep immediately again This is quite useful on laptops such as the Lenovo Yoga, where the power button is placed on the front side of the laptop and can be pressed by accident even if the lid is closed. This reworks a bit of the logind logic to repeatedly try to suspend the system as long as a lid is closed. We use the new "post" event source for this, so that we don't keep things busy. This also adds some code to check the lid status on boot, so that a powered-off machine that is accidentaly powered on goes into suspend immediately. Yay! From now on I can put my Yoga safely in my backpack without fearing that it might turn itself on and drain the battery.
2014-02-20api: in constructor function calls, always put the returned object pointer ↵Lennart Poettering
first (or second) Previously the returned object of constructor functions where sometimes returned as last, sometimes as first and sometimes as second parameter. Let's clean this up a bit. Here are the new rules: 1. The object the new object is derived from is put first, if there is any 2. The object we are creating will be returned in the next arguments 3. This is followed by any additional arguments Rationale: For functions that operate on an object we always put that object first. Constructors should probably not be too different in this regard. Also, if the additional parameters might want to use varargs which suggests to put them last. Note that this new scheme only applies to constructor functions, not to all other functions. We do give a lot of freedom for those. Note that this commit only changes the order of the new functions we added, for old ones we accept the wrong order and leave it like that.
2013-12-13event: be more conservative when returning errors from event handler callbacksLennart Poettering
We really should return errors from event handlers if we have a continous problem and don't know any other solution.
2013-11-10button: don't exit if we cannot handle a button pressLennart Poettering
2013-11-05logind: port logind to libsystemd-busLennart Poettering
2013-03-07logind: don't hit an assert if an close() on an input device fd fails with ↵Lennart Poettering
ENODEV because the device is gone https://bugzilla.redhat.com/show_bug.cgi?id=907890
2013-01-27logind: add MESSAGE_IDs to interesting eventsZbigniew Jędrzejewski-Szmek
2012-12-24logind: add support for automatic suspend/hibernate/shutdown on idleLennart Poettering
2012-10-30logind: unify all session lock loopLennart Poettering
2012-10-28login: trivial grammar fixZbigniew Jędrzejewski-Szmek
2012-10-28logind: add 'lock' as possible choice for handling hw keysLennart Poettering
2012-10-28logind: support for hybrid sleep (i.e. suspend+hibernate at the same time)Lennart Poettering
2012-09-21logind: split up HandleSleepKey= into HandleSuspendKey= and HandleHibernateKey=Lennart Poettering
The kernel and X11 distuingish these two, and Thinkpad keys have both, hence we really should distinguish them too.
2012-09-21logind: allow users to override their own suspend/sleep inhibitorsLennart Poettering
2012-09-19logind: if a lid-switch lock was taken while the lid was closed, recheck lid ↵Lennart Poettering
status when the lock is released
2012-09-19logind: rework power key/suspend key/lid switch handlingLennart Poettering
http://lists.freedesktop.org/archives/systemd-devel/2012-September/006604.html https://bugzilla.gnome.org/show_bug.cgi?id=680689 This changes the meaning of the HandlePowerKey=/HandleSleepKey=/HandleLidSwitch= setting of logind.conf
2012-07-26log.h: new log_oom() -> int -ENOMEM, use itShawn Landden
also a number of minor fixups and bug fixes: spelling, oom errors that didn't print errors, not properly forwarding error codes, few more consistency issues, et cetera
2012-07-25use "Out of memory." consistantly (or with "\n")Shawn Landden
glibc/glib both use "out of memory" consistantly so maybe we should consider that instead of this. Eliminates one string out of a number of binaries. Also fixes extra newline in udev/scsi_id
2012-05-30logind: rework button setting semanticsLennart Poettering
If a graphical session without full DE that handles power/suspend events is used this can now be controlled by logind instead, optionally.
2012-05-30logind: add missing filesLennart Poettering