mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 13:41:59 -07:00
Add focusmaster dispatcher (#942)
* added focusmaster dispatcher * format Co-authored-by: Adam Nord <adam.nord@abbgymnasiet.se> Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
This commit is contained in:
@@ -542,7 +542,6 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (message == "swapwithmaster") {
|
if (message == "swapwithmaster") {
|
||||||
|
|
||||||
const auto PWINDOW = header.pWindow;
|
const auto PWINDOW = header.pWindow;
|
||||||
|
|
||||||
if (!isWindowTiled(PWINDOW))
|
if (!isWindowTiled(PWINDOW))
|
||||||
@@ -557,6 +556,16 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri
|
|||||||
|
|
||||||
switchToWindow(PWINDOW);
|
switchToWindow(PWINDOW);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
} else if (message == "focusmaster") {
|
||||||
|
const auto PWINDOW = header.pWindow;
|
||||||
|
const auto PMASTER = getMasterNodeOnWorkspace(PWINDOW->m_iWorkspaceID);
|
||||||
|
|
||||||
|
if (!PMASTER || PMASTER->pWindow == PWINDOW)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
switchToWindow(PMASTER->pWindow);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} else if (message == "cyclenext") {
|
} else if (message == "cyclenext") {
|
||||||
const auto PWINDOW = header.pWindow;
|
const auto PWINDOW = header.pWindow;
|
||||||
|
Reference in New Issue
Block a user