-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The widget is kept shown [regression] #41
Comments
I didn't notice that problem with openbox and plasma. Maybe it is the line which is setting the window flags explicitly which is now missing something: And be sure that the environment variable |
FWIW, I still got the issue with openbox.
Thanks for the hint! First I dump the original window flags with
After several trials and errors, I found that removing Qt::ToolTip fixes the issue. diff --git a/tray/gui/traymenu.cpp b/tray/gui/traymenu.cpp
index b4f6ca7..ddf99ca 100644
--- a/tray/gui/traymenu.cpp
+++ b/tray/gui/traymenu.cpp
@@ -24,7 +24,7 @@ TrayMenu::TrayMenu(TrayIcon *trayIcon, QWidget *parent)
menuLayout->addWidget(m_trayWidget = new TrayWidget(this));
setLayout(menuLayout);
setPlatformMenu(nullptr);
- setWindowFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::Popup);
+ setWindowFlags(Qt::FramelessWindowHint | Qt::Popup);
}
QSize TrayMenu::sizeHint() const
Yes I didnt use that. |
Ok, it also happens under openbox. I must have closed the menu by clicking on a blank space of the menu itself in all my tests (which is the 3rd option to close the menu). (I have written that comment before reading your previous comment.) |
Yes, that works - I tested it now. If you like, make a PR. If that makes things worse on Wayland again then I don't care and add a Wayland specific path later myself. By the way, I use |
I've just uploaded the commit myself. |
That's useful!
Thanks! |
No I remember why I added the |
Map context menu coordinates to top-level widget if the top-level widget is a QMenu. Otherwise the context menu is not displayed at the right position. Not sure why this workaround is required. The check for QMenu is required. Otherwise the "windowed" mode enabled via --windowed CLI argument would not work anymore. In this mode the top-level window is a regular window. Adding the window flags Qt::Sheet or Qt::Dialog to the QMenu would help as well but that prevents closing the menu (see #41).
I found a workaround, see the commit description if you're interested: 6057b2c Not sure whether this workaround is better than simply using |
Glad to see another issue fixed/workarounded, but to tell the truth it's beyond my Qt knowledge :] |
With 9f9b912, after right-clicking on the tray icon to show the widget, there are two ways to hide the widget:
After upgrading to 5e39683, neither ways work. I guess it's related to 1bdba31.
Environment: Arch Linux up-to-date + LXQt on X11 + xfwm4-git 4.14pre2+18+gc7e73e3d6-1
The text was updated successfully, but these errors were encountered: