tell windows to fullscreen on keybind

This commit is contained in:
vaxerski 2022-03-30 17:39:04 +02:00
parent d01c7c07d8
commit 7439246efb
3 changed files with 11 additions and 0 deletions

View file

@ -176,6 +176,8 @@ void CKeybindManager::fullscreenActive(std::string args) {
return;
g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW);
g_pXWaylandManager->setWindowFullscreen(PWINDOW, PWINDOW->m_bIsFullscreen);
}
void CKeybindManager::moveActiveToWorkspace(std::string args) {

View file

@ -175,3 +175,11 @@ void CHyprXWaylandManager::checkBorders(CWindow* pWindow) {
pWindow->m_bX11DoesntWantBorders = true;
}
}
void CHyprXWaylandManager::setWindowFullscreen(CWindow* pWindow, bool fullscreen) {
if (pWindow->m_bIsX11) {
wlr_xwayland_surface_set_fullscreen(pWindow->m_uSurface.xwayland, fullscreen);
} else {
wlr_xdg_toplevel_set_fullscreen(pWindow->m_uSurface.xdg->toplevel, fullscreen);
}
}

View file

@ -18,6 +18,7 @@ public:
void sendCloseWindow(CWindow*);
void setWindowSize(CWindow*, const Vector2D&);
void setWindowStyleTiled(CWindow*, uint32_t);
void setWindowFullscreen(CWindow*, bool);
wlr_surface* surfaceAt(CWindow*, const Vector2D&, Vector2D&);
bool shouldBeFloated(CWindow*);
void moveXWaylandWindow(CWindow*, const Vector2D&);