Age | Commit message (Collapse) | Author | Files | Lines |
|
* gpm-kbd-backlight: Fix toggling backlight back on
The static value was reset on every call rather than only initially,
resulting in failure to restore the initial value when toggling it
back on.
* gpm-kbd-backlight: Persistently save user-set brightness
Try and save the user-set brightness to be able to restore it on next
restart.
This is not perfect because we have complex interaction between
settings which makes it not trivial, if at all possible, to save the
value yet respect the dim settings.
Here we try to save the value in a way that counteract battery dimming
so that restoring the value yields expected results (e.g. a value saved
on battery restores identical on battery again), but it cannot work
when the value to save is larger than the dimmed maximum as at the
moment the maximum value is 100%.
It is however the best I could come up with working with the settings
we currently have, and it's probably good enough at least as a starting
point.
It also switches from `master_percentage` to `brightness_percent` in
the toggle code because the former is only initialized to the actual
current brightness value once brightness changed at least once, while
the former is properly initialized. It is otherwise quivalent for this
feature, and less confusing as to when the value gets updated.
* refactor: gpm-kbd-backlight: Remove some unnecessary temp variables
* refactor: gpm-kbd-backlight: Move dimming logic to a helper function
* gpm-kbd-backlight: Get rid of `master_percentage`
Now the on-AC value changes following user input, the internal
`master_percentage` was just plain confusing and actually make things a
bit weird at times because it doesn't follow dynamic user choices.
So just get rid of it, replacing it with the on-AC value.
* gpm-kbd-backlight: Rationalize handling of battery-reduce setting
Handling of a disabled battery-reduce setting was too aggressive, which
could reduce in not setting backlight value in unrelated cases,
including initial startup and resume, as well as some cases of IDLE
handling.
Now the user choices are better followed, the whole special-casing
could probably be removed as the internal state should always reflect
the reality, but keep the specific check not to do anything on AC
plug/unplug when this is disabled just in case, although the historical
reasons why it was actually problematic should be gone now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In addition, it adds enumerations to access indexed arrays.
|
|
In addition, it adds enumerations to access indexed arrays.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This reverts commit 1db4b409322e559a3d3a03677dd482a0613f3b29.
|
|
fix indentation in some files
|
|
find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 's/[[:space:]]*$//' {} \;
find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 's/\t*$//' {} \;
|
|
|
|
|
|
|
|
Automatically change keyboard back-light only when enabled on battery. Keep
previous brightness level between state change.
Signed-off-by: Andrej Valek <[email protected]>
|
|
Debug message is modified to something identifiable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MATE_COMPILE_WARNINGS is present in configure.ac but WARN_CFLAGS
variable is not used. git grep WARN_CFLAGS
It removes -enable-extra-warn=yes, since it is recommended to use
-enable-compile-warnings=maximum.
It sets -enable-compiler-warnings=yes, the default value for all
MATE packager for now.
It prints WARN_CFLAGS in summary table.
|
|
with required version bump to upower-0.99.8
we don't need them any more.
|
|
The previous code would have leaked all the UpDevice objects because no
free function was set on the returned GPtrArray.
With depending on upower-glib 0.99.8 get_devices() was deprecated and get_devices2() was introduced, we
can simply switch to get_devices2() which does set a free function on
the returned GPtrArray, stopping the leak.
Inspired from:
https://gitlab.gnome.org/GNOME/gnome-control-center/commit/c1210c5
see upower upstream:
https://gitlab.freedesktop.org/upower/upower/commit/cb1071b
|
|
|
|
|
|
|