mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 10:28:32 +00:00
fix(gtk): send key events directly to widgets (#3720)
The default behavior is to send them to the window first to activate mnemonics and accelerators. Some accelerators conflict with text selection hotkeys (like CTRL+A to select all torrents), this fixes that conflict.
This commit is contained in:
@@ -575,6 +575,14 @@ MainWindow::Impl::Impl(MainWindow& window, Glib::RefPtr<Gio::ActionGroup> const&
|
|||||||
this);
|
this);
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
|
|
||||||
|
/* prevent keyboard events being sent to the window first */
|
||||||
|
window.signal_key_press_event().connect(
|
||||||
|
[this](GdkEventKey* event) { return gtk_window_propagate_key_event(static_cast<Gtk::Window&>(window_).gobj(), event); },
|
||||||
|
false);
|
||||||
|
window.signal_key_release_event().connect(
|
||||||
|
[this](GdkEventKey* event) { return gtk_window_propagate_key_event(static_cast<Gtk::Window&>(window_).gobj(), event); },
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::Impl::updateStats()
|
void MainWindow::Impl::updateStats()
|
||||||
|
|||||||
Reference in New Issue
Block a user