mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-25 17:10:05 +01:00
internal: fix crash at startup on FreeBSD (#12298)
Hyprland at the latest commit crashes at starting up on FreeBSD with SIGSEGV. Checking the validity of g_pXWayland->m_wm before calling updateWorkArea() appears to fix the issue.
This commit is contained in:
parent
9008835c0f
commit
a75f4283d4
3 changed files with 6 additions and 0 deletions
|
|
@ -3029,6 +3029,8 @@ void CCompositor::arrangeMonitors() {
|
|||
|
||||
#ifndef NO_XWAYLAND
|
||||
CBox box = g_pCompositor->calculateX11WorkArea();
|
||||
if (!g_pXWayland || !g_pXWayland->m_wm)
|
||||
return;
|
||||
g_pXWayland->m_wm->updateWorkArea(box.x, box.y, box.w, box.h);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -601,6 +601,8 @@ void CHyprDwindleLayout::recalculateMonitor(const MONITORID& monid) {
|
|||
|
||||
#ifndef NO_XWAYLAND
|
||||
CBox box = g_pCompositor->calculateX11WorkArea();
|
||||
if (!g_pXWayland || !g_pXWayland->m_wm)
|
||||
return;
|
||||
g_pXWayland->m_wm->updateWorkArea(box.x, box.y, box.w, box.h);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -297,6 +297,8 @@ void CHyprMasterLayout::recalculateMonitor(const MONITORID& monid) {
|
|||
|
||||
#ifndef NO_XWAYLAND
|
||||
CBox box = g_pCompositor->calculateX11WorkArea();
|
||||
if (!g_pXWayland || !g_pXWayland->m_wm)
|
||||
return;
|
||||
g_pXWayland->m_wm->updateWorkArea(box.x, box.y, box.w, box.h);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue