mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-07 16:35:59 +01:00
remove fullscreen if tiled window opened behind
This commit is contained in:
parent
cb0371dab1
commit
2c968ac962
3 changed files with 15 additions and 2 deletions
|
@ -450,6 +450,19 @@ CWindow* Events::remapWindow(int windowID, bool wasfloating, int forcemonitor) {
|
|||
PWINDOWINARR->setDefaultSize(Vector2D(g_pWindowManager->Screen->width_in_pixels / 2.f, g_pWindowManager->Screen->height_in_pixels / 2.f));
|
||||
}
|
||||
|
||||
// Check if the workspace has a fullscreen window. if so, remove its' fullscreen status.
|
||||
const auto PWORKSPACE = g_pWindowManager->getWorkspaceByID(g_pWindowManager->activeWorkspaces[CURRENTSCREEN]);
|
||||
if (PWORKSPACE && PWORKSPACE->getHasFullscreenWindow()) {
|
||||
const auto PFULLSCREENWINDOW = g_pWindowManager->getFullscreenWindowByWorkspace(PWORKSPACE->getID());
|
||||
|
||||
if (PFULLSCREENWINDOW) {
|
||||
PFULLSCREENWINDOW->setFullscreen(false);
|
||||
PFULLSCREENWINDOW->setDirty(true);
|
||||
PWORKSPACE->setHasFullscreenWindow(false);
|
||||
g_pWindowManager->setAllWorkspaceWindowsDirtyByID(PWORKSPACE->getID());
|
||||
}
|
||||
}
|
||||
|
||||
// Set the parent
|
||||
// check if lastwindow is on our workspace
|
||||
if (auto PLASTWINDOW = g_pWindowManager->getWindowFromDrawable(g_pWindowManager->LastWindow); (PLASTWINDOW && PLASTWINDOW->getWorkspaceID() == g_pWindowManager->activeWorkspaces[CURRENTSCREEN]) || wasfloating || (forcemonitor != -1 && forcemonitor != PMONITOR->ID)) {
|
||||
|
|
|
@ -1346,7 +1346,7 @@ void CWindowManager::moveActiveWindowTo(char dir) {
|
|||
|
||||
CWindow* CWindowManager::getFullscreenWindowByWorkspace(const int& id) {
|
||||
for (auto& window : windows) {
|
||||
if (window.getWorkspaceID() == id && window.getFullscreen())
|
||||
if (window.getWorkspaceID() == id && window.getFullscreen() && window.getDrawable() > 0)
|
||||
return &window;
|
||||
}
|
||||
|
||||
|
|
|
@ -120,6 +120,7 @@ public:
|
|||
void updateBarInfo();
|
||||
|
||||
int getWindowsOnWorkspace(const int&);
|
||||
CWindow* getFullscreenWindowByWorkspace(const int&);
|
||||
|
||||
void recalcAllWorkspaces();
|
||||
|
||||
|
@ -151,7 +152,6 @@ private:
|
|||
SMonitor* getMonitorFromWorkspace(const int&);
|
||||
void recalcEntireWorkspace(const int&);
|
||||
void fixMasterWorkspaceOnClosed(CWindow* pWindow);
|
||||
CWindow* getFullscreenWindowByWorkspace(const int&);
|
||||
};
|
||||
|
||||
inline std::unique_ptr<CWindowManager> g_pWindowManager = std::make_unique<CWindowManager>();
|
||||
|
|
Loading…
Reference in a new issue