| 18 | namespace deskflow { |
| 19 | |
| 20 | PortalInputCapture::PortalInputCapture(EiScreen *screen, IEventQueue *events) |
| 21 | : m_screen{screen}, |
| 22 | m_events{events}, |
| 23 | m_portal{xdp_portal_new()} |
| 24 | { |
| 25 | m_glibMainLoop = g_main_loop_new(nullptr, true); |
| 26 | |
| 27 | auto tMethodJob = new TMethodJob<PortalInputCapture>(this, &PortalInputCapture::glibThread); |
| 28 | m_glibThread = new Thread(tMethodJob); |
| 29 | |
| 30 | auto captureCallback = [](gpointer data) { return static_cast<PortalInputCapture *>(data)->initSession(); }; |
| 31 | |
| 32 | g_idle_add(captureCallback, this); |
| 33 | } |
| 34 | |
| 35 | PortalInputCapture::~PortalInputCapture() |
| 36 | { |
nothing calls this directly
no test coverage detected