added fakefullscreen

This commit is contained in:
Vaxry 2023-01-01 16:54:13 +01:00
parent 7525818097
commit cb4f748226
4 changed files with 15 additions and 2 deletions

View file

@ -157,6 +157,9 @@ class CWindow {
// For pinned (sticky) windows // For pinned (sticky) windows
bool m_bPinned = false; bool m_bPinned = false;
// fakefullscreen
bool m_bInFullscreenReported = false;
// for proper cycling. While cycling we can't just move the pointers, so we need to keep track of the last cycled window. // for proper cycling. While cycling we can't just move the pointers, so we need to keep track of the last cycled window.
CWindow* m_pLastCycledWindow = nullptr; CWindow* m_pLastCycledWindow = nullptr;

View file

@ -11,6 +11,7 @@ CKeybindManager::CKeybindManager() {
m_mDispatchers["togglefloating"] = toggleActiveFloating; m_mDispatchers["togglefloating"] = toggleActiveFloating;
m_mDispatchers["workspace"] = changeworkspace; m_mDispatchers["workspace"] = changeworkspace;
m_mDispatchers["fullscreen"] = fullscreenActive; m_mDispatchers["fullscreen"] = fullscreenActive;
m_mDispatchers["fakefullscreen"] = fakeFullscreenActive;
m_mDispatchers["movetoworkspace"] = moveActiveToWorkspace; m_mDispatchers["movetoworkspace"] = moveActiveToWorkspace;
m_mDispatchers["movetoworkspacesilent"] = moveActiveToWorkspaceSilent; m_mDispatchers["movetoworkspacesilent"] = moveActiveToWorkspaceSilent;
m_mDispatchers["pseudo"] = toggleActivePseudo; m_mDispatchers["pseudo"] = toggleActivePseudo;
@ -1818,3 +1819,10 @@ void CKeybindManager::bringActiveToTop(std::string args) {
if (g_pCompositor->m_pLastWindow && g_pCompositor->m_pLastWindow->m_bIsFloating) if (g_pCompositor->m_pLastWindow && g_pCompositor->m_pLastWindow->m_bIsFloating)
g_pCompositor->moveWindowToTop(g_pCompositor->m_pLastWindow); g_pCompositor->moveWindowToTop(g_pCompositor->m_pLastWindow);
} }
void CKeybindManager::fakeFullscreenActive(std::string args) {
if (g_pCompositor->m_pLastWindow) {
// will also set the flag
g_pXWaylandManager->setWindowFullscreen(g_pCompositor->m_pLastWindow, !g_pCompositor->m_pLastWindow->m_bInFullscreenReported);
}
}

View file

@ -25,8 +25,7 @@ struct SKeybind {
bool shadowed = false; bool shadowed = false;
}; };
enum eFocusWindowMode enum eFocusWindowMode {
{
MODE_CLASS_REGEX = 0, MODE_CLASS_REGEX = 0,
MODE_TITLE_REGEX, MODE_TITLE_REGEX,
MODE_ADDRESS, MODE_ADDRESS,
@ -91,6 +90,7 @@ class CKeybindManager {
static void toggleActivePseudo(std::string); static void toggleActivePseudo(std::string);
static void changeworkspace(std::string); static void changeworkspace(std::string);
static void fullscreenActive(std::string); static void fullscreenActive(std::string);
static void fakeFullscreenActive(std::string);
static void moveActiveToWorkspace(std::string); static void moveActiveToWorkspace(std::string);
static void moveActiveToWorkspaceSilent(std::string); static void moveActiveToWorkspaceSilent(std::string);
static void moveFocusTo(std::string); static void moveFocusTo(std::string);

View file

@ -257,6 +257,8 @@ void CHyprXWaylandManager::setWindowFullscreen(CWindow* pWindow, bool fullscreen
if (pWindow->m_phForeignToplevel) if (pWindow->m_phForeignToplevel)
wlr_foreign_toplevel_handle_v1_set_fullscreen(pWindow->m_phForeignToplevel, fullscreen); wlr_foreign_toplevel_handle_v1_set_fullscreen(pWindow->m_phForeignToplevel, fullscreen);
pWindow->m_bInFullscreenReported = fullscreen;
} }
Vector2D CHyprXWaylandManager::getMaxSizeForWindow(CWindow* pWindow) { Vector2D CHyprXWaylandManager::getMaxSizeForWindow(CWindow* pWindow) {