<table><tr><td style="">davidedmundson created this revision.<br />Restricted Application added a project: KWin.<br />Restricted Application added subscribers: KWin, kwin, plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5733" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Making QActions with the Connection as a parent is dangerous as it gets<br />
moved to a new thread, moving all child objects to that thread.</p>

<p>KGlobalAccel and QAction aren't thread safe and we shouldn't be using it<br />
in two threads. This was notably seen when runnng invokeShortcut over<br />
DBus which then invokes it on the main thread. Something my laptop was<br />
doing when I closed the lid.</p>

<p>This patch simply moves the code to the Input class, where we set up the<br />
libinput connection.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Closed lid, kwin_wayland was still there when I resumed<br />
Set manual shortcut for toggling touchpad, that still worked</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5733" rel="noreferrer">https://phabricator.kde.org/D5733</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>input.cpp<br />
libinput/connection.cpp<br />
libinput/connection.h</div></div></div><br /><div><strong>To: </strong>davidedmundson, Plasma<br /><strong>Cc: </strong>plasma-devel, kwin, KWin, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, lukas<br /></div>