mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
Desktop: Mac fix keyboard input (#3371)
* add browser debug port env
* mac use option as alt
* fix cef texture double sRGB conversion by using cef-rs fork with fix
* fix keyboard input on mac
* add missing frontend messages
* fixup
* fix keyboard input mac
* dbg
* re implement keyboard mapping
Co-authored-by: csmoe <csmoe@msn.com>
* Fix double arrow keys
* try fix for non mac
* test
* Revert "test"
This reverts commit c7cde9c597.
* fix mac
* some cleanup
* fix zoom in shortcut on mac introduced in #3377
* disable menu shortcut display
* fixup
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use winit::event_loop::ActiveEventLoop;
|
||||
use winit::platform::macos::WindowAttributesMacOS;
|
||||
use winit::window::{Window, WindowAttributes};
|
||||
|
||||
use crate::consts::APP_NAME;
|
||||
@@ -11,7 +12,7 @@ pub(super) struct NativeWindowImpl {
|
||||
|
||||
impl super::NativeWindow for NativeWindowImpl {
|
||||
fn configure(attributes: WindowAttributes, _event_loop: &dyn ActiveEventLoop) -> WindowAttributes {
|
||||
let mac_window = winit::platform::macos::WindowAttributesMacOS::default()
|
||||
let mac_window = WindowAttributesMacOS::default()
|
||||
.with_titlebar_transparent(true)
|
||||
.with_fullsize_content_view(true)
|
||||
.with_title_hidden(true);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
use winit::event_loop::ActiveEventLoop;
|
||||
use winit::icon::Icon;
|
||||
use winit::platform::windows::WinIcon;
|
||||
use winit::window::{Window, WindowAttributes};
|
||||
|
||||
use crate::event::AppEventScheduler;
|
||||
@@ -9,8 +11,8 @@ pub(super) struct NativeWindowImpl {
|
||||
|
||||
impl super::NativeWindow for NativeWindowImpl {
|
||||
fn configure(attributes: WindowAttributes, _event_loop: &dyn ActiveEventLoop) -> WindowAttributes {
|
||||
if let Ok(win_icon) = winit::platform::windows::WinIcon::from_resource(1, None) {
|
||||
let icon = winit::icon::Icon(std::sync::Arc::new(win_icon));
|
||||
if let Ok(win_icon) = WinIcon::from_resource(1, None) {
|
||||
let icon = Icon(std::sync::Arc::new(win_icon));
|
||||
attributes.with_window_icon(Some(icon))
|
||||
} else {
|
||||
attributes
|
||||
|
||||
Reference in New Issue
Block a user