mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:25:58 +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;
|
||||
|
||||
g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW);
|
||||
|
||||
g_pXWaylandManager->setWindowFullscreen(PWINDOW, PWINDOW->m_bIsFullscreen);
|
||||
}
|
||||
|
||||
void CKeybindManager::moveActiveToWorkspace(std::string args) {
|
||||
|
|
|
@ -174,4 +174,12 @@ void CHyprXWaylandManager::checkBorders(CWindow* pWindow) {
|
|||
if (pWindow->m_uSurface.xwayland->parent) {
|
||||
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 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&);
|
||||
|
|
Loading…
Reference in a new issue