Fix resizing on Windows not triggering an event (#166)
Resizing should trigger a baseview resize event, but because we already set the new size here the `WM_SIZE` event was ignored. Co-authored-by: Micah Johnston <micah@photophore.systems>
This commit is contained in:
parent
65d970495f
commit
ea0cd5367d
|
@ -509,17 +509,14 @@ impl WindowState {
|
||||||
self.handler.borrow_mut()
|
self.handler.borrow_mut()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handle a deferred task as described in [`Self::deferred_tasks
|
/// Handle a deferred task as described in [`Self::deferred_tasks`].
|
||||||
pub(self) fn handle_deferred_task(&self, task: WindowTask) {
|
pub(self) fn handle_deferred_task(&self, task: WindowTask) {
|
||||||
match task {
|
match task {
|
||||||
WindowTask::Resize(size) => {
|
WindowTask::Resize(size) => {
|
||||||
let window_info = {
|
// `self.window_info` will be modified in response to the `WM_SIZE` event that
|
||||||
let mut window_info = self.window_info.borrow_mut();
|
// follows the `SetWindowPos()` call
|
||||||
let scaling = window_info.scale();
|
let scaling = self.window_info.borrow().scale();
|
||||||
*window_info = WindowInfo::from_logical_size(size, scaling);
|
let window_info = WindowInfo::from_logical_size(size, scaling);
|
||||||
|
|
||||||
*window_info
|
|
||||||
};
|
|
||||||
|
|
||||||
// If the window is a standalone window then the size needs to include the window
|
// If the window is a standalone window then the size needs to include the window
|
||||||
// decorations
|
// decorations
|
||||||
|
|
Loading…
Reference in a new issue