Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions druid-shell/src/backend/gtk/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ const SCALE_TARGET_DPI: f64 = 96.0;
/// Taken from <https://gtk-rs.org/docs-src/tutorial/closures>
/// It is used to reduce the boilerplate of setting up gtk callbacks
/// Example:
/// ```
/// ```ignore
/// button.connect_clicked(clone!(handle => move |_| { ... }))
/// ```
/// is equivalent to:
/// ```
/// ```ignore
/// {
/// let handle = handle.clone();
/// button.connect_clicked(move |_| { ... })
Expand Down
2 changes: 1 addition & 1 deletion druid-shell/src/backend/wayland/pointers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ impl Pointer {
))
}
ButtonState::Released => {
let mut updated = self.buttons.borrow_mut().remove(button);
self.buttons.borrow_mut().remove(button);
self.clickevent.borrow_mut().debounce(MouseEvtKind::Up(
mouse::MouseEvent {
pos: self.pos.get(),
Expand Down
4 changes: 3 additions & 1 deletion druid-shell/src/backend/windows/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//! Safe wrapper for menus.

use std::collections::HashMap;
use std::fmt::Write as _;
use std::mem;
use std::ptr::null;

Expand Down Expand Up @@ -219,6 +220,7 @@ fn format_hotkey(key: &HotKey, s: &mut String) {
KbKey::ArrowRight => s.push_str("Right"),
KbKey::ArrowUp => s.push_str("Up"),
KbKey::ArrowDown => s.push_str("Down"),
_ => s.push_str(&format!("{:?}", key.key)),
_ => write!(s, "{}", key.key)
.unwrap_or_else(|err| tracing::warn!("Failed to convert hotkey to string: {}", err)),
}
}