mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-10-12 21:16:00 +00:00
@@ -124,23 +124,17 @@ void CForeignToplevelHandleWlr::sendMonitor(CMonitor* pMonitor) {
|
|||||||
|
|
||||||
const auto CLIENT = resource->client();
|
const auto CLIENT = resource->client();
|
||||||
|
|
||||||
struct wl_resource* outputResource;
|
|
||||||
|
|
||||||
if (const auto PLASTMONITOR = g_pCompositor->getMonitorFromID(lastMonitorID); PLASTMONITOR) {
|
if (const auto PLASTMONITOR = g_pCompositor->getMonitorFromID(lastMonitorID); PLASTMONITOR) {
|
||||||
wl_resource_for_each(outputResource, &PLASTMONITOR->output->resources) {
|
const auto OLDRESOURCE = PROTO::outputs.at(PLASTMONITOR->szName)->outputResourceFrom(CLIENT);
|
||||||
if (wl_resource_get_client(outputResource) != CLIENT)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
resource->sendOutputLeave(outputResource);
|
if (OLDRESOURCE)
|
||||||
}
|
resource->sendOutputLeave(OLDRESOURCE->getResource()->resource());
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_resource_for_each(outputResource, &pMonitor->output->resources) {
|
const auto NEWRESOURCE = PROTO::outputs.at(pMonitor->szName)->outputResourceFrom(CLIENT);
|
||||||
if (wl_resource_get_client(outputResource) != CLIENT)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
resource->sendOutputEnter(outputResource);
|
if (NEWRESOURCE)
|
||||||
}
|
resource->sendOutputEnter(NEWRESOURCE->getResource()->resource());
|
||||||
|
|
||||||
lastMonitorID = pMonitor->ID;
|
lastMonitorID = pMonitor->ID;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user