mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-01 12:41:55 -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") {
|
||||
|
||||
const auto PWINDOW = header.pWindow;
|
||||
|
||||
if (!isWindowTiled(PWINDOW))
|
||||
@@ -557,6 +556,16 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri
|
||||
|
||||
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;
|
||||
} else if (message == "cyclenext") {
|
||||
const auto PWINDOW = header.pWindow;
|
||||
|
Reference in New Issue
Block a user