winit-core/window: wrap ImeCapabilities in struct

To prevent user from using `::all()` and thus writing not forward
compatible code wrap the bitflags struct and provide simpler interface
to it.
This commit is contained in:
DorotaC 2025-06-29 06:53:47 +02:00 committed by GitHub
parent 08907148ec
commit abed32eb80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 86 additions and 46 deletions

View file

@ -2112,7 +2112,7 @@ impl UnownedWindow {
};
if let Some((position, size)) = state.cursor_area {
if capabilities.contains(ImeCapabilities::CURSOR_AREA) {
if capabilities.cursor_area() {
self.set_ime_cursor_area(position, size);
} else {
warn!("discarding IME cursor area update without capability enabled.");