mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-08 22:46:01 +01:00
simplify nullcheck in minimize
This commit is contained in:
parent
32381fe6c4
commit
d4e2a0fd16
1 changed files with 1 additions and 5 deletions
|
@ -1034,11 +1034,7 @@ void Events::listener_requestMinimize(void* owner, void* data) {
|
||||||
wlr_xwayland_surface_set_minimized(PWINDOW->m_uSurface.xwayland, E->minimize && g_pCompositor->m_pLastWindow != PWINDOW); // fucking DXVK
|
wlr_xwayland_surface_set_minimized(PWINDOW->m_uSurface.xwayland, E->minimize && g_pCompositor->m_pLastWindow != PWINDOW); // fucking DXVK
|
||||||
} else {
|
} else {
|
||||||
const auto E = (wlr_foreign_toplevel_handle_v1_minimized_event*)data;
|
const auto E = (wlr_foreign_toplevel_handle_v1_minimized_event*)data;
|
||||||
|
g_pEventManager->postEvent({"minimize", getFormat("%x,%i", PWINDOW, E ? (int)E->minimized : 1)});
|
||||||
if (E)
|
|
||||||
g_pEventManager->postEvent({"minimize", getFormat("%x,%i", PWINDOW, (int)E->minimized)});
|
|
||||||
else
|
|
||||||
g_pEventManager->postEvent({"minimize", getFormat("%x,1", PWINDOW)});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue