Skip to content
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 X11EmbedContainer Qt5 port #3475

Closed
wants to merge 13 commits into from
Closed

Add X11EmbedContainer Qt5 port #3475

wants to merge 13 commits into from

Conversation

lukas-w
Copy link
Member

@lukas-w lukas-w commented Apr 1, 2017

Alternative solution for issue #2855 (other PRs trying to solve the same issue are #2856 #3497 and #3295). I ported most of QX11EmbedContainer from Qt4 to Qt5 for this. I haven't looked at the code in detail, so it's quite possible most of it is not even used in our case.

It'd be great if we could get some more test results for this. :)

@lukas-w
Copy link
Member Author

lukas-w commented Apr 8, 2017

I pushed some more commits, which fixes Qt's XEMBED implementation, which apparently has always been broken. See for example QTBUG-36446 and related Wine bug 35347 (Wine even included a workaround for our VSTs to work).

This also fixes a long-standing issue with VST GUIs, which is sub-elements like combobox dropdowns appearing in the wrong screen position, most of the time outside of the VST subwindow. Wine has full XEMBED support, and with the protocol being fixed on our side, screen positions seem to get mapped to the embedder's coordinates properly now:

image

This is even broken with Qt's createWindowContainer, which is why I closed #3295 in favor of this PR. The only issue I found with this so far is that clicking inside the VST will not bring the subwindow to the front.

Some testing would be useful to know if we should pursue this approach further.

@Umcaruje
Copy link
Member

Umcaruje commented May 14, 2017

This PR is failing travis, and going external window is better in my opinion than porting x11embedcontainer to qt5.

So I vote we close this PR out in favour of #3497

@BaraMGB
Copy link
Contributor

BaraMGB commented May 14, 2017

This PR is failing travis, and going external window is better in my opinion than porting x11embedcontainer to qt5.

So I vote we close this PR out in favour of #3497

I agree.

@tresf
Copy link
Member

tresf commented May 14, 2017

external window is better in my opinion than porting x11embedcontainer to qt5.

Before we make that decision, please consider #3532 which would make both behaviors possible. The decision to merge should pivot on the status of #3532.

@BaraMGB
Copy link
Contributor

BaraMGB commented May 14, 2017

@tresf On MS Windows VSTs aren't subwindows. #3497 would be more consistent. Also single window GUI would be easier to implement.

@lukas-w
Copy link
Member Author

lukas-w commented May 15, 2017

This PR is failing travis

I've been waiting with fixing Travis because I hoped to get some testing first. So Travis status depends on this PR being accepted, not vice-versa as you seem to imply.

and going external window is better in my opinion than porting x11embedcontainer to qt5

I'm quite fond of being able to have everything inside one window, especially on a single monitor. Are you sure we want to remove that feature?

On MS Windows VSTs aren't subwindows.

Well that's just not true. Or has it changed recently?

@BaraMGB
Copy link
Contributor

BaraMGB commented May 15, 2017

On MS Windows VSTs aren't subwindows.

Well that's just not true. Or has it changed recently?

Sorry my fault.

@lukas-w
Copy link
Member Author

lukas-w commented May 16, 2017

Also single window GUI would be easier to implement.

@BaraMGB Could you elaborate on this one? Why would it be easier if we don't have the ability to embed plugins?

@BaraMGB
Copy link
Contributor

BaraMGB commented May 16, 2017

In my understanding of the single window GUI we want to get rid of any MDI subwindows. Our native plugins would be organized into racks. External plugins would be realized in external windows.

@karmux
Copy link
Contributor

karmux commented Jul 19, 2017

This looks very stable and is working perfectly.

I also like that for effects plugins a GUI is shown already when clicking on Controls in the Effects Chain. Previously there were a small intermediate window and it required one extra click. Now this intermediate window and VST GUI are merged 👍

@lukas-w
Copy link
Member Author

lukas-w commented Aug 5, 2017

@karmux Thanks for testing.

