Commit fd7ba156 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.

(cherry picked from commit 00379da3)
parent 98de2119
Pipeline #186083 passed with stage
in 21 minutes and 19 seconds
......@@ -16,7 +16,7 @@ class FakeInputDevice;
namespace KWin
{
class FakeInputDevice : public InputDevice
class KWIN_EXPORT FakeInputDevice : public InputDevice
{
Q_OBJECT
......
......@@ -7,11 +7,12 @@
#include "tabletmodemanager.h"
#include "backends/fakeinput/fakeinputdevice.h"
#include "backends/libinput/device.h"
#include "input.h"
#include "inputdevice.h"
#include "input_event.h"
#include "input_event_spy.h"
#include "inputdevice.h"
#include <QDBusConnection>
......@@ -22,7 +23,11 @@ KWIN_SINGLETON_FACTORY_VARIABLE(TabletModeManager, s_manager)
static bool shouldIgnoreDevice(InputDevice *device)
{
auto libinput_device = qobject_cast<LibInput::Device*>(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