simplify nullcheck in minimize

This commit is contained in:
vaxerski 2023-01-30 14:00:02 +00:00
parent 32381fe6c4
commit d4e2a0fd16

View file

@ -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)});
} }
} }