Commit 00379da3 authored by Alexander Volkov's avatar Alexander Volkov Committed by Xaver Hugl
Browse files

Ignore fake input devices when detecting tablet mode

Otherwise launching firefox, which in turn leads to launching of
xdg-desktop-portal-kde, disables auto-rotation.
parent 3d0beae8
Pipeline #186076 passed with stage
in 14 minutes and 34 seconds
......@@ -16,7 +16,7 @@ class FakeInputDevice;
namespace KWin
{
class FakeInputDevice : public InputDevice
class KWIN_EXPORT FakeInputDevice : public InputDevice
{
Q_OBJECT
......
......@@ -8,6 +8,7 @@
#include "tabletmodemanager.h"
#include "backends/libinput/device.h"
#include "backends/fakeinput/fakeinputdevice.h"
#include "input.h"
#include "input_event.h"
#include "input_event_spy.h"
......@@ -24,6 +25,10 @@ KWIN_SINGLETON_FACTORY_VARIABLE(TabletModeManager, s_manager)
static bool shouldIgnoreDevice(InputDevice *device)
{
if (qobject_cast<FakeInputDevice*>(device)) {
return true;
}
auto libinput_device = qobject_cast<LibInput::Device *>(device);
if (!libinput_device) {
return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment