diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-11-10 00:43:02 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-11-10 00:43:02 +0000 |
commit | a5332b59346f7cbf0fdbd148b54aa8a84aaf8190 (patch) | |
tree | e6d8d3589fcd01fbc3f1286185639163daa81424 /lxqt-base/lxqt-panel | |
parent | fceeaf01a28ee71065cf3798b70b77d3bc4ef199 (diff) |
gentoo resync : 10.11.2017
Diffstat (limited to 'lxqt-base/lxqt-panel')
-rw-r--r-- | lxqt-base/lxqt-panel/Manifest | 4 | ||||
-rw-r--r-- | lxqt-base/lxqt-panel/files/lxqt-panel-0.10.0-autohide.patch | 625 | ||||
-rw-r--r-- | lxqt-base/lxqt-panel/lxqt-panel-0.10.0-r1.ebuild | 7 |
3 files changed, 6 insertions, 630 deletions
diff --git a/lxqt-base/lxqt-panel/Manifest b/lxqt-base/lxqt-panel/Manifest index 0f7d071c0c2b..68ce572ab4f4 100644 --- a/lxqt-base/lxqt-panel/Manifest +++ b/lxqt-base/lxqt-panel/Manifest @@ -1,7 +1,7 @@ -AUX lxqt-panel-0.10.0-autohide.patch 20712 SHA256 7522427777f5cf79bb86394b91fed83e21cf345296a4758580c5eb8a86fc1ef8 SHA512 f390eaa22bf7c6c8f22546405598e25934c836b2ae4c8ad66f7deedf7cc7b92b6a7f2cfbfb740665dce870335f5f65b5be78e79119d33359a3c837048de631e5 WHIRLPOOL 221fe1d101e27a568350126ce8ddbe24e12f4d20753110bea0f8e43aaf04fc58b06c067d046ac19205869b6423d3af31900c9e9f2a5eb5bee75dce68d005b26e +DIST lxqt-panel-0.10.0-autohide-patch.tar.bz2 5812 SHA256 e590c2ed4554c27e3fc640197cd48ccce1dfba75139669eb2e1cae71d6f5c82b SHA512 04b2dcfa107e6cedd8347b399e254c193f2f245ce796c6f2b26f3b47a7969da5d673d30f2dd08ad66a9815394e4a8baf72191c14ec58652a2f71005240b3844d WHIRLPOOL c256b404c9daaf5b8d59f7fc88760180fe1643801e92c30fd25c3514083fc531d27ee29ffe3dd8476dae7df524566b5e9430ece9f71c2607a47d976d89658351 DIST lxqt-panel-0.10.0.tar.xz 329984 SHA256 df83db7789daecd358f074db2100d7b251c00e48aa3aa62957d5a657a4309d5e SHA512 59a25593beeabbd02a451e00db479617612d63ba5579560ab4b1c60d6ad1878728cc079a848b9437968c7246f257b53c775de2cb9e87f3e153049e6dbeee2ab4 WHIRLPOOL 6d49c0d78f66ff4d6a0fe026915e72bf6ca9c5b73f198866402c6e82ffd10b53a22f9ef1a583d05ae47918d90ccc08b1230582ccd86948d77079e2b2fdf3af6b DIST lxqt-panel-0.11.0.tar.xz 262964 SHA256 18415624d862b9b269fd1f74b2b6a51776852babd057e701e5d5b48ce46e777c SHA512 875ec28868bb68dff8c4e3be0adb5e5c88213f9ebdeb83eb0df9d5c31a7b4cb70a4d9b347f1ed9526a1eef7adb07f92c36263e12a6455291ec7022901abd100c WHIRLPOOL 9a9f6ff92afbf598d6a1f29d083e3fc85f3282f644508d1bc03683eb9bbe06048d65688e016bb17e7553aba23b10de251949000e2da65c3b5e547e9f273e7cd1 -EBUILD lxqt-panel-0.10.0-r1.ebuild 2301 SHA256 ffb704c460606b376cc85fa1b350928feb933a34d8def1f883d44e1d2b86e72d SHA512 6290426f7b56057c8bec24077031aca0d71c0f9fa19a8b583145a4a03edc8dbeed52cafb25a223a8aca3ade3c86625b196254c6909da7854879b26359f5c6b7d WHIRLPOOL 4ec7a7c919800312e8b65e1725c883ccb4645df7b64bb2978212cc58049ddf45a607aceb9a55a893328032e68cd5200cad4882f72f9b03d09245ad62c93e1b7d +EBUILD lxqt-panel-0.10.0-r1.ebuild 2385 SHA256 c19b261a6b814a683dc654423eff388e0292618a55bd682e51cf039bcc7ea1a0 SHA512 c7f021fa8ade6943c386a625a4e3d859b6cb67951ce6ac70c4aed2581036e53600fff5709898b76cb2aef8fe71de9e23a3acfe25b09b8d7586e178c73bc1dd2e WHIRLPOOL 0f8f7da40b62b58f1dc6a724506f6afca16b0d8c1fd3b0b9ece61dd147cb420ddce13d600ae7551f911ec37af00cc116d499233cbbadd0b2ec07c247a95ace68 EBUILD lxqt-panel-0.11.0.ebuild 2265 SHA256 5491a394f92ffc1a6b11c294a3d25813b3e18cb82fa10d62adbf42a1a6f8287c SHA512 70aae2ead76739fe39b6fece25fea740ddc2fe34b1bad96c1e903552495b95fda73a9c7a0f7ed44cfdf60ba176d75e831b5621fcfcfa2f34898231c21e12a0a6 WHIRLPOOL 58dd5876b8b7a82cb15f8dc70d350a1fef4d5c4e9f32aa9a6735210601b19115322eb580af57f99aa86c0da503362240939b1a56c13cda77b759dee1feba40c4 MISC ChangeLog 5038 SHA256 1c474231fdfe3a8e336f4e6f9ff8b4cceb36fe104b8aad2a769d61dc65c2700a SHA512 bf11ac6f2519720a951b006d70877f8c03182111ef34908398b4b1d6be0ea8e064c53cd018d869efa04b2f69594f38ef4f9f8b16b8ae5ab65a57c18683d04797 WHIRLPOOL df82c32a3e5bdcdebbd9f0e709316168e16cb5cdae3ba7b4872acf67a11ce23a98019e4379c62d1b9e7d88cf89131826fb280403df4c109d179a9a502e3f98b9 MISC ChangeLog-2015 2170 SHA256 b278c9ce06bf205dbdbc1c9933d0c300c79226d52dffe3ac36db846b5a9a9b7d SHA512 17809f1377f75860a266879ff254d52026c6b0258a4bc23f56efaf174185ff44ef3b57ee70683da084e10c605a53ce7d18a756e02f9924382abd0ac2320f978c WHIRLPOOL 78ec1bb930ff8eec6945ea8a705785a723fd56d328dfa957309a172f1a2155d26d9bc366be825fd1829a8cd2fe06a0b6376609d1945062e2c866d5e985c3ec02 diff --git a/lxqt-base/lxqt-panel/files/lxqt-panel-0.10.0-autohide.patch b/lxqt-base/lxqt-panel/files/lxqt-panel-0.10.0-autohide.patch deleted file mode 100644 index 5f2bbdae6f23..000000000000 --- a/lxqt-base/lxqt-panel/files/lxqt-panel-0.10.0-autohide.patch +++ /dev/null @@ -1,625 +0,0 @@ -Patch for autohide issue https://github.com/lxde/lxqt/issues/871 -taken from https://github.com/lxde/lxqt-panel/pull/275 - -diff --git panel/CMakeLists.txt panel/CMakeLists.txt -index 4e23b53..a7f8176 100644 ---- panel/CMakeLists.txt -+++ panel/CMakeLists.txt -@@ -2,6 +2,7 @@ set(PROJECT lxqt-panel) - - set(PRIV_HEADERS - panelpluginsmodel.h -+ windownotifier.h - lxqtpanel.h - lxqtpanelapplication.h - lxqtpanellayout.h -@@ -26,6 +27,7 @@ set(PUB_HEADERS - set(SOURCES - main.cpp - panelpluginsmodel.cpp -+ windownotifier.cpp - lxqtpanel.cpp - lxqtpanelapplication.cpp - lxqtpanellayout.cpp -diff --git panel/ilxqtpanel.h panel/ilxqtpanel.h -index e7b2844..71e4990 100644 ---- panel/ilxqtpanel.h -+++ panel/ilxqtpanel.h -@@ -32,6 +32,7 @@ - #include "lxqtpanelglobals.h" - - class ILXQtPanelPlugin; -+class QWidget; - - /** - **/ -@@ -74,6 +75,17 @@ public: - **/ - virtual QRect calculatePopupWindowPos(const QPoint &absolutePos, const QSize &windowSize) const = 0; - virtual QRect calculatePopupWindowPos(const ILXQtPanelPlugin *plugin, const QSize &windowSize) const = 0; -+ -+ /*! -+ * \brief By calling this function plugin (or any other object) notifies the panel -+ * about showing a (standalone) window/menu -> panel needs this to avoid "hiding" in case any -+ * standalone window is shown. The widget must be shown later than this notification call because -+ * panel need to observe it's show/hide/close events. -+ * -+ * \param w the shown window -+ * -+ */ -+ virtual void willShowWindow(QWidget * w) = 0; - }; - - #endif // ILXQTPANEL_H -diff --git panel/ilxqtpanelplugin.h panel/ilxqtpanelplugin.h -index 1503923..3a09def 100644 ---- panel/ilxqtpanelplugin.h -+++ panel/ilxqtpanelplugin.h -@@ -186,6 +186,16 @@ public: - return mPanel->calculatePopupWindowPos(this, windowSize); - } - -+ /*! -+ * \brief By calling this function plugin notifies the panel about showing a (standalone) window/menu. -+ * -+ * \param w the shown window -+ * -+ */ -+ inline void willShowWindow(QWidget * w) -+ { -+ mPanel->willShowWindow(w); -+ } - - virtual bool isSeparate() const { return false; } - virtual bool isExpandable() const { return false; } -diff --git panel/lxqtpanel.cpp panel/lxqtpanel.cpp -index 5159c15..d6b70ca 100644 ---- panel/lxqtpanel.cpp -+++ panel/lxqtpanel.cpp -@@ -35,6 +35,7 @@ - #include "popupmenu.h" - #include "plugin.h" - #include "panelpluginsmodel.h" -+#include "windownotifier.h" - #include <LXQt/PluginInfo> - - #include <QScreen> -@@ -116,6 +117,7 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg - mSettings(settings), - mConfigGroup(configGroup), - mPlugins{nullptr}, -+ mStandaloneWindows{new WindowNotifier}, - mPanelSize(0), - mIconSize(0), - mLineCount(0), -@@ -175,6 +177,9 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg - connect(LXQt::Settings::globalSettings(), SIGNAL(settingsChanged()), this, SLOT(update())); - connect(lxqtApp, SIGNAL(themeChanged()), this, SLOT(realign())); - -+ connect(mStandaloneWindows.data(), &WindowNotifier::firstShown, this, &LXQtPanel::showPanel); -+ connect(mStandaloneWindows.data(), &WindowNotifier::lastHidden, this, &LXQtPanel::hidePanel); -+ - readSettings(); - // the old position might be on a visible screen - ensureVisible(); -@@ -589,6 +594,7 @@ void LXQtPanel::showConfigDialog() - mConfigDialog = new ConfigPanelDialog(this, nullptr /*make it top level window*/); - - mConfigDialog->showConfigPanelPage(); -+ mStandaloneWindows->observeWindow(mConfigDialog.data()); - mConfigDialog->show(); - mConfigDialog->raise(); - mConfigDialog->activateWindow(); -@@ -608,6 +614,7 @@ void LXQtPanel::showAddPluginDialog() - mConfigDialog = new ConfigPanelDialog(this, nullptr /*make it top level window*/); - - mConfigDialog->showConfigPluginsPage(); -+ mStandaloneWindows->observeWindow(mConfigDialog.data()); - mConfigDialog->show(); - mConfigDialog->raise(); - mConfigDialog->activateWindow(); -@@ -967,6 +974,7 @@ void LXQtPanel::showPopupMenu(Plugin *plugin) - * of QDesktopWidget::availableGeometry) - */ - menu->setGeometry(calculatePopupWindowPos(QCursor::pos(), menu->sizeHint())); -+ willShowWindow(menu); - menu->show(); - } - -@@ -1043,6 +1051,14 @@ QRect LXQtPanel::calculatePopupWindowPos(const ILXQtPanelPlugin *plugin, const Q - /************************************************ - - ************************************************/ -+void LXQtPanel::willShowWindow(QWidget * w) -+{ -+ mStandaloneWindows->observeWindow(w); -+} -+ -+/************************************************ -+ -+ ************************************************/ - QString LXQtPanel::qssPosition() const - { - return positionToStr(position()); -@@ -1107,20 +1123,17 @@ void LXQtPanel::showPanel() - - void LXQtPanel::hidePanel() - { -- if (mHidable && !mHidden) -+ if (mHidable && !mHidden -+ && !geometry().contains(QCursor::pos()) -+ && !mStandaloneWindows->isAnyWindowShown() -+ ) - mHideTimer.start(); - } - - void LXQtPanel::hidePanelWork() - { -- if (mHidable && !mHidden && !geometry().contains(QCursor::pos())) -- { -- mHidden = true; -- setPanelGeometry(); -- } else -- { -- mHideTimer.start(); -- } -+ mHidden = true; -+ setPanelGeometry(); - } - - void LXQtPanel::setHidable(bool hidable, bool save) -@@ -1128,7 +1141,7 @@ void LXQtPanel::setHidable(bool hidable, bool save) - if (mHidable == hidable) - return; - -- mHidable = mHidden = hidable; -+ mHidable = hidable; - - if (save) - saveSettings(true); -diff --git panel/lxqtpanel.h panel/lxqtpanel.h -index 8ff4b8c..990063f 100644 ---- panel/lxqtpanel.h -+++ panel/lxqtpanel.h -@@ -48,6 +48,7 @@ class PluginInfo; - class LXQtPanelLayout; - class ConfigPanelDialog; - class PanelPluginsModel; -+class WindowNotifier; - - /*! \brief The LXQtPanel class provides a single lxqt-panel. - */ -@@ -80,11 +81,12 @@ public: - void showPopupMenu(Plugin *plugin = 0); - - // ILXQtPanel ......................... -- ILXQtPanel::Position position() const { return mPosition; } -- QRect globalGometry() const; -+ ILXQtPanel::Position position() const override { return mPosition; } -+ QRect globalGometry() const override; - Plugin *findPlugin(const ILXQtPanelPlugin *iPlugin) const; -- QRect calculatePopupWindowPos(QPoint const & absolutePos, QSize const & windowSize) const; -- QRect calculatePopupWindowPos(const ILXQtPanelPlugin *plugin, const QSize &windowSize) const; -+ QRect calculatePopupWindowPos(QPoint const & absolutePos, QSize const & windowSize) const override; -+ QRect calculatePopupWindowPos(const ILXQtPanelPlugin *plugin, const QSize &windowSize) const override; -+ void willShowWindow(QWidget * w) override; - - // For QSS properties .................. - QString qssPosition() const; -@@ -95,8 +97,8 @@ public: - - // Settings - int panelSize() const { return mPanelSize; } -- int iconSize() const { return mIconSize; } -- int lineCount() const { return mLineCount; } -+ int iconSize() const override { return mIconSize; } -+ int lineCount() const override { return mLineCount; } - int length() const { return mLength; } - bool lengthInPercents() const { return mLengthInPercents; } - LXQtPanel::Alignment alignment() const { return mAlignment; } -@@ -138,8 +140,8 @@ signals: - void pluginRemoved(); - - protected: -- bool event(QEvent *event); -- void showEvent(QShowEvent *event); -+ bool event(QEvent *event) override; -+ void showEvent(QShowEvent *event) override; - - public slots: - void showConfigDialog(); -@@ -156,6 +158,7 @@ private: - QFrame *LXQtPanelWidget; - QString mConfigGroup; - QScopedPointer<PanelPluginsModel> mPlugins; -+ QScopedPointer<WindowNotifier> mStandaloneWindows; //!< object for storing info if some standalone window is shown (for preventing hide) - - int findAvailableScreen(LXQtPanel::Position position); - void updateWmStrut(); -diff --git panel/plugin.cpp panel/plugin.cpp -index a4acc78..be23a8e 100644 ---- panel/plugin.cpp -+++ panel/plugin.cpp -@@ -477,6 +477,7 @@ void Plugin::showConfigureDialog() - if (!dialog) - return; - -+ mPanel->willShowWindow(dialog); - dialog->show(); - dialog->raise(); - dialog->activateWindow(); -diff --git panel/windownotifier.cpp panel/windownotifier.cpp -new file mode 100644 -index 0000000..0b41057 ---- /dev/null -+++ panel/windownotifier.cpp -@@ -0,0 +1,65 @@ -+/* BEGIN_COMMON_COPYRIGHT_HEADER -+ * (c)LGPL2+ -+ * -+ * LXQt - a lightweight, Qt based, desktop toolset -+ * http://lxqt.org -+ * -+ * Copyright: 2015 LXQt team -+ * Authors: -+ * Palo Kisa <palo.kisa@gmail.com> -+ * -+ * This program or library is free software; you can redistribute it -+ * and/or modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ -+ * You should have received a copy of the GNU Lesser General -+ * Public License along with this library; if not, write to the -+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -+ * Boston, MA 02110-1301 USA -+ * -+ * END_COMMON_COPYRIGHT_HEADER */ -+ -+#include "windownotifier.h" -+#include <QWidget> -+#include <QEvent> -+ -+void WindowNotifier::observeWindow(QWidget * w) -+{ -+ //installing the same filter object multiple times doesn't harm -+ w->installEventFilter(this); -+} -+ -+ -+bool WindowNotifier::eventFilter(QObject * watched, QEvent * event) -+{ -+ QWidget * widget = qobject_cast<QWidget *>(watched); //we're observing only QWidgetw -+ auto it = std::lower_bound(mShownWindows.begin(), mShownWindows.end(), widget); -+ switch (event->type()) -+ { -+ case QEvent::Close: -+ watched->removeEventFilter(this); -+ //no break -+ case QEvent::Hide: -+ Q_ASSERT(mShownWindows.end() != it); -+ mShownWindows.erase(it); -+ if (mShownWindows.isEmpty()) -+ emit lastHidden(); -+ break; -+ case QEvent::Show: -+ { -+ const bool first_shown = mShownWindows.isEmpty(); -+ mShownWindows.insert(it, widget); //we keep the mShownWindows sorted -+ if (first_shown) -+ emit firstShown(); -+ } -+ default: -+ break; -+ } -+ return false; -+} -diff --git panel/windownotifier.h panel/windownotifier.h -new file mode 100644 -index 0000000..53f2f3f ---- /dev/null -+++ panel/windownotifier.h -@@ -0,0 +1,53 @@ -+/* BEGIN_COMMON_COPYRIGHT_HEADER -+ * (c)LGPL2+ -+ * -+ * LXQt - a lightweight, Qt based, desktop toolset -+ * http://lxqt.org -+ * -+ * Copyright: 2015 LXQt team -+ * Authors: -+ * Palo Kisa <palo.kisa@gmail.com> -+ * -+ * This program or library is free software; you can redistribute it -+ * and/or modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ -+ * You should have received a copy of the GNU Lesser General -+ * Public License along with this library; if not, write to the -+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -+ * Boston, MA 02110-1301 USA -+ * -+ * END_COMMON_COPYRIGHT_HEADER */ -+ -+#if !defined(WINDOWNOTIFIER_H) -+#define WINDOWNOTIFIER_H -+ -+#include <QObject> -+ -+class QWidget; -+ -+class WindowNotifier : public QObject -+{ -+ Q_OBJECT -+public: -+ using QObject::QObject; -+ -+ void observeWindow(QWidget * w); -+ inline bool isAnyWindowShown() const { return !mShownWindows.isEmpty(); } -+ -+ virtual bool eventFilter(QObject * watched, QEvent * event) override; -+signals: -+ void lastHidden(); -+ void firstShown(); -+ -+private: -+ QList<QWidget *> mShownWindows; //!< known shown windows (sorted) -+}; -+ -+#endif -diff --git plugin-clock/lxqtclock.cpp plugin-clock/lxqtclock.cpp -index 79c2c17..d4603de 100644 ---- plugin-clock/lxqtclock.cpp -+++ plugin-clock/lxqtclock.cpp -@@ -286,6 +286,7 @@ void LXQtClock::activated(ActivationReason reason) - { - QRect pos = calculatePopupWindowPos(mCalendarPopup->size()); - mCalendarPopup->move(pos.topLeft()); -+ willShowWindow(mCalendarPopup); - mCalendarPopup->show(); - } - else -diff --git plugin-directorymenu/directorymenu.cpp plugin-directorymenu/directorymenu.cpp -index 8c5ec28..e332e05 100644 ---- plugin-directorymenu/directorymenu.cpp -+++ plugin-directorymenu/directorymenu.cpp -@@ -58,11 +58,11 @@ DirectoryMenu::DirectoryMenu(const ILXQtPanelPluginStartupInfo &startupInfo) : - - DirectoryMenu::~DirectoryMenu() - { -- if(mMenu) -- { -- delete mMenu; -- mMenu = 0; -- } -+ if(mMenu) -+ { -+ delete mMenu; -+ mMenu = 0; -+ } - } - - void DirectoryMenu::showMenu() -@@ -102,67 +102,67 @@ void DirectoryMenu::showMenu() - break; - } - -+ willShowWindow(mMenu); - // Just using Qt`s activateWindow() won't work on some WMs like Kwin. - // Solution is to execute menu 1ms later using timer -- mButton.activateWindow(); -- mMenu->exec(QPoint(x, y)); -+ mMenu->popup(calculatePopupWindowPos(mMenu->sizeHint()).topLeft()); - } - - void DirectoryMenu::buildMenu(const QString& path) - { -- if(mMenu) -- { -- delete mMenu; -- mMenu = 0; -- } -+ if(mMenu) -+ { -+ delete mMenu; -+ mMenu = 0; -+ } - -- mPathStrings.clear(); -+ mPathStrings.clear(); - -- mMenu = new QMenu(); -+ mMenu = new QMenu(); - -- addActions(mMenu, path); -+ addActions(mMenu, path); - } - - void DirectoryMenu::openDirectory(const QString& path) - { -- QDesktopServices::openUrl(QUrl("file://" + QDir::toNativeSeparators(path))); -+ QDesktopServices::openUrl(QUrl("file://" + QDir::toNativeSeparators(path))); - } - - void DirectoryMenu::addMenu(QString path) - { -- QSignalMapper* sender = (QSignalMapper* )QObject::sender(); -- QMenu* parentMenu = (QMenu*) sender->mapping(path); -+ QSignalMapper* sender = (QSignalMapper* )QObject::sender(); -+ QMenu* parentMenu = (QMenu*) sender->mapping(path); - -- if(parentMenu->isEmpty()) -- { -- addActions(parentMenu, path); -- } -+ if(parentMenu->isEmpty()) -+ { -+ addActions(parentMenu, path); -+ } - } - - void DirectoryMenu::addActions(QMenu* menu, const QString& path) - { -- mPathStrings.push_back(path); -+ mPathStrings.push_back(path); - -- QAction* openDirectoryAction = menu->addAction(XdgIcon::fromTheme("folder"), tr("Open")); -- connect(openDirectoryAction, SIGNAL(triggered()), mOpenDirectorySignalMapper, SLOT(map())); -- mOpenDirectorySignalMapper->setMapping(openDirectoryAction, mPathStrings.back()); -+ QAction* openDirectoryAction = menu->addAction(XdgIcon::fromTheme("folder"), tr("Open")); -+ connect(openDirectoryAction, SIGNAL(triggered()), mOpenDirectorySignalMapper, SLOT(map())); -+ mOpenDirectorySignalMapper->setMapping(openDirectoryAction, mPathStrings.back()); - -- menu->addSeparator(); -+ menu->addSeparator(); - -- QDir dir(path); -- QFileInfoList list = dir.entryInfoList(); -+ QDir dir(path); -+ QFileInfoList list = dir.entryInfoList(); - -- foreach (const QFileInfo& entry, list) -+ foreach (const QFileInfo& entry, list) - { -- if(entry.isDir() && !entry.isHidden()) -- { -- mPathStrings.push_back(entry.fileName()); -+ if(entry.isDir() && !entry.isHidden()) -+ { -+ mPathStrings.push_back(entry.fileName()); - -- QMenu* subMenu = menu->addMenu(XdgIcon::fromTheme("folder"), mPathStrings.back()); -+ QMenu* subMenu = menu->addMenu(XdgIcon::fromTheme("folder"), mPathStrings.back()); - -- connect(subMenu, SIGNAL(aboutToShow()), mMenuSignalMapper, SLOT(map())); -- mMenuSignalMapper->setMapping(subMenu, entry.absoluteFilePath()); -- } -+ connect(subMenu, SIGNAL(aboutToShow()), mMenuSignalMapper, SLOT(map())); -+ mMenuSignalMapper->setMapping(subMenu, entry.absoluteFilePath()); -+ } - } - } - -diff --git plugin-dom/domplugin.cpp plugin-dom/domplugin.cpp -index ffd05c6..0988a2b 100644 ---- plugin-dom/domplugin.cpp -+++ plugin-dom/domplugin.cpp -@@ -51,6 +51,7 @@ void DomPlugin::showDialog() - dialog->setAttribute(Qt::WA_DeleteOnClose); - } - -+ willShowWindow(dialog); - dialog->show(); - dialog->activateWindow(); - } -diff --git plugin-mainmenu/lxqtmainmenu.cpp plugin-mainmenu/lxqtmainmenu.cpp -index 9673a4f..b9ff6e4 100644 ---- plugin-mainmenu/lxqtmainmenu.cpp -+++ plugin-mainmenu/lxqtmainmenu.cpp -@@ -130,6 +130,7 @@ void LXQtMainMenu::showMenu() - if (!mMenu) - return; - -+ willShowWindow(mMenu); - // Just using Qt`s activateWindow() won't work on some WMs like Kwin. - // Solution is to execute menu 1ms later using timer - mMenu->popup(calculatePopupWindowPos(mMenu->sizeHint()).topLeft()); -@@ -227,8 +228,6 @@ void LXQtMainMenu::buildMenu() - menu->installEventFilter(this); - connect(menu, &QMenu::aboutToHide, &mHideTimer, static_cast<void (QTimer::*)()>(&QTimer::start)); - connect(menu, &QMenu::aboutToShow, &mHideTimer, &QTimer::stop); -- // panel notification (needed in case of auto-hide) -- connect(menu, &QMenu::aboutToHide, dynamic_cast<LXQtPanel *>(panel()), &LXQtPanel::hidePanel); - - QMenu *oldMenu = mMenu; - mMenu = menu; -diff --git plugin-mount/popup.cpp plugin-mount/popup.cpp -index 1c3e7c1..7993681 100644 ---- plugin-mount/popup.cpp -+++ plugin-mount/popup.cpp -@@ -90,7 +90,12 @@ Popup::Popup(ILXQtPanelPlugin * plugin, QWidget* parent): - - void Popup::showHide() - { -- setVisible(isHidden()); -+ if (isHidden()) -+ { -+ mPlugin->willShowWindow(this); -+ show(); -+ } else -+ close(); - } - - void Popup::onDeviceAdded(QString const & udi) -diff --git plugin-statusnotifier/statusnotifierbutton.cpp plugin-statusnotifier/statusnotifierbutton.cpp -index fb124c6..71cf78f 100644 ---- plugin-statusnotifier/statusnotifierbutton.cpp -+++ plugin-statusnotifier/statusnotifierbutton.cpp -@@ -249,8 +249,10 @@ void StatusNotifierButton::mouseReleaseEvent(QMouseEvent *event) - else if (Qt::RightButton == event->button()) - { - if (mMenu) -- mMenu->popup(QCursor::pos()); -- else -+ { -+ mPlugin->willShowWindow(mMenu); -+ mMenu->popup(mPlugin->calculatePopupWindowPos(mMenu->sizeHint()).topLeft()); -+ } else - interface->ContextMenu(QCursor::pos().x(), QCursor::pos().y()); - } - -diff --git plugin-taskbar/lxqttaskgroup.cpp plugin-taskbar/lxqttaskgroup.cpp -index 6828216..79e27f5 100644 ---- plugin-taskbar/lxqttaskgroup.cpp -+++ plugin-taskbar/lxqttaskgroup.cpp -@@ -84,6 +84,7 @@ void LXQtTaskGroup::contextMenuEvent(QContextMenuEvent *event) - mPreventPopup = false; - }); - menu->setGeometry(mPlugin->panel()->calculatePopupWindowPos(mapToGlobal(event->pos()), menu->sizeHint())); -+ mPlugin->willShowWindow(menu); - menu->show(); - } - -@@ -418,6 +419,7 @@ void LXQtTaskGroup::setPopupVisible(bool visible, bool fast) - recalculateFramePosition(); - } - -+ mPlugin->willShowWindow(mPopup); - mPopup->show(); - emit popupShown(this); - } -diff --git plugin-volume/volumebutton.cpp plugin-volume/volumebutton.cpp -index a738a1a..98b3f10 100644 ---- plugin-volume/volumebutton.cpp -+++ plugin-volume/volumebutton.cpp -@@ -133,6 +133,7 @@ void VolumeButton::showVolumeSlider() - m_volumePopup->updateGeometry(); - m_volumePopup->adjustSize(); - QRect pos = mPlugin->calculatePopupWindowPos(m_volumePopup->size()); -+ mPlugin->willShowWindow(m_volumePopup); - m_volumePopup->openAt(pos.topLeft(), Qt::TopLeftCorner); - m_volumePopup->activateWindow(); - } -diff --git plugin-worldclock/lxqtworldclock.cpp plugin-worldclock/lxqtworldclock.cpp -index 7386049..8fa795d 100644 ---- plugin-worldclock/lxqtworldclock.cpp -+++ plugin-worldclock/lxqtworldclock.cpp -@@ -356,6 +356,7 @@ void LXQtWorldClock::activated(ActivationReason reason) - mPopup->adjustSize(); - mPopup->setGeometry(calculatePopupWindowPos(mPopup->size())); - -+ willShowWindow(mPopup); - mPopup->show(); - } - else diff --git a/lxqt-base/lxqt-panel/lxqt-panel-0.10.0-r1.ebuild b/lxqt-base/lxqt-panel/lxqt-panel-0.10.0-r1.ebuild index b342e0bc9d24..3ae6d34161e1 100644 --- a/lxqt-base/lxqt-panel/lxqt-panel-0.10.0-r1.ebuild +++ b/lxqt-base/lxqt-panel/lxqt-panel-0.10.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -11,7 +11,8 @@ if [[ ${PV} = *9999* ]]; then inherit git-r3 EGIT_REPO_URI="git://git.lxde.org/git/lxde/${PN}.git" else - SRC_URI="https://downloads.lxqt.org/lxqt/${PV}/${P}.tar.xz" + SRC_URI="https://downloads.lxqt.org/lxqt/${PV}/${P}.tar.xz + https://dev.gentoo.org/~chiitoo/distfiles/lxqt-panel-0.10.0-autohide-patch.tar.bz2" KEYWORDS="~amd64 ~arm ~arm64 ~x86" fi @@ -55,7 +56,7 @@ RDEPEND="${CDEPEND} dev-qt/qtsvg:5 >=lxde-base/lxmenu-data-0.1.2" -PATCHES=( "${FILESDIR}/${P}-autohide.patch" ) +PATCHES=( "${WORKDIR}/${P}-autohide.patch" ) src_configure() { local mycmakeargs i y |