layout: don't discard fullscreen on new tiling

This commit is contained in:
vaxerski 2023-09-28 17:49:33 +01:00
parent 6d7dc70f66
commit 1f4eab176e
8 changed files with 19 additions and 38 deletions

View file

@ -291,13 +291,6 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow, eDirection dire
return;
}
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID);
if (PWORKSPACE->m_bHasFullscreenWindow) {
const auto PFULLWINDOW = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID);
g_pCompositor->setWindowFullscreen(PFULLWINDOW, false, FULLSCREEN_FULL);
}
// last fail-safe to avoid duplicate fullscreens
if ((!OPENINGON || OPENINGON->pWindow == pWindow) && getNodesOnWorkspace(PNODE->workspaceID) > 1) {
for (auto& node : m_lDwindleNodesData) {
@ -481,8 +474,8 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow, eDirection dire
NEWPARENT->recalcSizePosRecursive(false, horizontalOverride, verticalOverride);
applyNodeDataToWindow(PNODE);
applyNodeDataToWindow(OPENINGON);
recalculateMonitor(pWindow->m_iMonitorID);
pWindow->applyGroupRules();
}

View file

@ -9,7 +9,7 @@
#include <format>
class CHyprDwindleLayout;
enum eFullscreenMode : uint8_t;
enum eFullscreenMode : int8_t;
struct SDwindleNodeData {
SDwindleNodeData* pParent = nullptr;

View file

@ -13,9 +13,10 @@ struct SLayoutMessageHeader {
CWindow* pWindow = nullptr;
};
enum eFullscreenMode : uint8_t;
enum eFullscreenMode : int8_t;
enum eRectCorner {
enum eRectCorner
{
CORNER_NONE = 0,
CORNER_TOPLEFT,
CORNER_TOPRIGHT,
@ -23,9 +24,10 @@ enum eRectCorner {
CORNER_BOTTOMLEFT
};
enum eDirection {
enum eDirection
{
DIRECTION_DEFAULT = -1,
DIRECTION_UP = 0,
DIRECTION_UP = 0,
DIRECTION_RIGHT,
DIRECTION_DOWN,
DIRECTION_LEFT

View file

@ -167,13 +167,6 @@ void CHyprMasterLayout::onWindowCreatedTiling(CWindow* pWindow, eDirection direc
}
}
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID);
if (PWORKSPACE->m_bHasFullscreenWindow) {
const auto PFULLWINDOW = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID);
g_pCompositor->setWindowFullscreen(PFULLWINDOW, false, FULLSCREEN_FULL);
}
// recalc
recalculateMonitor(pWindow->m_iMonitorID);
}

View file

@ -7,10 +7,11 @@
#include <deque>
#include <any>
enum eFullscreenMode : uint8_t;
enum eFullscreenMode : int8_t;
//orientation determines which side of the screen the master area resides
enum eOrientation : uint8_t {
enum eOrientation : uint8_t
{
ORIENTATION_LEFT = 0,
ORIENTATION_TOP,
ORIENTATION_RIGHT,