feat: 增加窗口的UUID的信息
wayland下的拖动窗口实现分屏的功能需要UUID,在此处新增wayland的UUID的返回接口 Log: 增加窗口的返回的UUID信息 Influence: wayland下,拖动任务栏的图标查看是否支持分屏 Bug: https://pms.uniontech.com/bug-view-147657.html Change-Id: If97699b74707cbf3fe3395a65f72f8bd58de3894
This commit is contained in:
parent
8b89bc9092
commit
2a226a1016
@ -48,176 +48,132 @@ public Q_SLOTS: // METHODS
|
|||||||
return asyncCallWithArgumentList(QStringLiteral("AppId"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("AppId"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<DockRect> Geometry()
|
inline QDBusPendingReply<DockRect> Geometry()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("Geometry"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("Geometry"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<QString> Icon()
|
inline QDBusPendingReply<QString> Icon()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("Icon"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("Icon"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<uint> InternalId()
|
inline QDBusPendingReply<uint> InternalId()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("InternalId"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("InternalId"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsActive()
|
inline QDBusPendingReply<bool> IsActive()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsActive"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsActive"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsCloseable()
|
inline QDBusPendingReply<bool> IsCloseable()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsCloseable"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsCloseable"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsDemandingAttention()
|
inline QDBusPendingReply<bool> IsDemandingAttention()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsDemandingAttention"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsDemandingAttention"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsFullscreen()
|
inline QDBusPendingReply<bool> IsFullscreen()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsFullscreen"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsFullscreen"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsFullscreenable()
|
inline QDBusPendingReply<bool> IsFullscreenable()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsFullscreenable"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsFullscreenable"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsKeepAbove()
|
inline QDBusPendingReply<bool> IsKeepAbove()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsKeepAbove"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsKeepAbove"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsMaximizeable()
|
inline QDBusPendingReply<bool> IsMaximizeable()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsMaximizeable"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsMaximizeable"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsMaximized()
|
inline QDBusPendingReply<bool> IsMaximized()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsMaximized"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsMaximized"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsMinimizeable()
|
inline QDBusPendingReply<bool> IsMinimizeable()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsMinimizeable"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsMinimizeable"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsMinimized()
|
inline QDBusPendingReply<bool> IsMinimized()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsMinimized"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsMinimized"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsMovable()
|
inline QDBusPendingReply<bool> IsMovable()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsMovable"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsMovable"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsOnAllDesktops()
|
inline QDBusPendingReply<bool> IsOnAllDesktops()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsOnAllDesktops"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsOnAllDesktops"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsResizable()
|
inline QDBusPendingReply<bool> IsResizable()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsResizable"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsResizable"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsShadeable()
|
inline QDBusPendingReply<bool> IsShadeable()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsShadeable"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsShadeable"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsShaded()
|
inline QDBusPendingReply<bool> IsShaded()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsShaded"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsShaded"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsValid()
|
inline QDBusPendingReply<bool> IsValid()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsValid"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsValid"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> IsVirtualDesktopChangeable()
|
inline QDBusPendingReply<bool> IsVirtualDesktopChangeable()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("IsVirtualDesktopChangeable"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("IsVirtualDesktopChangeable"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<uint> Pid()
|
inline QDBusPendingReply<uint> Pid()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("Pid"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("Pid"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestActivate()
|
inline QDBusPendingReply<> RequestActivate()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -231,7 +187,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestActivate"), argumentList);
|
CallQueued(QStringLiteral("RequestActivate"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestClose()
|
inline QDBusPendingReply<> RequestClose()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -245,7 +200,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestClose"), argumentList);
|
CallQueued(QStringLiteral("RequestClose"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestEnterNewVirtualDesktop()
|
inline QDBusPendingReply<> RequestEnterNewVirtualDesktop()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -259,7 +213,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestEnterNewVirtualDesktop"), argumentList);
|
CallQueued(QStringLiteral("RequestEnterNewVirtualDesktop"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestEnterVirtualDesktop(const QString &argin0)
|
inline QDBusPendingReply<> RequestEnterVirtualDesktop(const QString &argin0)
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -275,7 +228,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestEnterVirtualDesktop"), argumentList);
|
CallQueued(QStringLiteral("RequestEnterVirtualDesktop"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestLeaveVirtualDesktop(const QString &argin0)
|
inline QDBusPendingReply<> RequestLeaveVirtualDesktop(const QString &argin0)
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -291,7 +243,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestLeaveVirtualDesktop"), argumentList);
|
CallQueued(QStringLiteral("RequestLeaveVirtualDesktop"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestMove()
|
inline QDBusPendingReply<> RequestMove()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -305,7 +256,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestMove"), argumentList);
|
CallQueued(QStringLiteral("RequestMove"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestResize()
|
inline QDBusPendingReply<> RequestResize()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -319,7 +269,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestResize"), argumentList);
|
CallQueued(QStringLiteral("RequestResize"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestToggleKeepAbove()
|
inline QDBusPendingReply<> RequestToggleKeepAbove()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -333,7 +282,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestToggleKeepAbove"), argumentList);
|
CallQueued(QStringLiteral("RequestToggleKeepAbove"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestToggleKeepBelow()
|
inline QDBusPendingReply<> RequestToggleKeepBelow()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -347,7 +295,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestToggleKeepBelow"), argumentList);
|
CallQueued(QStringLiteral("RequestToggleKeepBelow"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestToggleMaximized()
|
inline QDBusPendingReply<> RequestToggleMaximized()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -361,7 +308,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestToggleMaximized"), argumentList);
|
CallQueued(QStringLiteral("RequestToggleMaximized"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestToggleMinimized()
|
inline QDBusPendingReply<> RequestToggleMinimized()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -375,7 +321,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestToggleMinimized"), argumentList);
|
CallQueued(QStringLiteral("RequestToggleMinimized"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestToggleShaded()
|
inline QDBusPendingReply<> RequestToggleShaded()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -389,7 +334,6 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestToggleShaded"), argumentList);
|
CallQueued(QStringLiteral("RequestToggleShaded"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<> RequestVirtualDesktop(uint argin0)
|
inline QDBusPendingReply<> RequestVirtualDesktop(uint argin0)
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
@ -405,47 +349,41 @@ public Q_SLOTS: // METHODS
|
|||||||
CallQueued(QStringLiteral("RequestVirtualDesktop"), argumentList);
|
CallQueued(QStringLiteral("RequestVirtualDesktop"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> SkipSwitcher()
|
inline QDBusPendingReply<bool> SkipSwitcher()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("SkipSwitcher"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("SkipSwitcher"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<bool> SkipTaskbar()
|
inline QDBusPendingReply<bool> SkipTaskbar()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("SkipTaskbar"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("SkipTaskbar"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<QString> Title()
|
inline QDBusPendingReply<QString> Title()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("Title"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("Title"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<uint> VirtualDesktop()
|
inline QDBusPendingReply<uint> VirtualDesktop()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("VirtualDesktop"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("VirtualDesktop"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline QDBusPendingReply<uint> WindowId()
|
inline QDBusPendingReply<uint> WindowId()
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
return asyncCallWithArgumentList(QStringLiteral("WindowId"), argumentList);
|
return asyncCallWithArgumentList(QStringLiteral("WindowId"), argumentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QByteArray> Uuid()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("uuid"), argumentList);;
|
||||||
|
}
|
||||||
|
|
||||||
Q_SIGNALS: // SIGNALS
|
Q_SIGNALS: // SIGNALS
|
||||||
void ActiveChanged();
|
void ActiveChanged();
|
||||||
|
@ -18,7 +18,7 @@ void registerWindowInfoMetaType()
|
|||||||
|
|
||||||
QDebug operator<<(QDebug argument, const WindowInfo &info)
|
QDebug operator<<(QDebug argument, const WindowInfo &info)
|
||||||
{
|
{
|
||||||
argument << '(' << info.title << ',' << info.attention << ')';
|
argument << '(' << info.title << ',' << info.attention << info.uuid << ')';
|
||||||
|
|
||||||
return argument;
|
return argument;
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@ QDebug operator<<(QDebug argument, const WindowInfo &info)
|
|||||||
QDBusArgument &operator<<(QDBusArgument &argument, const WindowInfo &info)
|
QDBusArgument &operator<<(QDBusArgument &argument, const WindowInfo &info)
|
||||||
{
|
{
|
||||||
argument.beginStructure();
|
argument.beginStructure();
|
||||||
argument << info.title << info.attention;
|
argument << info.title << info.attention << info.uuid;
|
||||||
argument.endStructure();
|
argument.endStructure();
|
||||||
|
|
||||||
return argument;
|
return argument;
|
||||||
@ -35,7 +35,7 @@ QDBusArgument &operator<<(QDBusArgument &argument, const WindowInfo &info)
|
|||||||
const QDBusArgument &operator>>(const QDBusArgument &argument, WindowInfo &info)
|
const QDBusArgument &operator>>(const QDBusArgument &argument, WindowInfo &info)
|
||||||
{
|
{
|
||||||
argument.beginStructure();
|
argument.beginStructure();
|
||||||
argument >> info.title >> info.attention;
|
argument >> info.title >> info.attention >> info.uuid;
|
||||||
argument.endStructure();
|
argument.endStructure();
|
||||||
|
|
||||||
return argument;
|
return argument;
|
||||||
@ -44,5 +44,6 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, WindowInfo &info)
|
|||||||
bool WindowInfo::operator==(const WindowInfo &rhs) const
|
bool WindowInfo::operator==(const WindowInfo &rhs) const
|
||||||
{
|
{
|
||||||
return attention == rhs.attention &&
|
return attention == rhs.attention &&
|
||||||
title == rhs.title;
|
title == rhs.title &&
|
||||||
|
uuid == rhs.uuid;
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
bool attention;
|
bool attention;
|
||||||
QString title;
|
QString title;
|
||||||
|
QString uuid;
|
||||||
};
|
};
|
||||||
Q_DECLARE_METATYPE(WindowInfo)
|
Q_DECLARE_METATYPE(WindowInfo)
|
||||||
|
|
||||||
|
@ -422,6 +422,7 @@ void Entry::updateExportWindowInfos()
|
|||||||
XWindow xid = info->getXid();
|
XWindow xid = info->getXid();
|
||||||
winInfo.title = info->getTitle();
|
winInfo.title = info->getTitle();
|
||||||
winInfo.attention = info->isDemandingAttention();
|
winInfo.attention = info->isDemandingAttention();
|
||||||
|
winInfo.uuid = info->uuid();
|
||||||
infos[xid] = winInfo;
|
infos[xid] = winInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,7 +432,8 @@ void Entry::updateExportWindowInfos()
|
|||||||
for (auto iter = infos.begin(); iter != infos.end(); iter++) {
|
for (auto iter = infos.begin(); iter != infos.end(); iter++) {
|
||||||
XWindow xid = iter.key();
|
XWindow xid = iter.key();
|
||||||
if (infos[xid].title != m_exportWindowInfos[xid].title ||
|
if (infos[xid].title != m_exportWindowInfos[xid].title ||
|
||||||
infos[xid].attention != m_exportWindowInfos[xid].attention) {
|
infos[xid].attention != m_exportWindowInfos[xid].attention ||
|
||||||
|
infos[xid].uuid != m_exportWindowInfos[xid].uuid) {
|
||||||
changed = true;
|
changed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,7 @@ public:
|
|||||||
virtual bool allowClose() = 0;
|
virtual bool allowClose() = 0;
|
||||||
virtual void update() = 0;
|
virtual void update() = 0;
|
||||||
virtual void killClient() = 0;
|
virtual void killClient() = 0;
|
||||||
|
virtual QString uuid() = 0;
|
||||||
|
|
||||||
XWindow getXid() {return xid;}
|
XWindow getXid() {return xid;}
|
||||||
void setEntry(Entry *value) {entry = value;}
|
void setEntry(Entry *value) {entry = value;}
|
||||||
|
@ -28,12 +28,12 @@
|
|||||||
|
|
||||||
WindowInfoK::WindowInfoK(PlasmaWindow *window, XWindow _xid)
|
WindowInfoK::WindowInfoK(PlasmaWindow *window, XWindow _xid)
|
||||||
: WindowInfoBase ()
|
: WindowInfoBase ()
|
||||||
, updateCalled(false)
|
, m_updateCalled(false)
|
||||||
, internalId(0)
|
, m_internalId(0)
|
||||||
, demaningAttention(false)
|
, m_demaningAttention(false)
|
||||||
, closeable(true)
|
, m_closeable(true)
|
||||||
, minimized(true)
|
, m_minimized(true)
|
||||||
, plasmaWindow(window)
|
, m_plasmaWindow(window)
|
||||||
{
|
{
|
||||||
xid = _xid;
|
xid = _xid;
|
||||||
createdTime = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::system_clock::now().time_since_epoch()).count(); // 获取当前时间,精确到纳秒
|
createdTime = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::system_clock::now().time_since_epoch()).count(); // 获取当前时间,精确到纳秒
|
||||||
@ -46,23 +46,23 @@ WindowInfoK::~WindowInfoK()
|
|||||||
|
|
||||||
bool WindowInfoK::shouldSkip()
|
bool WindowInfoK::shouldSkip()
|
||||||
{
|
{
|
||||||
if (!updateCalled) {
|
if (!m_updateCalled) {
|
||||||
update();
|
update();
|
||||||
updateCalled = true;
|
m_updateCalled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool skip = plasmaWindow->SkipTaskbar();
|
bool skip = m_plasmaWindow->SkipTaskbar();
|
||||||
|
|
||||||
// 添加窗口能否最小化判断, 如果窗口不能最小化则隐藏任务栏图标
|
// 添加窗口能否最小化判断, 如果窗口不能最小化则隐藏任务栏图标
|
||||||
bool canMinimize = false;
|
bool canMinimize = false;
|
||||||
canMinimize = plasmaWindow->IsMinimizeable();
|
canMinimize = m_plasmaWindow->IsMinimizeable();
|
||||||
if (!canMinimize)
|
if (!canMinimize)
|
||||||
skip = true;
|
skip = true;
|
||||||
|
|
||||||
if (skip) {
|
if (skip) {
|
||||||
// 白名单, 过滤类似“欢迎应用”, 没有最小化窗口但是需要在任务栏显示图标
|
// 白名单, 过滤类似“欢迎应用”, 没有最小化窗口但是需要在任务栏显示图标
|
||||||
QStringList list { "dde-introduction"};
|
QStringList list { "dde-introduction"};
|
||||||
if (list.indexOf(appId) != -1)
|
if (list.indexOf(m_appId) != -1)
|
||||||
skip = false;
|
skip = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,42 +81,42 @@ QString WindowInfoK::getTitle()
|
|||||||
|
|
||||||
bool WindowInfoK::isDemandingAttention()
|
bool WindowInfoK::isDemandingAttention()
|
||||||
{
|
{
|
||||||
return demaningAttention;
|
return m_demaningAttention;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WindowInfoK::allowClose()
|
bool WindowInfoK::allowClose()
|
||||||
{
|
{
|
||||||
return closeable;
|
return m_closeable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::close(uint32_t timestamp)
|
void WindowInfoK::close(uint32_t timestamp)
|
||||||
{
|
{
|
||||||
plasmaWindow->RequestClose();
|
m_plasmaWindow->RequestClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString WindowInfoK::getAppId()
|
QString WindowInfoK::getAppId()
|
||||||
{
|
{
|
||||||
return appId;
|
return m_appId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::setAppId(QString _appId)
|
void WindowInfoK::setAppId(QString _appId)
|
||||||
{
|
{
|
||||||
appId = _appId;
|
m_appId = _appId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::activate()
|
void WindowInfoK::activate()
|
||||||
{
|
{
|
||||||
plasmaWindow->RequestActivate();
|
m_plasmaWindow->RequestActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::minimize()
|
void WindowInfoK::minimize()
|
||||||
{
|
{
|
||||||
plasmaWindow->RequestToggleMinimized();
|
m_plasmaWindow->RequestToggleMinimized();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WindowInfoK::isMinimized()
|
bool WindowInfoK::isMinimized()
|
||||||
{
|
{
|
||||||
return minimized;
|
return m_minimized;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WindowInfoK::changeXid(XWindow _xid)
|
bool WindowInfoK::changeXid(XWindow _xid)
|
||||||
@ -127,52 +127,52 @@ bool WindowInfoK::changeXid(XWindow _xid)
|
|||||||
|
|
||||||
PlasmaWindow *WindowInfoK::getPlasmaWindow()
|
PlasmaWindow *WindowInfoK::getPlasmaWindow()
|
||||||
{
|
{
|
||||||
return plasmaWindow;
|
return m_plasmaWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WindowInfoK::updateGeometry()
|
bool WindowInfoK::updateGeometry()
|
||||||
{
|
{
|
||||||
DockRect rect = plasmaWindow->Geometry();
|
DockRect rect = m_plasmaWindow->Geometry();
|
||||||
if (geometry == rect)
|
if (m_geometry == rect)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
geometry = rect;
|
m_geometry = rect;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::updateTitle()
|
void WindowInfoK::updateTitle()
|
||||||
{
|
{
|
||||||
title = plasmaWindow->Title();
|
title = m_plasmaWindow->Title();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::updateDemandingAttention()
|
void WindowInfoK::updateDemandingAttention()
|
||||||
{
|
{
|
||||||
demaningAttention = plasmaWindow->IsDemandingAttention();
|
m_demaningAttention = m_plasmaWindow->IsDemandingAttention();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::updateIcon()
|
void WindowInfoK::updateIcon()
|
||||||
{
|
{
|
||||||
icon = plasmaWindow->Icon();
|
icon = m_plasmaWindow->Icon();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::updateAppId()
|
void WindowInfoK::updateAppId()
|
||||||
{
|
{
|
||||||
appId = plasmaWindow->AppId();
|
m_appId = m_plasmaWindow->AppId();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::updateInternalId()
|
void WindowInfoK::updateInternalId()
|
||||||
{
|
{
|
||||||
internalId = plasmaWindow->InternalId();
|
m_internalId = m_plasmaWindow->InternalId();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::updateCloseable()
|
void WindowInfoK::updateCloseable()
|
||||||
{
|
{
|
||||||
closeable = plasmaWindow->IsCloseable();
|
m_closeable = m_plasmaWindow->IsCloseable();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowInfoK::updateProcessInfo()
|
void WindowInfoK::updateProcessInfo()
|
||||||
{
|
{
|
||||||
pid = plasmaWindow->Pid();
|
pid = m_plasmaWindow->Pid();
|
||||||
processInfo = new ProcessInfo(pid);
|
processInfo = new ProcessInfo(pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ void WindowInfoK::updateProcessInfo()
|
|||||||
*/
|
*/
|
||||||
DockRect WindowInfoK::getGeometry()
|
DockRect WindowInfoK::getGeometry()
|
||||||
{
|
{
|
||||||
return geometry;
|
return m_geometry;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t WindowInfoK::getCreatedTime()
|
int64_t WindowInfoK::getCreatedTime()
|
||||||
@ -217,3 +217,8 @@ void WindowInfoK::killClient()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString WindowInfoK::uuid()
|
||||||
|
{
|
||||||
|
return QString(m_plasmaWindow->Uuid());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ public:
|
|||||||
virtual QString getWindowType() override;
|
virtual QString getWindowType() override;
|
||||||
virtual void update() override;
|
virtual void update() override;
|
||||||
virtual void killClient() override;
|
virtual void killClient() override;
|
||||||
|
virtual QString uuid() override;
|
||||||
|
|
||||||
QString getAppId();
|
QString getAppId();
|
||||||
void setAppId(QString _appId);
|
void setAppId(QString _appId);
|
||||||
@ -67,14 +68,14 @@ public:
|
|||||||
DockRect getGeometry();
|
DockRect getGeometry();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool updateCalled;
|
bool m_updateCalled;
|
||||||
QString appId;
|
QString m_appId;
|
||||||
uint32_t internalId;
|
uint32_t m_internalId;
|
||||||
bool demaningAttention;
|
bool m_demaningAttention;
|
||||||
bool closeable;
|
bool m_closeable;
|
||||||
bool minimized;
|
bool m_minimized;
|
||||||
PlasmaWindow *plasmaWindow;
|
PlasmaWindow *m_plasmaWindow;
|
||||||
DockRect geometry;
|
DockRect m_geometry;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // WINDOWINFOK_H
|
#endif // WINDOWINFOK_H
|
||||||
|
@ -189,6 +189,11 @@ void WindowInfoX::killClient()
|
|||||||
XCB->killClientChecked(xid);
|
XCB->killClientChecked(xid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString WindowInfoX::uuid()
|
||||||
|
{
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
QString WindowInfoX::getGtkAppId()
|
QString WindowInfoX::getGtkAppId()
|
||||||
{
|
{
|
||||||
return gtkAppId;
|
return gtkAppId;
|
||||||
|
@ -50,6 +50,7 @@ public:
|
|||||||
virtual bool allowClose() override;
|
virtual bool allowClose() override;
|
||||||
virtual void update() override;
|
virtual void update() override;
|
||||||
virtual void killClient() override;
|
virtual void killClient() override;
|
||||||
|
virtual QString uuid() override;
|
||||||
|
|
||||||
QString genInnerId(WindowInfoX *winInfo);
|
QString genInnerId(WindowInfoX *winInfo);
|
||||||
QString getGtkAppId();
|
QString getGtkAppId();
|
||||||
|
Loading…
Reference in New Issue
Block a user