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.
This commit is contained in:
parent
3d0beae828
commit
00379da3d3
2 changed files with 6 additions and 1 deletions
|
@ -16,7 +16,7 @@ class FakeInputDevice;
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
class FakeInputDevice : public InputDevice
|
class KWIN_EXPORT FakeInputDevice : public InputDevice
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "tabletmodemanager.h"
|
#include "tabletmodemanager.h"
|
||||||
|
|
||||||
#include "backends/libinput/device.h"
|
#include "backends/libinput/device.h"
|
||||||
|
#include "backends/fakeinput/fakeinputdevice.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "input_event.h"
|
#include "input_event.h"
|
||||||
#include "input_event_spy.h"
|
#include "input_event_spy.h"
|
||||||
|
@ -24,6 +25,10 @@ KWIN_SINGLETON_FACTORY_VARIABLE(TabletModeManager, s_manager)
|
||||||
|
|
||||||
static bool shouldIgnoreDevice(InputDevice *device)
|
static bool shouldIgnoreDevice(InputDevice *device)
|
||||||
{
|
{
|
||||||
|
if (qobject_cast<FakeInputDevice*>(device)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
auto libinput_device = qobject_cast<LibInput::Device *>(device);
|
auto libinput_device = qobject_cast<LibInput::Device *>(device);
|
||||||
if (!libinput_device) {
|
if (!libinput_device) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue