kwin/libinput
David Edmundson fe231be5e2 Keep all touchpad QActions in the main thread
Summary:
Making QActions with the Connection as a parent is dangerous as it gets
moved to a new thread, moving all child objects to that thread.

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

This patch simply moves the code to the Input class, where we set up the
libinput connection.

Test Plan:
Closed lid, kwin_wayland was still there when I resumed
Set manual shortcut for toggling touchpad, that still worked

Reviewers: #plasma

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5733
2017-05-07 16:08:00 +02:00
..
connection.cpp Keep all touchpad QActions in the main thread 2017-05-07 16:08:00 +02:00
connection.h Keep all touchpad QActions in the main thread 2017-05-07 16:08:00 +02:00
context.cpp Require Qt 5.7 and remove pre-5.7 code 2017-02-07 20:43:19 +01:00
context.h Move Udev into an own header and implementation 2015-04-24 12:03:19 +02:00
device.cpp [libinput] Minor coding style fix 2016-12-06 15:02:42 +01:00
device.h [libinput] Change unset of scroll method and acceleration profile 2016-12-06 13:45:54 +01:00
events.cpp Support for relative pointer motion events 2016-10-12 11:26:46 +02:00
events.h Support for relative pointer motion events 2016-10-12 11:26:46 +02:00
libinput_logging.cpp pedantic fixes 2016-07-16 13:14:44 -04:00
libinput_logging.h [libinput] Add dedicated logging category for libinput 2015-07-31 12:43:35 +02:00