mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 07:09:48 +01:00
parent
d8b7ded18c
commit
55825c301e
1 changed files with 13 additions and 0 deletions
|
@ -2350,6 +2350,19 @@ CWindow* CCompositor::getWindowByRegex(const std::string& regexp) {
|
|||
} else if (regexp.starts_with("pid:")) {
|
||||
mode = MODE_PID;
|
||||
matchCheck = regexp.substr(4);
|
||||
} else if (regexp.starts_with("floating")) {
|
||||
// first floating on the current ws
|
||||
if (!m_pLastWindow)
|
||||
return nullptr;
|
||||
|
||||
for (auto& w : m_vWindows) {
|
||||
if (!w->m_bIsMapped || !w->m_bIsFloating || w->m_iWorkspaceID != m_pLastWindow->m_iWorkspaceID || w->isHidden())
|
||||
continue;
|
||||
|
||||
return w.get();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (auto& w : g_pCompositor->m_vWindows) {
|
||||
|
|
Loading…
Reference in a new issue