Hello community,
here is the log from the commit of package applet-window-appmenu for openSUSE:Factory checked in at 2019-07-13 13:50:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/applet-window-appmenu (Old)
and /work/SRC/openSUSE:Factory/.applet-window-appmenu.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "applet-window-appmenu"
Sat Jul 13 13:50:34 2019 rev:3 rq:714930 version:0.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/applet-window-appmenu/applet-window-appmenu.changes 2019-07-01 10:44:19.205472094 +0200
+++ /work/SRC/openSUSE:Factory/.applet-window-appmenu.new.4615/applet-window-appmenu.changes 2019-07-13 14:01:03.142885989 +0200
@@ -1,0 +2,19 @@
+Fri Jul 12 21:39:44 UTC 2019 - Cor Blom
+
+- Update to version 0.5.0:
+ * provide a relevant background for window buttons in configuration
+ window to fix contrast issues
+ * support new Latte v0.9 Communicator API
+ * support new Latte v0.9 Windows Tracking interface when in Latte
+ dock/panel
+
+-------------------------------------------------------------------
+Fri Jul 12 21:37:48 UTC 2019 - Cor Blom
+
+- Update to version 0.5.0:
+ * show app menus also for inactive windows in multi-screen
+ environment through Latte WindowsTracking v0.9 interface
+ * improve appearance when in Latte edit mode
+ * use new Latte Communicator API for v0.9
+
+-------------------------------------------------------------------
Old:
----
applet-window-appmenu-0.4.2.tar.gz
New:
----
applet-window-appmenu-0.5.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ applet-window-appmenu.spec ++++++
--- /var/tmp/diff_new_pack.JTNUZC/_old 2019-07-13 14:01:03.562885861 +0200
+++ /var/tmp/diff_new_pack.JTNUZC/_new 2019-07-13 14:01:03.566885859 +0200
@@ -20,7 +20,7 @@
%define qt5_version 5.9
Name: applet-window-appmenu
-Version: 0.4.2
+Version: 0.5.0
Release: 0
Summary: Plasma 5 applet to show the window appmenu
License: GPL-2.0-or-later
++++++ applet-window-appmenu-0.4.2.tar.gz -> applet-window-appmenu-0.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applet-window-appmenu-0.4.2/CHANGELOG.md new/applet-window-appmenu-0.5.0/CHANGELOG.md
--- old/applet-window-appmenu-0.4.2/CHANGELOG.md 2019-05-14 19:39:36.000000000 +0200
+++ new/applet-window-appmenu-0.5.0/CHANGELOG.md 2019-07-12 21:57:33.000000000 +0200
@@ -1,5 +1,11 @@
### CHANGELOG
+#### Version 0.5.0
+
+* show app menus also for inactive windows in multi-screen environment through Latte WindowsTracking v0.9 interface
+* improve appearance when in Latte edit mode
+* use new Latte Communicator API for v0.9
+
#### Version 0.4.2
* fix a serious crash for some systems when the user was clicking the menu items Plasma or Latte was crashing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applet-window-appmenu-0.4.2/CMakeLists.txt new/applet-window-appmenu-0.5.0/CMakeLists.txt
--- old/applet-window-appmenu-0.4.2/CMakeLists.txt 2019-05-14 19:39:36.000000000 +0200
+++ new/applet-window-appmenu-0.5.0/CMakeLists.txt 2019-07-12 21:57:33.000000000 +0200
@@ -3,7 +3,7 @@
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 14)
-set(VERSION 0.4.1)
+set(VERSION 0.5.0)
set(AUTHOR "Michail Vourlakos")
set(EMAIL "mvourlakos@gmail.com")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applet-window-appmenu-0.4.2/package/contents/ui/Broadcaster.qml new/applet-window-appmenu-0.5.0/package/contents/ui/Broadcaster.qml
--- old/applet-window-appmenu-0.4.2/package/contents/ui/Broadcaster.qml 2019-05-14 19:39:36.000000000 +0200
+++ new/applet-window-appmenu-0.5.0/package/contents/ui/Broadcaster.qml 2019-07-12 21:57:33.000000000 +0200
@@ -24,7 +24,7 @@
property bool hiddenFromBroadcast: false
- readonly property bool showWindowTitleEnabled: plasmoid.configuration.showWindowTitleOnMouseExit
+ readonly property bool showWindowTitleEnabled: plasmoid.configuration.showWindowTitleOnMouseExit && !inEditMode
readonly property bool menuIsPresent: appMenuModel.visible && appMenuModel.menuAvailable
readonly property bool isActive: plasmoid.configuration.windowTitleIsPresent && showWindowTitleEnabled
property bool windowTitleRequestsCooperation: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applet-window-appmenu-0.4.2/package/contents/ui/main.qml new/applet-window-appmenu-0.5.0/package/contents/ui/main.qml
--- old/applet-window-appmenu-0.4.2/package/contents/ui/main.qml 2019-05-14 19:39:36.000000000 +0200
+++ new/applet-window-appmenu-0.5.0/package/contents/ui/main.qml 2019-07-12 21:57:33.000000000 +0200
@@ -87,6 +87,7 @@
if (latteBridge) {
latteBridge.actions.setProperty(plasmoid.id, "latteSideColoringEnabled", false);
latteBridge.actions.setProperty(plasmoid.id, "activeIndicatorEnabled", false);
+ latteBridge.actions.setProperty(plasmoid.id, "windowsTrackingEnabled", true);
}
}
@@ -246,7 +247,11 @@
Repeater {
id: buttonRepeater
model: {
- if (appMenuModel.visible && appMenuModel.menuAvailable && !broadcaster.hiddenFromBroadcast && !inEditMode) {
+ if (appMenuModel.visible
+ && appMenuModel.menuAvailable
+ && !appMenuModel.ignoreWindow
+ && !broadcaster.hiddenFromBroadcast
+ && !(inEditMode && !appMenuModel.selectedTracker)) {
return appMenuModel;
} else if (inEditMode) {
return editModeModel;
@@ -300,13 +305,36 @@
AppMenuPrivate.AppMenuModel {
id: appMenuModel
- filterByActive: plasmoid.configuration.filterByActive
- filterChildren: plasmoid.configuration.filterChildrenWindows
- screenGeometry: plasmoid.configuration.filterByScreen ? plasmoid.screenGeometry : Qt.rect(-1, -1, 0, 0) //null geometry
+ filterByActive: plasmoid.configuration.filterByActive && !selectedTracker
+ filterChildren: plasmoid.configuration.filterChildrenWindows && !selectedTracker
+ screenGeometry: plasmoid.configuration.filterByScreen && !selectedTracker ? plasmoid.screenGeometry : Qt.rect(-1, -1, 0, 0) //null geometry
onRequestActivateIndex: plasmoid.nativeInterface.requestActivateIndex(index)
Component.onCompleted: {
plasmoid.nativeInterface.model = appMenuModel
}
+
+ winId: selectedTracker && selectedTracker.lastActiveWindow.isValid ? selectedTracker.lastActiveWindow.winId : -1
+
+ readonly property bool existsWindowActive: !selectedTracker
+ || (selectedTracker && selectedTracker.lastActiveWindow.isValid && !selectedTracker.lastActiveWindow.isMinimized)
+ readonly property bool ignoreWindow: selectedTracker
+ && (!selectedTracker.lastActiveWindow.isValid
+ || (plasmoid.configuration.filterByActive && !existsWindowActive))
+
+ // onWinIdChanged: console.log("In Latte with wid appmenu : "+winId);
+
+ readonly property QtObject windowsTracker:latteBridge
+ && latteBridge.windowsTracker
+ && latteBridge.windowsTracker.currentScreen.lastActiveWindow
+ && latteBridge.windowsTracker.allScreens.lastActiveWindow ? latteBridge.windowsTracker : null
+
+ readonly property QtObject selectedTracker: {
+ if (windowsTracker) {
+ return plasmoid.configuration.filterByScreen ? windowsTracker.currentScreen : windowsTracker.allScreens;
+ }
+
+ return null;
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applet-window-appmenu-0.4.2/package/metadata.desktop new/applet-window-appmenu-0.5.0/package/metadata.desktop
--- old/applet-window-appmenu-0.4.2/package/metadata.desktop 2019-05-14 19:39:36.000000000 +0200
+++ new/applet-window-appmenu-0.5.0/package/metadata.desktop 2019-07-12 21:57:33.000000000 +0200
@@ -7,7 +7,7 @@
X-KDE-PluginInfo-Email=mvourlakos@gmail.com
X-KDE-PluginInfo-License=GPL-2.0+
X-KDE-PluginInfo-Name=org.kde.windowappmenu
-X-KDE-PluginInfo-Version=0.4.2
+X-KDE-PluginInfo-Version=0.5.0
X-KDE-PluginInfo-Website=https://github.com/psifidotos/applet-window-appmenu
X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-API=declarativeappletscript
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applet-window-appmenu-0.4.2/plugin/appmenumodel.cpp new/applet-window-appmenu-0.5.0/plugin/appmenumodel.cpp
--- old/applet-window-appmenu-0.4.2/plugin/appmenumodel.cpp 2019-05-14 19:39:36.000000000 +0200
+++ new/applet-window-appmenu-0.5.0/plugin/appmenumodel.cpp 2019-07-12 21:57:33.000000000 +0200
@@ -26,8 +26,8 @@
#include
#if HAVE_X11
- #include <QX11Info>
- #include
+#include <QX11Info>
+#include
#endif
#include <QAction>
@@ -45,7 +45,7 @@
static const QByteArray s_x11AppMenuObjectPathPropertyName = QByteArrayLiteral("_KDE_NET_WM_APPMENU_OBJECT_PATH");
#if HAVE_X11
- static QHash s_atoms;
+static QHash s_atoms;
#endif
class KDBusMenuImporter : public DBusMenuImporter
@@ -72,6 +72,10 @@
return;
}
+ connect(this, &AppMenuModel::winIdChanged, this, [this] {
+ onActiveWindowChanged(m_winId.toUInt());
+ });
+
connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, this, &AppMenuModel::onActiveWindowChanged);
connect(KWindowSystem::self()
, static_cast(&KWindowSystem::windowChanged)
@@ -182,6 +186,21 @@
}
}
+QVariant AppMenuModel::winId() const
+{
+ return m_winId;
+}
+
+void AppMenuModel::setWinId(const QVariant &id)
+{
+ if (m_winId == id) {
+ return;
+ }
+
+ m_winId = id;
+ emit winIdChanged();
+}
+
int AppMenuModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
@@ -205,6 +224,11 @@
{
qApp->removeNativeEventFilter(this);
+ if (m_winId!=-1 && m_winId!=id) {
+ //! ignore any other window except the one preferred from plasmoid
+ return;
+ }
+
if (!id) {
setMenuAvailable(false);
emit modelNeedsUpdate();
@@ -272,8 +296,8 @@
KWindowInfo info(id, NET::WMState | NET::WMWindowType | NET::WMGeometry, NET::WM2TransientFor);
if (info.hasState(NET::SkipTaskbar) ||
- info.windowType(NET::UtilityMask) == NET::Utility ||
- info.windowType(NET::DesktopMask) == NET::Desktop) {
+ info.windowType(NET::UtilityMask) == NET::Utility ||
+ info.windowType(NET::DesktopMask) == NET::Desktop) {
//! hide when the windows or their transiet(s) do not have a menu
if (filterByActive()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/applet-window-appmenu-0.4.2/plugin/appmenumodel.h new/applet-window-appmenu-0.5.0/plugin/appmenumodel.h
--- old/applet-window-appmenu-0.4.2/plugin/appmenumodel.h 2019-05-14 19:39:36.000000000 +0200
+++ new/applet-window-appmenu-0.5.0/plugin/appmenumodel.h 2019-07-12 21:57:33.000000000 +0200
@@ -44,7 +44,10 @@
Q_PROPERTY(bool filterByActive READ filterByActive WRITE setFilterByActive NOTIFY filterByActiveChanged)
Q_PROPERTY(bool filterChildren READ filterChildren WRITE setFilterChildren NOTIFY filterChildrenChanged)
+
Q_PROPERTY(QRect screenGeometry READ screenGeometry WRITE setScreenGeometry NOTIFY screenGeometryChanged)
+
+ Q_PROPERTY(QVariant winId READ winId WRITE setWinId NOTIFY winIdChanged)
public:
explicit AppMenuModel(QObject *parent = nullptr);
~AppMenuModel() override;
@@ -75,6 +78,9 @@
QRect screenGeometry() const;
void setScreenGeometry(QRect geometry);
+ QVariant winId() const;
+ void setWinId(const QVariant &id);
+
signals:
void requestActivateIndex(int index);
@@ -100,6 +106,7 @@
void filterChildrenChanged();
void visibleChanged();
void screenGeometryChanged();
+ void winIdChanged();
private:
bool m_filterByActive = false;
@@ -110,6 +117,8 @@
QRect m_screenGeometry;
+ QVariant m_winId{-1};
+
//! current active window used
WId m_currentWindowId = 0;
//! window that its menu initialization may be delayed