Commit Graph
68 Commits
Author SHA1 Message Date
Alex b7a6fa8c91 fix(wlr/taskbar): dispatch built-in click actions via doAction, not the shell
wlr/taskbar reads on-click* config values (close, minimize, maximize,
fullscreen, minimize-raise, activate) directly as internal actions in
Task::handle_clicked, but never adopted the eventActionMap_/doAction
mechanism. As a result AModule::handleUserEvent additionally forkExec-ed
the same value as a shell command, e.g. on-click-middle: "close" ran the
action and then failed with "sh: line 1: close: command not found".

Register the taskbar built-in action names in eventActionMap_ so they are
recognized as module actions, and skip the shell forkExec in
handleUserEvent when the configured value is a recognized module action.
Non-action values are still run as user shell commands.

Fixes #3284.
2026-07-04 12:50:30 +02:00
AlexandClaude Opus 4.8 f72f84e011 fix: backward-compat + bug fixes and man-page build fix for 0.16.0
Post-0.15.0 review of the 0.15.0..HEAD range surfaced regressions and
bugs. This restores backward compatibility for existing configs/CSS,
fixes confirmed defects, and repairs the scdoc man-page build break on
master. Pango-markup tooltips are intentional and were kept.

Backward-compat restorations:
- AModule: honor legacy numeric Gdk::CursorType cursor values (int overload)
- memory: correct GiB divisor (was ~2.3% low); round bare {} placeholders
- wireplumber: scale max-volume into the linear domain so the cap works again
- idle_inhibitor: gate right/middle-click deactivate & scroll on dynamic-timeouts;
  accept both dynamic-timeout(s); widen timeout to double (no fractional truncation)
- custom: keep #custom-<name>.<class> CSS selectors working (classes on box_)
- image: don't wordexp-split a single path; fall back to the literal path
- niri/window: restore hide-when-empty (new show-empty opt-in); escape tooltip
- wlr/taskbar: plain-text tooltip when markup is disabled

Bug fixes:
- tray: fix use-after-free in onAdd; guard the watcher retry timeout
- hyprland: clamp max-windows iterator (OOB); drop duplicate language tooltip block
- niri/window: supply {col}/{max_col} args in the empty branch (fmt::format_error)
- mpris: escape {dynamic}/{player} tooltip; fix dangling player; albumArtist source
- mango: fix use-after-free race (dispatch under callback_mutex_)
- mpd: contain throwing checkErrors in noexcept idle paths (no std::terminate/UAF)
- keyboard_state: always render every lock label, with guarded defaults
- bluetooth: bound GATT ReadValue timeout, opt-in + services-resolved gating,
  preserve authoritative Battery1 percentage
- wireplumber: fix WpDevice reference leak / NULL handling
- battery, clock, dwl, wayfire, graph, custom_graph, transform, river: assorted
  crash/logic fixes

Man page / build:
- niri-workspaces: fix scdoc "indented by an amount greater than 1"
  (workspace-taskbar sub-options were mis-indented; breaks man-page build)
- document new show-empty (niri/window); correct network {txBitrate}/{rxBitrate}

