mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
mobileshell: Remove active window timer length to be immediate
We don't need a long delay, the shortest possible one works as well.
This commit is contained in:
parent
6a31709897
commit
e120f19601
2 changed files with 4 additions and 1 deletions
|
|
@ -9,12 +9,13 @@
|
|||
|
||||
#include <QGuiApplication>
|
||||
|
||||
constexpr int ACTIVE_WINDOW_UPDATE_INVERVAL = 250;
|
||||
constexpr int ACTIVE_WINDOW_UPDATE_INVERVAL = 0;
|
||||
|
||||
WindowUtil::WindowUtil(QObject *parent)
|
||||
: QObject{parent}
|
||||
, m_activeWindowTimer{new QTimer{this}}
|
||||
{
|
||||
// use 0 tick timer to update active window to ensure window state has finished changing
|
||||
m_activeWindowTimer->setSingleShot(true);
|
||||
m_activeWindowTimer->setInterval(ACTIVE_WINDOW_UPDATE_INVERVAL);
|
||||
connect(m_activeWindowTimer, &QTimer::timeout, this, &WindowUtil::updateActiveWindow);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
/**
|
||||
* Utility class that provides useful functions related to windows and KWin+KWayland.
|
||||
*
|
||||
* TODO: Add per-screen support
|
||||
*
|
||||
* @author Devin Lin <devin@kde.org>
|
||||
**/
|
||||
class WindowUtil : public QObject
|
||||
|
|
|
|||
Loading…
Reference in a new issue