From d086fa3faa219154c9f9d90a2d8958dcfd2ad393 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 18 Mar 2022 20:20:49 +0100 Subject: [PATCH] fixes minor --- src/events/Events.cpp | 14 +++++++------- src/render/Renderer.cpp | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/events/Events.cpp b/src/events/Events.cpp index 8b1f9409..7898caeb 100644 --- a/src/events/Events.cpp +++ b/src/events/Events.cpp @@ -163,27 +163,27 @@ void Events::listener_mapWindow(wl_listener* listener, void* data) { } void Events::listener_unmapWindow(wl_listener* listener, void* data) { - CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_mapWindow); + CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_unmapWindow); } void Events::listener_commitWindow(wl_listener* listener, void* data) { - CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_mapWindow); + CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_commitWindow); } void Events::listener_destroyWindow(wl_listener* listener, void* data) { - CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_mapWindow); + CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_destroyWindow); } void Events::listener_setTitleWindow(wl_listener* listener, void* data) { - CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_mapWindow); + CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_setTitleWindow); } void Events::listener_fullscreenWindow(wl_listener* listener, void* data) { - CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_mapWindow); + CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_fullscreenWindow); } void Events::listener_mouseAxis(wl_listener* listener, void* data) { @@ -199,7 +199,7 @@ void Events::listener_keyboardDestroy(wl_listener* listener, void* data) { } void Events::listener_activateX11(wl_listener* listener, void* data) { - CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_mapWindow); + CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_activateX11); if (PWINDOW->m_iX11Type == 1 /* Managed */) { wlr_xwayland_surface_activate(PWINDOW->m_uSurface.xwayland, 1); @@ -207,7 +207,7 @@ void Events::listener_activateX11(wl_listener* listener, void* data) { } void Events::listener_configureX11(wl_listener* listener, void* data) { - CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_mapWindow); + CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_configureX11); const auto E = (wlr_xwayland_surface_configure_event*)data; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index a62da514..0fd783c1 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -70,6 +70,7 @@ void CHyprRenderer::renderAllClientsForMonitor(const int& ID, timespec* time) { SRenderData renderdata = {PMONITOR->output, time, w.m_vSize.x, w.m_vSize.y}; - wlr_surface_for_each_surface(w.m_uSurface.xwayland->surface, renderSurface, &renderdata); + if (w.m_uSurface.xwayland->surface) + wlr_surface_for_each_surface(w.m_uSurface.xwayland->surface, renderSurface, &renderdata); } }