-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add Qt5 Linux VST subwindow implementation #3295
Conversation
Uses QWindow::fromWinId and QWidget::createWindowContainer instead of QX11EmbedContainer which was removed in Qt5. Adds a workaround for mouse events that aren't accepted by the window container, and thus are being propagated to the parent.
@jasp00 Oh, I missed that. Just tried it out. I don't experience any visual or moving glitches, I guess that's fixed in Qt 5.7.1? However, I get the following issues:
Would you mind testing this PR? If there are no major bugs, I'd suggest merging this one in favor of #2856, as it touches a lot less code and doesn't have the issues mentioned above, nor any glitches in Qt versions prior to 5.7.1 (at least that I know of). |
As you can see in 23c3b21, I just tried what you do now. Subwindows cause glitches in Qt 5.6.1 and 5.7.1. The issues that you have detected should be fixed:
This is unavoidable because subwindows cause glitches. This way it works like ZynAddSubFX.
Do you use X11? Does
It is |
Yes & Yes. Just tested it again and the window does reappear when clicking "Show/hide GUI". Sorry for the false negative.
Yep, that could actually be my WM's (i3) fault.
My point is that I don't have any glitches in 5.7.1 with this PR, so it's possible the glitches you experience are not caused by Qt. |
Just tested on Ubuntu 16.04 LTS with Qt 5.5.1. No glitches with this PR or with yours. However, when using 23c3b21, the VST subwindow is empty. |
We see environments without glitches and others with them. The glitches are triggered by the switch from Qt 4 to Qt 5 and they persist after removing the embedding subwindow. Even with separated windows, Qt 5 applications behave erratically, not just LMMS. Is it really a Qt bug? I will not know for sure until I debug Qt 5, but Qt 4 does not trigger this. |
In my opinion we should really consider to have the VST plugins into a QDialog instead of a QSubWindow. The user can move the window to a second desktop and we prepare a future single window solution for lmms which wouldn't work with subwindows. |
This is an ill concept. Why would a dialog work when a widget does not?
Yes, it does not work with subwindows, it works with widgets, which is essentially the same. @BaraMGB, you mentioned QDialog at #2856 (comment). Could you provide the implementation so I could confirm whether the glitches are present? |
This could be difficult. Unfortunately I never pushed it to github. Perhaps I have the branch on my laptop. I will look tonight when I get home. |
Okay, found the branch. Rebased it: https://github.com/BaraMGB/lmms/tree/vstembedqt5 |
It is essentially the same code. Anyway, I have tested and it has the glitches.
I have tested your branch. So an external embedder is not needed. Protocol enhancements from #2856 should be merged into a I will pause development for some days. |
Only if |
My bad, it is modeless by default. Anyway, it cannot be sent to the background because of the default |
Thanks @jasp00. Would you mind sharing some details about your environment (such as distro, Qt version, GPU/graphics driver)? I'd really like to be able to reproduce this. So far, I tested (without glitches):
|
I develop with Debian Sid, updated from time to time; as of today, glitches are still there. Qt version is 5.7.1+dfsg-3+b1. Graphics go through X11 without DRI drivers. |
I tested this PR with Wine 2.4.0 and Qt 5.6.1 on Kubuntu 16.10. VST effects from effects chain work without issues but VST instruments loaded into Vestige opens separately from Qt subwindow. There is empty Qt subwindow and borderless VST instrument, just like in @jasp00's PR when I tested it couple of months ago. Difference is that in jasp00's PR VST instrument went inside Qt subwindow after clicking "Show/hide GUI" button twice in Vestige but here it always opens without window borders. After testing some more I managed to make VST effects also open without window borders. This happened several times after playing and editing project a bit. Had to restart LMMS to make them open correctly again. |
I can reproduce this with Qt 5.6.1 and Plasma and i3. Xfce doesn't have this issue. I started a new approach on branch |
@lukas-w, I tried this new approach and didn't get any window issues. 👍 On the screenshot Kontakt 5 is instrument and Guitar Rig 5 is effect. Had to install following new packages to be able to compile
|
Same glitches there. |
No, I only have glitches on Qt 5 when embedding in a subwindow.
Metacity and GNOME. |
So you're still using Gnome 2? |
I do in this environment, GNOME 2 speaks X11. |
@jasp00 I pushed some fixes to #3475. You're invited to re-test if you're interested. However, even if your glitches persist, supporting a platform as old as GNOME 2 is out of scope for this feature and for LMMS in general. Support for it has been long dropped by most projects, and I don't know about any distro that still provides it, let alone provide GNOME 2 and Qt5 at the same time. Note that prior to my most recent commits, almost all of the code in Closing this as it'll most likely be superseded by #3475. |
Uses
QWindow::fromWinId
andQWidget::createWindowContainer
instead ofQX11EmbedContainer
which was removed in Qt5.Adds a workaround for mouse events that aren't accepted by the window
container, and thus were being propagated to the parent.
Fixes #2855. (Does this work on other platforms than Linux with Qt5?)