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
PCManFM-Qt doesn't minimize when pressing the "show desktop" button #1411
Comments
Not reproducible, using git version on 2 machines (arch|debian). EDIT: installed from AUR? |
No, installed from the archlinuxcn repo |
So this should be reported to the maintainers https://wiki.archlinux.org/title/Unofficial_user_repositories#archlinuxcn. |
This might not be a packaging problem or pcmanfm-qt's, but because of my WM (KwinFT), because I have now built all lxqt packages from source and the problem persists. |
Can confirm. Openbox works fine. |
@iamthesenate1 Some WMs may see that LXQt's Desktop is drawn by pcmanfm-qt and treat all its windows as "desktop". KWin has that bug. There may be a workaround for KWin because it has so many settings but I'm not sure. |
I understand now. Thanks for the information. |
@tsujan It's a bug 🐞 in pcmanfm-qt (and it can reproduced)! Basically openbox cannot handle a virtual desktop well. So
EDIT: Uninstalling |
No, it isn't a bug in pcmanfm-qt. Its KWin's job to recognize what window has
Not relevant to this. |
@tsujan Why does it work when starting pcmanfm-qt without the |
Because KWin doesn't mistake it for desktop anymore. Not distinguishing between windows that have the above-mentioned X11 property and those that don't, KWin sees that property in the desktop and then treats all pcmanfm-qt windows as if they were all "desktops". Openbox doesn't make that mistake. |
@tsujan Okay since I haven't found anything in that direction in KDE's bug tracker, I will file a bug there (10 year old account surprisingly still works - wee 🎉!) |
That's a good idea. |
For reference: https://bugs.kde.org/show_bug.cgi?id=442044 |
@tsujan Finally I understand the full problem! We can actually solve this by using Would you provide the dbus call please so I can debug it (e.g. map a shortcut)? |
make sure it works also with xfwm4 |
@stefonarch This is going to be WM agnostic -> works with any WM! 😺 |
@antis81 |
Also see lxqt/lxqt-panel#1477 (especially, lxqt/lxqt-panel#1477 (comment)). If it doesn't exist for you, you need a more complete KDE installation. |
@stefonarch This will also work in xfwm4 (it will work in any WM practically!) @tsujan Do you understand how Qt's "garbage collection" works (QObject parenting)? (I have written similar architectures before and it can solve quite some problems here.) In the end we both want to stay independent from KDE don't we? Draft: // file: libfm-qt/filedialog.cpp
namespace Fm {
QList<QWidget*> floatingWindows;
//TODO:
// - Move floatingWindows to a common place where pcmanfm-qt process has access as well.
// - call "qDeleteAll(Fm::floatingWindows)" (maybe "for (auto w : Fm::floatingWindows) { w->close(); }") before pcmanfm-qt process ends.
constexpr QWidget* parentWindow(QWidget* parent, QWidget* thiz) {
if (parent->testAttribute(Qt::WA_X11NetWmWindowTypeDesktop)) {
floatingWindows << thiz;
return nullptr;
}
return parent;
}
FileDialog::FileDialog(QWidget* parent, FilePath path) :
QDialog(parentWindow(parent, this)),
//…
{
//…
}
FileDialog::~FileDialog() {
floatingWindows.removeAll(this);
//…
}
} Note: As a QDialog is also a window this should work right away! For floating QWidget's we might wrap that into a Are we good now? ❤️ 🙂 |
FYI: Wrote a little test application that cleanly reproduces this for KDE! |
@tsujan We have actually located the bug -> https://invent.kde.org/plasma/kwin/-/blob/master/src/layers.cpp#L736 The (Since this is is a virtual function, KWin takes a different code path in Wayland and it works there! Maybe we can port the logic apply it to the X11 client… just thinking out loud here… 🤔 📢) |
Very good. Hopefully, it'll be fixed in the next version. |
Well done. |
Not sure if it will work with plasma's "panel" (couldn't find the code). It likely doesn't set one of those flags (LXQt uses |
They'll review the code. |
Expected Behavior
It should minimize too, so that the desktop is shown.
Current Behavior
It doesn't.
Steps to Reproduce (for bugs)
System Information
The text was updated successfully, but these errors were encountered: