Skip to content

Commit

Permalink
fix linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhou121 committed Oct 24, 2023
1 parent d7a9356 commit 6fbaf7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/window_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,7 @@ fn context_menu_view(

use crate::{
app::{add_app_update_event, AppUpdateEvent},
keyboard::NamedKey,
views::{empty, list, svg, text},
};

Expand Down Expand Up @@ -1174,7 +1175,7 @@ fn context_menu_view(
})
.on_event(EventListener::KeyDown, move |event| {
if let Event::KeyDown(event) = event {
if event.key.logical_key == Key::Escape {
if event.key.logical_key == Key::Named(NamedKey::Escape) {
context_menu.set(None);
}
}
Expand Down Expand Up @@ -1240,7 +1241,7 @@ fn context_menu_view(
.keyboard_navigatable()
.on_event(EventListener::KeyDown, move |event| {
if let Event::KeyDown(event) = event {
if event.key.logical_key == Key::Escape {
if event.key.logical_key == Key::Named(NamedKey::Escape) {
context_menu.set(None);
}
}
Expand Down

0 comments on commit 6fbaf7e

Please sign in to comment.