winit-core/window: add Window::request_ime_update
Allow updating IME state atomically to make it easier for platforms where it's atomic by its nature, like Wayland. The old API is marked as deprecated and is routed to the new atomic API. Co-authored-by: dcz <gilapfco.dcz@porcupinefactory.org>
This commit is contained in:
parent
fa0795a50c
commit
08907148ec
19 changed files with 866 additions and 222 deletions
|
|
@ -19,7 +19,7 @@ use windows_sys::Win32::UI::WindowsAndMessaging::{
|
|||
use winit_core::icon::Icon;
|
||||
use winit_core::keyboard::ModifiersState;
|
||||
use winit_core::monitor::Fullscreen;
|
||||
use winit_core::window::{Theme, WindowAttributes};
|
||||
use winit_core::window::{ImeCapabilities, Theme, WindowAttributes};
|
||||
|
||||
use crate::{event_loop, util, SelectedCursor};
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ pub(crate) struct WindowState {
|
|||
pub window_flags: WindowFlags,
|
||||
|
||||
pub ime_state: ImeState,
|
||||
pub ime_allowed: bool,
|
||||
pub ime_capabilities: Option<ImeCapabilities>,
|
||||
|
||||
// Used by WM_NCACTIVATE, WM_SETFOCUS and WM_KILLFOCUS
|
||||
pub is_active: bool,
|
||||
|
|
@ -178,7 +178,7 @@ impl WindowState {
|
|||
window_flags: WindowFlags::empty(),
|
||||
|
||||
ime_state: ImeState::Disabled,
|
||||
ime_allowed: false,
|
||||
ime_capabilities: None,
|
||||
|
||||
is_active: false,
|
||||
is_focused: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue