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

[X11] Create windows with a parent window #2096

Closed
wants to merge 5 commits into from

Conversation

t-sin
Copy link
Contributor

@t-sin t-sin commented Dec 14, 2021

This PR can create windows with a user-specified parent window. It's intended to realize what discussed in issue #159 for X11.

EDITED: For compatibility, this introduces a new method new_x11_any_thread_with_root() to create such windows. I considered to change the signature of new_x11_any_thread(), it takes a parent window ID, but I cannot decide that so simply create a new method. I want to discuss about this point.

The way above was an wrong way. For now this PR adds with_x11_parent() method to WindowBuilder by importing winit::platform::unix::WindowBuilderExtUnix, we can set X11 window ID as a parent with it. It seems good because it's similar way in supporting child window in Windows (#96).

By the way this PR is for my VST3 plugin using vst3-sys so I don't have any ideas to test this PR without VST3 codes. I want some advice about testing. This PR adds example code and it works.

  • Tested on all platforms changed
  • Compilation warnings were addressed
  • cargo fmt has been run on this branch
  • cargo doc builds successfully
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

@maroider maroider added DS - x11 C - waiting on maintainer A maintainer must review this code labels Dec 14, 2021
@t-sin
Copy link
Contributor Author

t-sin commented Dec 14, 2021

This PR cannot create a child window because it fails arround here. I should consider the xinput2. Please wait.

@t-sin t-sin force-pushed the with-parent-in-x11 branch from 2e04778 to 20b8cfd Compare December 15, 2021 00:55
@t-sin
Copy link
Contributor Author

t-sin commented Dec 15, 2021

Some problem when this PR created are resolved. It's ready for review.

@t-sin t-sin force-pushed the with-parent-in-x11 branch from 20b8cfd to ff1f0f9 Compare February 11, 2022 15:12
@t-sin t-sin closed this Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - waiting on maintainer A maintainer must review this code DS - x11
Development

Successfully merging this pull request may close these issues.

2 participants