mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 14:45:59 +01:00
unhide window on requested size change
This commit is contained in:
parent
af9d34ab77
commit
f28b71232a
1 changed files with 12 additions and 6 deletions
|
@ -1147,6 +1147,12 @@ void CKeybindManager::resizeActive(std::string args) {
|
||||||
if (!args.contains(' '))
|
if (!args.contains(' '))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
const auto PWINDOW = g_pCompositor->m_pLastWindow;
|
||||||
|
|
||||||
|
// calc the delta
|
||||||
|
if (!g_pCompositor->windowValidMapped(g_pCompositor->m_pLastWindow))
|
||||||
|
return; // ignore
|
||||||
|
|
||||||
std::string x = args.substr(0, args.find_first_of(' '));
|
std::string x = args.substr(0, args.find_first_of(' '));
|
||||||
std::string y = args.substr(args.find_first_of(' ') + 1);
|
std::string y = args.substr(args.find_first_of(' ') + 1);
|
||||||
|
|
||||||
|
@ -1167,17 +1173,14 @@ void CKeybindManager::resizeActive(std::string args) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// calc the delta
|
|
||||||
if (!g_pCompositor->windowValidMapped(g_pCompositor->m_pLastWindow))
|
|
||||||
return; // ignore
|
|
||||||
|
|
||||||
const auto PWINDOW = g_pCompositor->m_pLastWindow;
|
|
||||||
|
|
||||||
const int DX = X - PWINDOW->m_vRealSize.goalv().x;
|
const int DX = X - PWINDOW->m_vRealSize.goalv().x;
|
||||||
const int DY = Y - PWINDOW->m_vRealSize.goalv().y;
|
const int DY = Y - PWINDOW->m_vRealSize.goalv().y;
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->resizeActiveWindow(Vector2D(DX, DY));
|
g_pLayoutManager->getCurrentLayout()->resizeActiveWindow(Vector2D(DX, DY));
|
||||||
|
|
||||||
|
if (PWINDOW->m_vRealSize.goalv().x > 1 && PWINDOW->m_vRealSize.goalv().y > 1)
|
||||||
|
PWINDOW->m_bHidden = false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1190,6 +1193,9 @@ void CKeybindManager::resizeActive(std::string args) {
|
||||||
const int Y = std::stoi(y);
|
const int Y = std::stoi(y);
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->resizeActiveWindow(Vector2D(X, Y));
|
g_pLayoutManager->getCurrentLayout()->resizeActiveWindow(Vector2D(X, Y));
|
||||||
|
|
||||||
|
if (PWINDOW->m_vRealSize.goalv().x > 1 && PWINDOW->m_vRealSize.goalv().y > 1)
|
||||||
|
PWINDOW->m_bHidden = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::moveActive(std::string args) {
|
void CKeybindManager::moveActive(std::string args) {
|
||||||
|
|
Loading…
Reference in a new issue