pvanek / qlipper

cross-platform clipboard history applet
GNU General Public License v2.0
96 stars 23 forks source link

DropDown menu is a window itself #36

Open Arnaudv6 opened 8 years ago

Arnaudv6 commented 8 years ago

...it's in the title, when I left-click on tray icon, menu shows, and a new button appears for its window in my taskbar (fbpanel).

This is not the expected behavior I expect, and proper window properties should be set. With regards Arnaudv6

palinek commented 8 years ago

Do we want to make it a pure menu?

With something like this:

diff --git a/src/qlippersystray.cpp b/src/qlippersystray.cpp
index 52ea360..430911c 100644
--- a/src/qlippersystray.cpp
+++ b/src/qlippersystray.cpp
@@ -51,14 +51,6 @@ QlipperSystray::QlipperSystray(QObject *parent)
     m_shortcutMenu->setModel(m_model);
     m_shortcutMenu->setWindowTitle(tr("Qlipper - a clipboard history applet"));

-    // Windows API does not handle well some combinations of flags in custom widgets.
-#ifndef Q_OS_WIN32
-    // This flag is mandatory to get focus when user activates global_key.
-    // OK, window gets a decoration but it works. Menu is displayed without the
-    // the decoration if is the systray icon clicked.
-    m_shortcutMenu->setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint);
-#endif
-
     connect(m_shortcutMenu, SIGNAL(triggered(QModelIndex)), m_model, SLOT(indexTriggered(QModelIndex)));
     connect(m_shortcutMenu, SIGNAL(triggered(QModelIndex)), m_shortcutMenu, SLOT(close()));

... it is done. It works on linux. This change doesn't change anything for windows (the #ifdef). But I can't test with MacOS.

Arnaudv6 commented 8 years ago

Fixes it for me: thanks palinek ! (using linux here), can't help with OSX or Windows.

Arnaudv6 commented 7 years ago

Not closing yet for it is not mainlined...

palinek commented 7 years ago

I'm not going to make this change into master, because setting the flags seems to be intentional there and I don't know the background...

@pvanek ?

martinrotter commented 7 years ago

@Arnaudv6 What exact Qt version do you use?

Arnaudv6 commented 7 years ago

@martinrotter 5.7.0 ...why?