summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2026-09-21[Wayland]: Small fixes (#436)HEADmasterAleksey Samoilov3-18/+51
* wayland: small fixes * fix double-free removing Wayland idle notify
2026-09-04backlight: move helper from sbindir to libexecdirVictor Kareh3-6/+6
On systems that symlink /usr/sbin to /usr/bin, pkexec resolves the mate-power-backlight-helper path canonically to /usr/bin but the polkit annotation references /usr/sbin. This causes pkexec to require authentication every time the brightness is changed. This moves mate-power-backlight-helper to libexecdir and update the polkit policy annotation and command call accordingly. Fixes #411
2026-09-01gpm-tray-icon: Icon empty in notification area with SNIVictor Kareh1-0/+4
After porting the indicator to SNI, the power icon rendered blank in the notification area. The SNI host resolves icon names in its own process, but our status icons are stored in the application's private icon theme directory, so the host could never find them. This fix points the indicator at the directory that contains our icon theme so the notification area can resolve the battery icons again.
2026-08-17Make ayatana-appindicator dependency optionalVictor Kareh1-0/+103
Adding Wayland support made ayatana-appindicator3 a hard requirement, which breaks on systems without it (the previous tray icon is still perfectly usable there). This makes it optional and auto-detected at configure time, falling back to the tray icon when the ayatana is unavailable. Also make sure Wayland auto-detection only gets enables when every Wayland dependency is actually present, instead of leaking the build flag when an optional dependency is missing. Fixes #432
2026-08-01Wayland support (#431)Aleksey Samoilov11-396/+1204
* Preparations for Wayland backend * Use system wayland-protocols * Implement wlr-output-power-management * Small refactors * Small fixes * Add vendored wlr protocol, build fixes * Fix crash in mate-osd-window * Port power manager indicator to SNI * Fix appindicator init * Positioning brightness applet's popup with gtk-layer-shell Original-patch-by: @lukefromdc * Add gtk-layer-shell dep
2026-06-17gpm-manager: Remove unsupported markupVictor Kareh1-1/+1
The notification spec only supports a handful of tags and <br> is not one of them. Fixes #272
2026-05-28Missing tab, e. g. format the line as the one before itLukáš Tyrychtr1-1/+1
2026-05-28Replicate the icon tooltip in its title as well so a11y technologies can ↵Lukáš Tyrychtr1-0/+1
pick it up
2026-03-12fix memory leakmbkma3-1/+4
2025-09-26fixup! add: switch kbd-backlight-enableArwed Meyer1-2/+2
2025-09-26fixup! backlight: Save brightness changes running on batteryArwed Meyer1-2/+7
2025-09-26backlight: Save brightness changes running on batteryArwed Meyer1-17/+43
Also save brightness config changes when running on battery. To do that, calculate backlight dim factor and ac brightness factor from master percentage value so that ac factor is only changed if brightness is further increased when battery dim factor is already zero. This behaviour seems less random to me than only saving changes when running on AC.
2025-09-26add: switch kbd-backlight-enableArwed Meyer2-0/+6
Add power manager switch to completely disable keyboard backlight brightness control by GPM. This goes together with reverting the patch that allows to disable keyboard backlight control via kbd-backlight-battery-reduce.
2025-09-26Refactor: kbd_backlight: Backlight togglingArwed Meyer1-12/+8
This improves the fix for backlight toggling from "Keyboard backlight handling improvements". Now saved_brightness is initilized to 0 and only gets set to current brightness when "toggling off" - which is the only place where setting saved_brightness to current brightness makes any sense, logically. In all other cases it's not needed. I adapted the code that would crank up the brightness to 100 if we "toggle on" to 0 although the "arbitrary" special handling introduced by that is what I personally would consider broken.
2025-01-16Keyboard backlight handling improvements (#404)Colomban Wendling1-78/+84
* 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.
2023-11-06Remove compilation warning fix data type format errorzhuyaliang19-102/+122
2023-10-24Add meson build supportzhuyaliang1-0/+241
2023-10-16replace deprecated gtk_image_menu_item_new_from_stockraveit651-1/+3
2023-10-16replace deprecated gtk_image_menu_itemraveit652-6/+10
2022-03-21Show device model even if vendor is not availableDamien Thébault2-0/+6
2022-03-21Add support for gaming inputsDamien Thébault2-0/+8
2022-03-18gpm-prefs: fix memory leakrbuj1-3/+1
In addition, it adds enumerations to access indexed arrays.
2022-03-18gpm-statistics: fix memory leakrbuj1-51/+115
In addition, it adds enumerations to access indexed arrays.
2022-03-18Fix implicit conversion changes signedness: 'gboolean' to 'guint'rbuj2-2/+2
2022-03-11gpm-backlight: unused function 'gpm_common_sum_scale'rbuj1-13/+0
2022-01-01Fix build warnings about missing field initializerrbuj4-4/+4
2021-12-11Use a blank line at mostrbuj9-10/+0
2021-06-22update copyright to 2021raveit6564-0/+64
2021-02-04build: Use PACKAGE_URL variablerbuj1-2/+2
2021-01-16Update copyright to 2021rbuj1-1/+1
2021-01-07Remove warning -Wunused-but-set-variablerbuj2-13/+1
2020-12-07gpm-backlight: Fix the position of the inline keywordrbuj1-1/+1
2020-11-10mate-power-preferences: add option to enable keyboard dimmingAndrej Valek1-0/+3
2020-10-20gpm-control.c: Add libsecret implementation to gpm_control_hibernate()NP-Hardass1-0/+37
2020-10-20gpm-control.c: Add libsecret implementation to gpm_control_suspend()NP-Hardass1-0/+40
2020-10-20Add autotools support for libsecretNP-Hardass1-0/+3
2020-09-10Revert "add meson project"raveit652-186/+0
This reverts commit 1db4b409322e559a3d3a03677dd482a0613f3b29.
2020-09-03add meson projectVictor A. Santos2-0/+186
fix indentation in some files
2020-08-04Remove trailing spaces/tabsrbuj4-7/+7
find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 's/[[:space:]]*$//' {} \; find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 's/\t*$//' {} \;
2020-07-12gpm-kbd-backlight: Remove unused functionsrbuj1-100/+0
2020-07-08Remove unused variable from gpm_notebook_scroll_event_cbrbuj4-39/+37
2020-06-25Add git.mk to generate .gitignoretamplan1-0/+1
2020-05-25gpm-kbd-backlight: do not change keyboard back-light, when disabledAndrej Valek1-9/+16
Automatically change keyboard back-light only when enabled on battery. Keep previous brightness level between state change. Signed-off-by: Andrej Valek <[email protected]>
2020-04-01gpm-phone: silent "not connected" message unless debugraveit651-1/+1
Debug message is modified to something identifiable
2020-03-31gpm-brightness: silent "using cache for value" message unless debugraveit651-1/+1
2020-03-25Remove warning: ‘GTimeVal’ is deprecatedrbuj1-5/+3
2020-03-14gpm-backlight: silent "no dimming hardware" message unless debugrbuj1-1/+1
2020-03-11gpm-control: warning when a property cannot be set using dbusrbuj1-6/+6
2020-03-10glib-genmarshal: replace deprecated tokens NONE and BOOLrbuj1-15/+15
2020-03-09Remove warning function declaration isn’t a prototyperbuj1-1/+1