Skip to content

feat(x11): Add Window::drag_resize_window#2515

Merged
jackpot51 merged 1 commit into
rust-windowing:masterfrom
pop-os:resize
Jan 11, 2023
Merged

feat(x11): Add Window::drag_resize_window#2515
jackpot51 merged 1 commit into
rust-windowing:masterfrom
pop-os:resize

Conversation

@mmstick
Copy link
Copy Markdown
Contributor

@mmstick mmstick commented Oct 12, 2022

  • Tested on all platforms changed
  • 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

Implements functionality required to resolve #725 for X11. Uses the example from #2003. Only supports X11 on Linux for now. Wayland support will require a future release of sctk with the additional protocol added to the API. And there's some substantial changes in sctk at the moment so upgrading this library will be a bit of a chore. Code from #2003 for Windows support could be added on top of this.

@aniketbiprojit
Copy link
Copy Markdown

Winit supports drag_window_resize without any addition in current master on Apple M1. Probably shouldn't panic on drag_window_resize and just give a warning to developers.

Screen.Recording.2022-10-16.at.8.19.22.PM.mov

@mmstick
Copy link
Copy Markdown
Contributor Author

mmstick commented Oct 16, 2022

There isn't a panic in the source code. It is simply stating that it's not supported by winit Err(NotSupported). The application you compiled is unwrapping the error, causing a panic. This patch only adds support for X11. I don't have a Mac to add support for that.

@aniketbiprojit
Copy link
Copy Markdown

Cool. Just wanted to add that Apple supports this out-of-the-box right now without calling this function.

Copy link
Copy Markdown
Member

@kchibisov kchibisov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should remove the parts saying that Wayland is impelemented since it's cleary not.

Comment thread src/window.rs
Comment thread src/platform_impl/linux/wayland/window/mod.rs Outdated
@mmstick
Copy link
Copy Markdown
Contributor Author

mmstick commented Oct 28, 2022

Which parts mention that Wayland is supported? I did already update the platform-specific table to only show that X11 is supported.

@mmstick mmstick force-pushed the resize branch 2 times, most recently from 81b0fb1 to de103d9 Compare October 31, 2022 14:48
@mmstick mmstick requested review from kchibisov and removed request for francesca64, madsmtm and msiglreith October 31, 2022 14:50
@mmstick mmstick force-pushed the resize branch 2 times, most recently from 7827fd3 to 10e75bd Compare November 1, 2022 21:23
Copy link
Copy Markdown
Member

@kchibisov kchibisov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, just some minor notes.

Comment thread src/platform_impl/linux/wayland/window/mod.rs Outdated
Comment thread src/platform_impl/linux/x11/window.rs Outdated
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
@mmstick
Copy link
Copy Markdown
Contributor Author

mmstick commented Jan 11, 2023

Rebased with conflicts resolved. The period added to the changelog entry.

@jackpot51 jackpot51 merged commit 9225b28 into rust-windowing:master Jan 11, 2023
@jackpot51 jackpot51 deleted the resize branch January 11, 2023 17:07
@kchibisov
Copy link
Copy Markdown
Member

Thanks, I somehow forgot that this PR existed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Can't resize window without decorations

4 participants