Use a vector instead of a map for for storing the workspace windows.
This orders the windows by the time they were added to the workspace, instead of sorting by address (which is effectively a random order). The new ordering seems to match the wlr/taskbar module
Fix another older bug where the title of a window will not be updated after moving it to another monitor.
In onWindowMoved, when moving an orphan window to the display of the current bar, that window should no longer be an orphan.
This seems to be an old bug that has been made visible with the new workspace taskbars feature.
Sometimes, when closing a window and re-opening a window of the same program, hyprland reuses the window address. Since m_orphanWindowMap was not being cleaned up on window close, the new window would not be updated properly.
This file uses std::sort and does not import correct header.
Compilation with libstdc++ worked due to some indirect import, but compilation with LLVM libc++ fails.
Updates `Config::tryExpandPath()` to return a vector of expanded path
matches instead of a single path wrapped in an optional, with an empty
vector indicating no matches.
`Config::resolveConfigIncludes()` iterates over all of these matches,
while other instances of path expansion (such as finding the base config
path) retain their existing behavior and only use the first match.
Without this, markup characters like [&><] will be injected directly
into the Label. Escaping them makes sure that the values will be printed
exactly as they appear in the window title or layout symbol.
Signed-off-by: K. Adam Christensen <pope@shifteleven.com>
Before this commit, Waybar would sometimes get into a state
where it would consume 100% of a CPU core, and the pulseaudio widget
would stop responding to volume adjustments.
In this state, the pulseaudio mainloop thread would spin, with the
counter of enabled defer events at 1, but no actual enabled defer
event in the list to get the counter back to zero after an iteration
in the mainloop.
This could happen if the unsynchronized interactions with the mainloop
thread happened to modify the list of deferred events at the same
time as the mainloop.
This commit introduces locking in accordance with the PulseAudio
documentation on the threaded mainloop:
> The lock needs to be held whenever you call any PulseAudio function that
> uses an object associated with this main loop. Those objects include
> pa_mainloop, pa_context, pa_stream and pa_operation, and the various event
> objects (pa_io_event, pa_time_event, pa_defer_event).
When using `window-rewrite`, the `class<>` rule would previously only
match against the `app_id` of a window. However, XWayland windows don't
have an app ID.
This change falls back to checking the `class` window property if there
is no app ID to support matching against XWayland windows.