mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 19:45:58 +01:00
wlr-foreign-toplevel: fix fullscreen failing and add output support (#6360)
* wlr-foreign-toplevel: fix fullscreen failing and add output support * fix for core protocol rewrite
This commit is contained in:
parent
b16af45c4a
commit
89a3c90613
1 changed files with 18 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
||||||
#include "ForeignToplevelWlr.hpp"
|
#include "ForeignToplevelWlr.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "../Compositor.hpp"
|
#include "../Compositor.hpp"
|
||||||
|
#include "protocols/core/Output.hpp"
|
||||||
|
#include "render/Renderer.hpp"
|
||||||
|
|
||||||
#define LOGM PROTO::foreignToplevelWlr->protoLog
|
#define LOGM PROTO::foreignToplevelWlr->protoLog
|
||||||
|
|
||||||
|
@ -36,7 +38,21 @@ CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHand
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_pCompositor->setWindowFullscreen(PWINDOW, true);
|
if (output) {
|
||||||
|
const auto wpMonitor = CWLOutputResource::fromResource(output)->monitor;
|
||||||
|
|
||||||
|
if (!wpMonitor.expired()) {
|
||||||
|
const auto monitor = wpMonitor.lock();
|
||||||
|
|
||||||
|
if (PWINDOW->m_pWorkspace != monitor->activeWorkspace) {
|
||||||
|
g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, monitor->activeWorkspace);
|
||||||
|
g_pCompositor->setActiveMonitor(monitor.get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
g_pCompositor->setWindowFullscreen(PWINDOW, true, FULLSCREEN_FULL);
|
||||||
|
g_pHyprRenderer->damageWindow(PWINDOW);
|
||||||
});
|
});
|
||||||
|
|
||||||
resource->setUnsetFullscreen([this](CZwlrForeignToplevelHandleV1* p) {
|
resource->setUnsetFullscreen([this](CZwlrForeignToplevelHandleV1* p) {
|
||||||
|
|
Loading…
Reference in a new issue