[gnome-games/wip/aplazas/gamepad-navigation: 2/7] collection-icon-view: Mute gamepad events when not mapped
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/aplazas/gamepad-navigation: 2/7] collection-icon-view: Mute gamepad events when not mapped
- Date: Sun, 5 Aug 2018 13:07:46 +0000 (UTC)
commit 81345bdd1fa39546d9b29d8b2d0069b8388622ea
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sun Aug 5 09:05:16 2018 +0200
collection-icon-view: Mute gamepad events when not mapped
Also cancels the cursor movement when unmapped.
src/ui/collection-icon-view.vala | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/ui/collection-icon-view.vala b/src/ui/collection-icon-view.vala
index 0ff2d230..8f435e7f 100644
--- a/src/ui/collection-icon-view.vala
+++ b/src/ui/collection-icon-view.vala
@@ -85,10 +85,11 @@ private class Games.CollectionIconView : Gtk.Stack {
flow_box.max_children_per_line = uint.MAX;
flow_box.set_filter_func (filter_box);
flow_box.set_sort_func (sort_boxes);
+ unmap.connect (cancel_cursor_movement);
}
public bool gamepad_button_press_event (Manette.Event event) {
- if (!visible)
+ if (!get_mapped ())
return false;
uint16 button;
@@ -118,7 +119,7 @@ private class Games.CollectionIconView : Gtk.Stack {
}
public bool gamepad_button_release_event (Manette.Event event) {
- if (!visible)
+ if (!get_mapped ())
return false;
uint16 button;
@@ -156,7 +157,7 @@ private class Games.CollectionIconView : Gtk.Stack {
}
public bool gamepad_absolute_axis_event (Manette.Event event) {
- if (!visible)
+ if (!get_mapped ())
return false;
uint16 axis;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]