Skip to content

Commit 7b2ec63

Browse files
committed
Fix gestures
1 parent f6cb8e9 commit 7b2ec63

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/AbstractBubble.vala

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ public class Notifications.AbstractBubble : Gtk.Window {
7777
halign = Gtk.Align.END,
7878
hexpand = true
7979
};
80-
carousel.append (revealer);
8180
carousel.append (new Gtk.Grid ());
81+
carousel.append (revealer);
82+
carousel.scroll_to (revealer, false);
8283

8384
child = carousel;
8485
default_height = 0;
@@ -89,8 +90,11 @@ public class Notifications.AbstractBubble : Gtk.Window {
8990
can_focus = false;
9091
set_titlebar (new Gtk.Grid ());
9192

92-
// we have only one real page, so we don't need to check the index
93-
carousel.page_changed.connect (() => closed (Notifications.Server.CloseReason.DISMISSED));
93+
carousel.page_changed.connect ((index) => {
94+
if (index == 0) {
95+
closed (Notifications.Server.CloseReason.DISMISSED);
96+
}
97+
});
9498
close_button.clicked.connect (() => closed (Notifications.Server.CloseReason.DISMISSED));
9599
closed.connect (close);
96100

0 commit comments

Comments
 (0)