Not compiled locally (no gtkmm on this host); C++ build relies on CI.
Man pages validated with scdoc 1.11.4.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 02:14:13 +02:00
Alexis Rouillard a4380bb600 Merge pull request #3573 from rossmeier/master
add click coordinates to script
2026-07-04 01:08:26 +02:00
Alex 328b6dc017 Merge remote-tracking branch 'origin/master' into pr-4014
# Conflicts:
#	include/group.hpp
#	src/group.cpp
2026-07-04 00:54:02 +02:00
Alex 23762842c6 Merge remote-tracking branch 'origin/master' into pr-3573
# Conflicts:
#	src/AModule.cpp
2026-07-04 00:51:06 +02:00
Alexis Rouillard f5164a9f30 Merge branch 'master' into master 2026-07-04 00:17:35 +02:00
Alex 3cfa2e2c5d Merge remote-tracking branch 'origin/master' into J0hannes101/master
# Conflicts:
#	src/AModule.cpp
2026-07-03 22:27:24 +02:00
Alexis Rouillard e7d19ad60f Merge branch 'master' into 4655 2026-07-03 22:21:52 +02:00
Alexis Rouillard 5fce3926e0 Merge branch 'master' into master 2026-07-03 20:45:06 +02:00
Alexis Rouillard 2ece13775e Merge pull request #5058 from typedrifter/fix-cursor-crash
fix(amodule): prevent crash when cursor timeout fires after destruction
2026-07-03 19:54:25 +02:00
Ibrahim Issa 4d1a561cdc feat(modules): pause background threads when display is asleep
Currently, modules polling hardware nodes continuously wake up kernel drivers even when the monitor is asleep (e.g., DPMS off), flooding dmesg.

- Adds 'disable-on-sleep' config flag
- Hooks GTK window map/unmap signals to track DPMS state
- Propagates suspend/resume calls to AModule worker threads
2026-07-03 18:44:03 +02:00
Johannes Haase 47b2ff09b7 feat(cursor): use cursor-shape-v1 cursor names instead of Gdk::CursorType 2026-06-16 23:27:27 +02:00
Ansari 2ff2861e88 Merge remote-tracking branch 'upstream/master' 2026-05-27 12:13:51 +05:30
Francois Lachese 876eaaf70f fix(amodule): prevent crash when cursor timeout fires after destruction 2026-05-20 15:57:38 +02:00
Skyfrei fff1495efb adding a new keyword 'on-click-copy' that accepts a bool and copies to clipboard on true' 2026-03-24 20:12:30 +01:00
Austin Horstman f48fce57dc fix(menu): keep popup menus alive after builder teardown
The popup menu was retrieved from GtkBuilder and stored in menu_, but the builder was unref'd immediately after construction. That left the later popup path operating on a builder-owned GtkMenu whose lifetime was no longer guaranteed, which matches the GTK_IS_WIDGET and GTK_IS_MENU assertions from the regression report.

