Skip to content

[X11] Create windows with a parent window - #2096

Closed
t-sin wants to merge 5 commits into
rust-windowing:masterfrom
t-sin:with-parent-in-x11
Closed

t-sin wants to merge 5 commits into
rust-windowing:masterfrom
t-sin:with-parent-in-x11

Conversation

@t-sin

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

Copy link
Copy Markdown
Contributor

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 Affects the X11 backend, or generally free Unix platforms C - waiting on maintainer A maintainer must review this code labels Dec 14, 2021
@t-sin

t-sin commented Dec 14, 2021

Copy link
Copy Markdown
Contributor Author

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

t-sin commented Dec 15, 2021

Copy link
Copy Markdown
Contributor Author

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
@t-sin t-sin mentioned this pull request Apr 6, 2022
6 tasks done
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 Affects the X11 backend, or generally free Unix platforms

Development

Successfully merging this pull request may close these issues.

2 participants