mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 18:05:58 +01:00
remember pos and size across fullscreen moves
This commit is contained in:
parent
2076905d6e
commit
99ca1ad353
1 changed files with 7 additions and 7 deletions
|
@ -431,8 +431,8 @@ bool CKeybindManager::handleVT(xkb_keysym_t keysym) {
|
||||||
const unsigned int TTY = keysym - XKB_KEY_XF86Switch_VT_1 + 1;
|
const unsigned int TTY = keysym - XKB_KEY_XF86Switch_VT_1 + 1;
|
||||||
|
|
||||||
// vtnr is bugged for some reason.
|
// vtnr is bugged for some reason.
|
||||||
const std::string TTYSTR = execAndGet("head -n 1 /sys/devices/virtual/tty/tty0/active").substr(3);
|
const std::string TTYSTR = execAndGet("head -n 1 /sys/devices/virtual/tty/tty0/active").substr(3);
|
||||||
unsigned int ttynum = 0;
|
unsigned int ttynum = 0;
|
||||||
try {
|
try {
|
||||||
ttynum = std::stoll(TTYSTR);
|
ttynum = std::stoll(TTYSTR);
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
|
@ -633,9 +633,9 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
|
|
||||||
// Flag needed so that the previous workspace is not recorded when switching
|
// Flag needed so that the previous workspace is not recorded when switching
|
||||||
// to a previous workspace.
|
// to a previous workspace.
|
||||||
bool isSwitchingToPrevious = false;
|
bool isSwitchingToPrevious = false;
|
||||||
|
|
||||||
bool internal = false;
|
bool internal = false;
|
||||||
|
|
||||||
if (args.find("[internal]") == 0) {
|
if (args.find("[internal]") == 0) {
|
||||||
workspaceToChangeTo = std::stoi(args.substr(10));
|
workspaceToChangeTo = std::stoi(args.substr(10));
|
||||||
|
@ -881,7 +881,7 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) {
|
||||||
if (!PWINDOW)
|
if (!PWINDOW)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto OLDWORKSPACE = g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID);
|
const auto OLDWORKSPACE = g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID);
|
||||||
|
|
||||||
// hack
|
// hack
|
||||||
std::string workspaceName;
|
std::string workspaceName;
|
||||||
|
@ -897,8 +897,8 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto PSAVEDSIZE = PWINDOW->m_vRealSize.goalv();
|
auto PSAVEDSIZE = PWINDOW->m_bIsFloating && PWINDOW->m_bIsFullscreen ? PWINDOW->m_vLastFloatingSize : PWINDOW->m_vRealSize.goalv();
|
||||||
auto PSAVEDPOS = PWINDOW->m_vRealPosition.goalv();
|
auto PSAVEDPOS = PWINDOW->m_bIsFloating && PWINDOW->m_bIsFullscreen ? PWINDOW->m_vLastFloatingPosition : PWINDOW->m_vRealPosition.goalv();
|
||||||
const bool WASFULLSCREEN = PWINDOW->m_bIsFullscreen;
|
const bool WASFULLSCREEN = PWINDOW->m_bIsFullscreen;
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->onWindowRemoved(PWINDOW);
|
g_pLayoutManager->getCurrentLayout()->onWindowRemoved(PWINDOW);
|
||||||
|
|
Loading…
Reference in a new issue