Take an owned reference to the built menu and release it in AModule teardown so popup menus stay valid without extending the lifetime of the whole builder.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-06 18:39:16 -06:00
Alex ef3d55980e fix: some crashes 2026-02-24 00:49:08 +01:00
Ansari 49083131d1 fix(AModule): improve cursor configuration handling 2026-01-03 11:16:03 +05:30
rellimn 089b9a20fc Fix module and tray item staying in hover state after opening menu
Fixes #3980
2025-08-12 20:51:35 +02:00
Alexis Rouillard f314150736 Merge branch 'master' into issue-1681 2025-06-22 08:41:15 +01:00
Piotr Piwoński 67df5f5838 feat(Group): enhance widget visibility management - set visibility instantly on module update using dynamic signal handling.
Improve performance - manage the visibility of updated module only instead of iterating over all modules on `hide_group`.
2025-03-30 14:49:07 +00:00
Torstein Husebø 6004316f1a Fix typos in function, variable names and in documentation 2025-01-16 13:25:19 +01:00
Lars Niesen f9acc1fed9 Add stretching of modules and modules-center toggling
This Patch allows the stretching of modules-{left,center,right} as well
add a "expand" flag to AModule. This allows one module to consume the
leftover space.
To allow the left or right modules to fully consume the center, the
changes also include a way to remove the center box (center_)
altogether.
2024-11-20 00:00:27 +01:00
Justus Rossmeier 9f2684c26e add click coordinates to script
Allow the current relative mouse position {x} and {y} relative to the
widget in percent to be used as an argument to custom scripts
2024-09-07 13:14:13 +02:00
Austin Horstman f78f29ee66 AModule: retain existing default behavior when unconfigured 2024-07-03 08:20:48 -05:00
Lars-Ragnar A. Haugen 7e2d8ab2a3 fix(#3239): hide cursor type change behind config flag
also, statically configure the cursor type
2024-07-03 08:11:15 -05:00
Austin Horstman 14c3235c12 src: clang-tidy 2024-07-02 10:38:58 -05:00
Benjamin Voisin c3581fb66b 🥅 only check menu if speciifed in the conf 2024-05-28 17:33:44 +02:00
Benjamin Voisin 21751b2faa 🎨 clang-tidy 2024-05-09 20:59:25 +02:00
Benjamin Voisin 3b87b83076 ♻️ move GMenu to ALabel class 2024-05-09 18:34:26 +02:00
Benjamin Voisin 884b909e7d add GtkMenu to the AModule class
You can configure what key launch the menu with the "menu" element in
the config, the xml file that describes the menu with the "menu-file"
element in the config, and the actions of each buttons with the
"menu-actions" field.
2024-05-09 17:28:08 +02:00
Lars-Ragnar A. Haugen 0b6476da32 fix: set cursor appropriately on user event hover (#3195) 2024-05-02 22:09:21 +02:00
Alex 61ac7e4e10 fix: lint 2024-04-25 00:16:15 +02:00
Milo MordauntandAlexis Rouillard 9a3044a54f Cursor change to indicate module clickability (#3108)
* Indicate clickability on mouse hover

* Avoid messy overrides situation

* Update AModule.cpp

* Update AModule.cpp

* Update AModule.cpp

* Update AModule.cpp

---------

Co-authored-by: Alexis Rouillard <alexisr245@gmail.com>
2024-04-25 00:15:40 +02:00
Lars-Ragnar A. Haugen 5b7d0a2810 fix(#3162): hover event did not propagate causing issues 2024-04-23 16:18:54 +02:00
Lars-Ragnar A. Haugen 6c1125c1fe feat(#2989): (optional) hover for all modules 2024-04-19 19:16:39 +02:00
Robin Ole Heinemann 207e99876d feat: allow horizontal scroll 2024-03-08 21:48:27 +01:00
Viktar Lukashonak 86a38980e4 c++20. clock chrono API. STL + format
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-11-10 17:57:26 +03:00
KosmX 392e863e6d Apply formatting 2023-08-16 17:33:36 +02:00
KosmX 2ff347f9a8 Add handleRelease method to release events
This commit shouldn't change the handleToggle behaviour,
it shouldn't break anything.
2023-08-16 17:14:49 +02:00
KosmX 718db71638 Refactor enable click condition
This shouldn't change behaviour.
2023-08-16 17:11:44 +02:00
Alex b5ea14c896 revert: release event 2023-08-16 13:31:24 +02:00
Alex db1d859881 fix: lint 2023-08-14 14:20:08 +02:00
KosmX 3db5673e70 register key hander 2023-08-13 18:48:23 +02:00
Alexis Rouillard ee0958973b Merge branch 'master' into issue-1681 2023-07-04 22:49:35 +02:00
dmitry f26a125d15 format 2023-07-04 01:26:16 +03:00
Kory Prince 1ba05d1ffa add reverse-mouse-scrolling to configure mouse wheel reverse scrolling 2023-07-01 10:35:37 -05:00
Kory Prince 7a01143359 ignore reverse-scrolling from mouse wheel 2023-07-01 10:33:55 -05:00
Kory Prince 35496f461f fix regression from #2232: reverse-scrolling was not applied to
GTK_SCROLL_SMOOTH events
2023-07-01 10:33:55 -05:00
Robert Günzler 0f8c156f24 Lift reverse-scrolling option into AModule
The option is generally useful when scrolling is used, when configuring
input devices to use "natural scroll direction".
Both backlight and pulseaudio were using different implementations, this
unifies and documents them.

Signed-off-by: Robert Günzler <r@gnzler.io>
2023-06-12 14:08:18 +09:00