Skip to content

Winit version 0.30.10#4206

Merged
kchibisov merged 20 commits into
rust-windowing:v0.30.xfrom
kchibisov:release-03010
Apr 30, 2025
Merged

Winit version 0.30.10#4206
kchibisov merged 20 commits into
rust-windowing:v0.30.xfrom
kchibisov:release-03010

Conversation

@kchibisov
Copy link
Copy Markdown
Member

No description provided.

kchibisov and others added 5 commits April 29, 2025 14:45
…ust-windowing#4136)

* Fix a pause in the event loop when clicking the title bar on windows

When clicking the title bar on Windows, to drag the window, there is
a noticible pause in continuous redraw requests. This was fixed
in rust-windowing#839 and then regressed in rust-windowing#1852. The cursor blinks in both
cases and is unrelated. The regression made the blink happen after
the pause instead of immediately.

* Update the event loop pause note on the WM_NCLBUTTONDOWN handler

The application example was also updated to optionally animate the fill color
in order to demonstrate continuous redraw without pauses in the event
loop.
…dowing#4164)

* Prevent panic when calling set_simple_fullscreen(false) on macos

Calling `set_simple_fullscreen(false)` to restore the window after
a previous call to `set_simple_fullscreen(true)` panics with
`view must be installed in a window` in the call to `set_style_mask`
with the old style.

Moving the `set_style_mask` call after the frame has been resized
fixes the issue.

* Hide the doc and menubar on macos when using set_borderless_game
with set_simple_fullscreen
Using `Duration::Zero` with `Wait` polling mode was still blocking until
the event was actually delivered. Thus when `pump_events` API is used,
ensure that it's not happening.

Fixes rust-windowing#4130.
@kchibisov kchibisov force-pushed the release-03010 branch 2 times, most recently from 082feb9 to 12bde0f Compare April 29, 2025 06:21
kchibisov and others added 6 commits April 29, 2025 15:25
Only mark that the grab was applied when it actually got applied.
Previously there was an issue with grab being marked as applied without
a pointer over the window, when in reality it wasn't.

Fixes rust-windowing#4073.
Spawn a thread when pump_events is used, so the external thread will
get woken-up correctly. This only happens when timeout was given.

Fixes rust-windowing#4183.
@kchibisov
Copy link
Copy Markdown
Member Author

@madsmtm if you want to cherry pick something for macOS go ahead, it's generally requires significant effort to do so, so I haven't bothered in places where it was not obvious bug fix.

@madsmtm
Copy link
Copy Markdown
Member

madsmtm commented Apr 29, 2025

This disallows carrying over open windows between calls of
`run_app_on_demand` (which wasn't intended to be supported anyhow).
@kchibisov
Copy link
Copy Markdown
Member Author

yeah, if you want to backport them then go ahead.

@kchibisov kchibisov marked this pull request as draft April 29, 2025 11:26
@madsmtm
Copy link
Copy Markdown
Member

madsmtm commented Apr 29, 2025

Alright, done. I rebased them before the last commit which updates the version number and changelog entries, please verify that you agree I've done it correctly.

I also ended up backporting the iOS parts of #3758, since it's quite a roadblock there that you don't have control over the application delegate (and the iOS parts of that are far easier to backport than the macOS parts).

(Also, for the record, I added 37a4394 a month ago when I noticed that parts of the apple/appkit module was accidentally shipped with Winit v0.30.9).

@kchibisov
Copy link
Copy Markdown
Member Author

kchibisov commented Apr 29, 2025

@madsmtm you need to raise the ci to 1.71.0 as well, since macOS fails otherwise.

Generally looks good, I'll wait a bit for some other stuff to get merged/resolved and release.

@madsmtm
Copy link
Copy Markdown
Member

madsmtm commented Apr 29, 2025

I've gone with using extern "C" instead to avoid the MSRV bump.

madsmtm added 3 commits April 29, 2025 13:49
This is done to avoid order-dependent behavior that you'd otherwise
encounter where `EventLoop::new` had to be called at the beginning of
`fn main` to ensure that Winit's application was the one being
registered as the main application by calling `sharedApplication`.

Fixes rust-windowing#3772.

This should also make it (more) possible to use multiple versions of
Winit in the same application (though that's still untested).

Finally, it should allow the user to override `NSApplication` themselves
if they need to do that for some reason.
…indowing#4191)

We were rounding the refresh rate before converting it to millihertz.
iOS parts of rust-windowing#3758.

This allows the user to override the application delegate themselves,
which opens several doors for customization that were previously closed.
To do this, we use notifications instead of a top-level application
delegate.

One effect of not providing an application delegate on iOS is that we no
longer act as-if the application successfully open all URLs there.

This is a breaking change, although unlikely to matter in practice,
since the return value of `application:didFinishLaunchingWithOptions:`
is seldom used by the system (and this is likely the preferred behaviour
anyhow).
@madsmtm madsmtm added S - meta Project governance and removed S - meta Project governance labels Apr 29, 2025
madsmtm and others added 5 commits April 30, 2025 02:18
The monitor UUID is what actually represents the monitor,
CGDirectDisplayID is closer in correspondence to a specific framebuffer.
Instead of panicking, raise a warning and return `None` or similar.

Co-Authored-By: RJ <rj@metabrew.com>
The `text` is retrieved as UTF-8 while `attributes` are based on UTF-16,
thus the offset was getting out of sync on some unicode payloads
like surrogate pairs.

Fixes rust-windowing#3967.
@kchibisov kchibisov marked this pull request as ready for review April 29, 2025 17:19
@kchibisov kchibisov merged commit 2385410 into rust-windowing:v0.30.x Apr 30, 2025
53 checks passed
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.

8 participants