mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-10 10:25:58 +01:00
fix window rules
This commit is contained in:
parent
0eb86f4b0d
commit
b16a57ceeb
1 changed files with 10 additions and 1 deletions
|
@ -267,7 +267,9 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||||
PWINDOW->m_vPseudoSize = PWINDOW->m_vRealSize.goalv() - Vector2D(10,10);
|
PWINDOW->m_vPseudoSize = PWINDOW->m_vRealSize.goalv() - Vector2D(10,10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PWINDOW->m_bNoFocus && !PWINDOW->m_bNoInitialFocus && PWINDOW->m_iX11Type != 2 && shouldFocus) {
|
const auto PFOCUSEDWINDOWPREV = g_pCompositor->m_pLastWindow;
|
||||||
|
|
||||||
|
if (!PWINDOW->m_bNoFocus && !PWINDOW->m_bNoInitialFocus && PWINDOW->m_iX11Type != 2) {
|
||||||
g_pCompositor->focusWindow(PWINDOW);
|
g_pCompositor->focusWindow(PWINDOW);
|
||||||
PWINDOW->m_fActiveInactiveAlpha.setValueAndWarp(*PACTIVEALPHA);
|
PWINDOW->m_fActiveInactiveAlpha.setValueAndWarp(*PACTIVEALPHA);
|
||||||
} else
|
} else
|
||||||
|
@ -335,6 +337,13 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||||
|
|
||||||
PWINDOW->updateToplevel();
|
PWINDOW->updateToplevel();
|
||||||
|
|
||||||
|
if (!shouldFocus) {
|
||||||
|
if (g_pCompositor->windowValidMapped(PFOCUSEDWINDOWPREV))
|
||||||
|
g_pCompositor->focusWindow(PFOCUSEDWINDOWPREV);
|
||||||
|
else if (!PFOCUSEDWINDOWPREV)
|
||||||
|
g_pCompositor->focusWindow(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
Debug::log(LOG, "Map request dispatched, monitor %s, xywh: %f %f %f %f", PMONITOR->szName.c_str(), PWINDOW->m_vRealPosition.goalv().x, PWINDOW->m_vRealPosition.goalv().y, PWINDOW->m_vRealSize.goalv().x, PWINDOW->m_vRealSize.goalv().y);
|
Debug::log(LOG, "Map request dispatched, monitor %s, xywh: %f %f %f %f", PMONITOR->szName.c_str(), PWINDOW->m_vRealPosition.goalv().x, PWINDOW->m_vRealPosition.goalv().y, PWINDOW->m_vRealSize.goalv().x, PWINDOW->m_vRealSize.goalv().y);
|
||||||
|
|
||||||
auto workspaceID = requestedWorkspace != "" ? requestedWorkspace : PWORKSPACE->m_szName;
|
auto workspaceID = requestedWorkspace != "" ? requestedWorkspace : PWORKSPACE->m_szName;
|
||||||
|
|
Loading…
Reference in a new issue