mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 21:13:48 -07: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:
@@ -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) {
|
||||||
@@ -372,4 +388,4 @@ PHLWINDOW CForeignToplevelWlrProtocol::windowFromHandleResource(wl_resource* res
|
|||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user