I moved the X11EmbedContainer implementation to its own repository (https://github.com/Lukas-W/qt5-x11embed) and included as a git submodule. Building it using CMake's add_subdirectory for now, though ExternalProject_Add may be a better choice.

Fixed some warnings that caused the Travis build to fail.

@Umcaruje
Copy link
Member

Umcaruje commented Aug 5, 2017

After your comments in the other pull request, I now see this is really the way to go. I'll see to test this in the following days, because we really need this for AppImages and the 1.2 release 👍

@Umcaruje
Copy link
Member

Umcaruje commented Aug 7, 2017

Ok, so I just built the branch and the VST windows don't seem to load at all. I'm on elementary OS Loki, and I'm using wine 1.8.
This is the output in my terminal:

fixme:heap:RtlSetHeapInformation 0x240000 0 0x23fe10 4 stub
fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
fixme:advapi:RegisterEventSourceW ((null),L"Bonjour Service"): stub
fixme:advapi:ReportEventA (0xcafe4242,0x0004,0x0000,0x00000064,(nil),0x0001,0x00000000,0x54df40,(nil)): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0004,0x0000,0x00000064,(nil),0x0001,0x00000000,0x69c90,(nil)): stub
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
err:winsock:WSAIoctl -> _WSAIO(IOC_WS2, 23) request failed with status 0x2733
fixme:iphlpapi:CreateIpForwardEntry (pRoute 0x54e298): stub
fixme:advapi:ReportEventA (0xcafe4242,0x0004,0x0000,0x00000064,(nil),0x0001,0x00000000,0x54df40,(nil)): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0004,0x0000,0x00000064,(nil),0x0001,0x00000000,0x69c90,(nil)): stub
fixme:service:svcctl_EnumServicesStatusW resume index not supported
fixme:service:svcctl_EnumServicesStatusW resume index not supported
fixme:advapi:ReportEventA (0xcafe4242,0x0004,0x0000,0x00000064,(nil),0x0001,0x00000000,0x54df40,(nil)): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0004,0x0000,0x00000064,(nil),0x0001,0x00000000,0x69c90,(nil)): stub
fixme:netapi32:NetGetJoinInformation Semi-stub (null) 0x54dfb8 0x54dfb0
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x33fd2c 1 C) semi-stub
fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x29cc290 1 C) semi-stub
fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x29cc1dc 1 C) semi-stub
fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x29cc03c 1 C) semi-stub
fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x29cd1d4 1 C) semi-stub
fixme:service:scmdatabase_autostart_services Auto-start service L"Tpkd" failed to start: 3
fixme:msvcrt:type_info_name_internal_method type_info_node parameter ignored
fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x29c902c 1 C) semi-stub
fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x29c8fe0 1 C) semi-stub
fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x54d450,(nil)): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x69c90,(nil)): stub
err:eventlog:ReportEventW L"mDNSCoreReceiveResponse: Received from 192.168.1.11:5353   16 umpc.local. AAAA FE80:0000:0000:0000:DD1F:78FE:CBD5:D1ED"
fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x54d450,(nil)): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x69c90,(nil)): stub
err:eventlog:ReportEventW L"mDNSCoreReceiveResponse: ProbeCount 2; will deregister    4 umpc.local. Addr 192.168.1.11"
fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x54d360,(nil)): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x69c90,(nil)): stub
err:eventlog:ReportEventW L"Local Hostname umpc.local already in use; will try umpc-2.local instead"
fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x29c787c 1 C) semi-stub
fixme:msvcp:locale_operator_not_equal (0x29c76d8 0x7e6ee118) stub
fixme:msvcp:locale_operator_not_equal (0x29c7680 0x7e6ee118) stub
fixme:msvcp:locale_operator_not_equal (0x29c76f8 0x7e6ee118) stub
fixme:msvcp:locale_operator_not_equal (0x29c7730 0x7e6ee118) stub
fixme:msvcp:locale_operator_not_equal (0x29c7730 0x7e6ee118) stub
fixme:msvcp:locale_operator_not_equal (0x29c7730 0x7e6ee118) stub
fixme:msvcp:locale_operator_not_equal (0x29c7708 0x7e6ee118) stub
fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x29cd204 1 C) semi-stub
unique ID: S1Vs
RemotePlugin::DebugMessage: inputs: 0  output: 2
RemotePlugin::DebugMessage: creating editor
RemotePlugin::DebugMessage: editor successfully created
RemotePlugin::DebugMessage: failed getting shared memory
fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x54d450,(nil)): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x69c90,(nil)): stub
err:eventlog:ReportEventW L"mDNSCoreReceiveResponse: Received from 192.168.1.11:5353   12 11.1.168.192.in-addr.arpa. PTR umpc.local."
fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x54d450,(nil)): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x69c90,(nil)): stub
err:eventlog:ReportEventW L"mDNSCoreReceiveResponse: Unexpected conflict discarding   14 11.1.168.192.in-addr.arpa. PTR umpc-2.local."
fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x54d450,(nil)): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x69c90,(nil)): stub
err:eventlog:ReportEventW L"mDNSCoreReceiveResponse: Received from 192.168.1.19:5353   12 19.1.168.192.in-addr.arpa. PTR umpc.local."
fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x54d450,(nil)): stub
fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000064,(nil),0x0001,0x00000000,0x69c90,(nil)): stub
err:eventlog:ReportEventW L"mDNSCoreReceiveResponse: Unexpected conflict discarding   14 19.1.168.192.in-addr.arpa. PTR umpc-2.local."

And I just get an empty plugin window like this
image

Closing and reopening doesn't fix the problem.

@lukas-w
Copy link
Member Author

lukas-w commented Aug 20, 2017

@Umcaruje I installed elementary OS in a VM to test this but I can't reproduce what you experience. Tried with Synth1 1.12, Qt 5.5.1, wine 1.6 (which is the version elementary provides) and wine 2.0.2 from WineHQ's official repo. Where did you get wine 1.8 from?

@Umcaruje
Copy link
Member

Where did you get wine 1.8 from?

Oh shit, looks like I was using a deprecated old wine repo. I'll update and retest.

@karmux
Copy link
Contributor

karmux commented Aug 20, 2017

This should be included in 1.2.0-rc4 IMHO.

@lukas-w lukas-w changed the base branch from master to stable-1.2 September 1, 2017 10:00
@lukas-w lukas-w changed the base branch from stable-1.2 to master September 1, 2017 10:00
@lukas-w lukas-w deleted the qt5-vst-2 branch May 7, 2018 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants