windows: Fix titlebar rendering on Windows 10 (#14656)
As we discussed in #14190, we agreed to open a new PR. Release Notes: - N/A
This commit is contained in:
parent
beb8fbdf7f
commit
201db23b58
4 changed files with 38 additions and 2 deletions
|
@ -52,6 +52,7 @@ pub(crate) struct WindowsPlatform {
|
|||
text_system: Arc<DirectWriteTextSystem>,
|
||||
clipboard_hash_format: u32,
|
||||
clipboard_metadata_format: u32,
|
||||
windows_version: WindowsVersion,
|
||||
}
|
||||
|
||||
pub(crate) struct WindowsPlatformState {
|
||||
|
@ -98,6 +99,7 @@ impl WindowsPlatform {
|
|||
let clipboard_hash_format = register_clipboard_format(CLIPBOARD_HASH_FORMAT).unwrap();
|
||||
let clipboard_metadata_format =
|
||||
register_clipboard_format(CLIPBOARD_METADATA_FORMAT).unwrap();
|
||||
let windows_version = WindowsVersion::new().expect("Error retrieve windows version");
|
||||
|
||||
Self {
|
||||
state,
|
||||
|
@ -108,6 +110,7 @@ impl WindowsPlatform {
|
|||
text_system,
|
||||
clipboard_hash_format,
|
||||
clipboard_metadata_format,
|
||||
windows_version,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,6 +303,7 @@ impl Platform for WindowsPlatform {
|
|||
self.icon,
|
||||
self.foreground_executor.clone(),
|
||||
lock.current_cursor,
|
||||
self.windows_version,
|
||||
)?;
|
||||
drop(lock);
|
||||
let handle = window.get_raw_handle();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue