mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-31 12:11:56 -07:00
output-layout: fix wlroots display handling (#3718)
This commit is contained in:
@@ -188,7 +188,7 @@ void CMonitor::onConnect(bool noRule) {
|
||||
g_pCompositor->scheduleFrameForMonitor(this);
|
||||
}
|
||||
|
||||
void CMonitor::onDisconnect() {
|
||||
void CMonitor::onDisconnect(bool destroy) {
|
||||
|
||||
if (renderTimer) {
|
||||
wl_event_source_remove(renderTimer);
|
||||
@@ -276,7 +276,8 @@ void CMonitor::onDisconnect() {
|
||||
|
||||
activeWorkspace = -1;
|
||||
|
||||
wlr_output_layout_remove(g_pCompositor->m_sWLROutputLayout, output);
|
||||
if (!destroy)
|
||||
wlr_output_layout_remove(g_pCompositor->m_sWLROutputLayout, output);
|
||||
|
||||
wlr_output_enable(output, false);
|
||||
|
||||
@@ -298,7 +299,6 @@ void CMonitor::onDisconnect() {
|
||||
|
||||
g_pHyprRenderer->m_pMostHzMonitor = pMonitorMostHz;
|
||||
}
|
||||
|
||||
std::erase_if(g_pCompositor->m_vMonitors, [&](std::shared_ptr<CMonitor>& el) { return el.get() == this; });
|
||||
}
|
||||
|
||||
@@ -642,4 +642,4 @@ void CMonitor::moveTo(const Vector2D& pos) {
|
||||
|
||||
Vector2D CMonitor::middle() {
|
||||
return vecPosition + vecSize / 2.f;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user