We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7404659 commit 9cec0ebCopy full SHA for 9cec0eb
druid-shell/src/platform/gtk/window.rs
@@ -252,8 +252,12 @@ impl WindowBuilder {
252
);
253
254
if last_size.get() != size {
255
- last_size.set(size);
256
- state.handler.borrow_mut().size(size.0, size.1);
+ if let Ok(mut handler_borrow) = state.handler.try_borrow_mut() {
+ last_size.set(size);
257
+ handler_borrow.size(size.0, size.1);
258
+ } else {
259
+ log::warn!("Resizing was skipped because the handler was already borrowed");
260
+ }
261
}
262
263
// For some reason piet needs a mutable context, so give it one I guess.
0 commit comments