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: Fix window position setting ignored when fullscreen #1182

Closed

Conversation

murarth
Copy link
Contributor

@murarth murarth commented Sep 23, 2019

When Window::set_outer_position is called while a window is fullscreen,
the given position will be saved and will be assigned to the window when
it leaves fullscreen mode.

This addresses one of the issues described in #978.

  • Tested on all platforms changed
  • Compilation warnings were addressed
  • cargo fmt has been run on this branch
  • 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

When `Window::set_outer_position` is called while a window is fullscreen,
the given position will be saved and will be assigned to the window when
it leaves fullscreen mode.
@Osspial
Copy link
Contributor

Osspial commented Sep 24, 2019

I tested set_outer_position on Windows when fullscreened, and we get similarly nonsensical behavior there. I feel like we should standardize and document the behavior of window position/size manipulation functions on fullscreen windows across platforms, to avoid gotchyas when developers are only regularly testing one platform.

Is there any reason set_outer_position and set_inner_size shouldn't just return hard errors when the window is in fullscreen mode? I don't think overloading set_outer_position as set_restore_position when the window is fullscreened is a good idea.

@murarth
Copy link
Contributor Author

murarth commented Sep 25, 2019

Is there any reason set_outer_position and set_inner_size shouldn't just return hard errors when the window is in fullscreen mode? I don't think overloading set_outer_position as set_restore_position when the window is fullscreened is a good idea.

cc @chrisduerr, author of the original issue

@chrisduerr
Copy link
Contributor

Doesn't seem to help for me. Window is still spawned on incorrect monitor and it still has the incorrect size after unfullscreening.

@murarth
Copy link
Contributor Author

murarth commented Sep 25, 2019

Ah, right. The issue was that setting position at startup was ignored, which has a different root cause. I will close this PR and approach the issue from a different angle.

@murarth murarth closed this Sep 25, 2019
@murarth murarth deleted the fix-fullscreen-position branch September 25, 2019 22:33
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.

3 participants