mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-27 01:45:58 +01:00
compositor: allow windowfromregex tiled param
This commit is contained in:
parent
55825c301e
commit
600a128f83
1 changed files with 4 additions and 2 deletions
|
@ -2350,13 +2350,15 @@ CWindow* CCompositor::getWindowByRegex(const std::string& regexp) {
|
||||||
} else if (regexp.starts_with("pid:")) {
|
} else if (regexp.starts_with("pid:")) {
|
||||||
mode = MODE_PID;
|
mode = MODE_PID;
|
||||||
matchCheck = regexp.substr(4);
|
matchCheck = regexp.substr(4);
|
||||||
} else if (regexp.starts_with("floating")) {
|
} else if (regexp.starts_with("floating") || regexp.starts_with("tiled")) {
|
||||||
// first floating on the current ws
|
// first floating on the current ws
|
||||||
if (!m_pLastWindow)
|
if (!m_pLastWindow)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
const bool FLOAT = regexp.starts_with("floating");
|
||||||
|
|
||||||
for (auto& w : m_vWindows) {
|
for (auto& w : m_vWindows) {
|
||||||
if (!w->m_bIsMapped || !w->m_bIsFloating || w->m_iWorkspaceID != m_pLastWindow->m_iWorkspaceID || w->isHidden())
|
if (!w->m_bIsMapped || w->m_bIsFloating != FLOAT || w->m_iWorkspaceID != m_pLastWindow->m_iWorkspaceID || w->isHidden())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
return w.get();
|
return w.get();
|
||||||
|
|
Loading…
Reference in a new issue