Desktop: Hook up native window controls (#3161)

* Implement window controls

* Fix drag target size

* Maximize with drag area double click
This commit is contained in:
Timon
2025-09-13 13:15:52 -07:00
committed by GitHub
parent e97d5520e8
commit 944a6eeea2
9 changed files with 29 additions and 4 deletions

View File

@@ -8,5 +8,6 @@ pub enum AppWindowMessage {
AppWindowMinimize,
AppWindowMaximize,
AppWindowUpdatePlatform { platform: AppWindowPlatform },
AppWindowDrag,
AppWindowClose,
}

View File

@@ -31,6 +31,9 @@ impl MessageHandler<AppWindowMessage, ()> for AppWindowMessageHandler {
self.platform = platform;
responses.add(FrontendMessage::UpdatePlatform { platform: self.platform });
}
AppWindowMessage::AppWindowDrag => {
responses.add(FrontendMessage::DragWindow);
}
AppWindowMessage::AppWindowClose => {
responses.add(FrontendMessage::CloseWindow);
}

View File

@@ -343,6 +343,7 @@ pub enum FrontendMessage {
maximized: bool,
minimized: bool,
},
DragWindow,
CloseWindow,
UpdateViewportHolePunch {
active: bool,