mirror of
https://github.com/Trensa-Organization/Hyprland.git
synced 2025-03-16 03:03:40 +01:00
tell windows to fullscreen on keybind
This commit is contained in:
parent
d01c7c07d8
commit
7439246efb
3 changed files with 11 additions and 0 deletions
|
@ -176,6 +176,8 @@ void CKeybindManager::fullscreenActive(std::string args) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW);
|
g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW);
|
||||||
|
|
||||||
|
g_pXWaylandManager->setWindowFullscreen(PWINDOW, PWINDOW->m_bIsFullscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::moveActiveToWorkspace(std::string args) {
|
void CKeybindManager::moveActiveToWorkspace(std::string args) {
|
||||||
|
|
|
@ -174,4 +174,12 @@ void CHyprXWaylandManager::checkBorders(CWindow* pWindow) {
|
||||||
if (pWindow->m_uSurface.xwayland->parent) {
|
if (pWindow->m_uSurface.xwayland->parent) {
|
||||||
pWindow->m_bX11DoesntWantBorders = true;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -18,6 +18,7 @@ public:
|
||||||
void sendCloseWindow(CWindow*);
|
void sendCloseWindow(CWindow*);
|
||||||
void setWindowSize(CWindow*, const Vector2D&);
|
void setWindowSize(CWindow*, const Vector2D&);
|
||||||
void setWindowStyleTiled(CWindow*, uint32_t);
|
void setWindowStyleTiled(CWindow*, uint32_t);
|
||||||
|
void setWindowFullscreen(CWindow*, bool);
|
||||||
wlr_surface* surfaceAt(CWindow*, const Vector2D&, Vector2D&);
|
wlr_surface* surfaceAt(CWindow*, const Vector2D&, Vector2D&);
|
||||||
bool shouldBeFloated(CWindow*);
|
bool shouldBeFloated(CWindow*);
|
||||||
void moveXWaylandWindow(CWindow*, const Vector2D&);
|
void moveXWaylandWindow(CWindow*, const Vector2D&);
|
||||||
|
|
Loading…
Add table
Reference in a new issue