refactor: PortalInputCapture: do not create nested pointer in new Thread call

This commit is contained in:
sithlord48
2025-07-03 09:05:45 -04:00
committed by Nick Bolton
parent 4a92a3295b
commit cfbfa88cdc

View File

@ -22,7 +22,9 @@ PortalInputCapture::PortalInputCapture(EiScreen *screen, IEventQueue *events)
m_portal{xdp_portal_new()}
{
m_glibMainLoop = g_main_loop_new(nullptr, true);
m_glibThread = new Thread(new TMethodJob<PortalInputCapture>(this, &PortalInputCapture::glibThread));
auto tMethodJob = new TMethodJob<PortalInputCapture>(this, &PortalInputCapture::glibThread);
m_glibThread = new Thread(tMethodJob);
auto captureCallback = [](gpointer data) { return static_cast<PortalInputCapture *>(data)->initSession(); };