[libadwaita/wip/exalm/escape: 1/3] tab-overview: Gracefully handle pressing Esc with no tabs open
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/escape: 1/3] tab-overview: Gracefully handle pressing Esc with no tabs open
- Date: Sun, 18 Sep 2022 23:08:38 +0000 (UTC)
commit 39efb2bd81b32225292c73b1908a9044f7b79c89
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sat Sep 17 20:52:59 2022 +0400
tab-overview: Gracefully handle pressing Esc with no tabs open
src/adw-tab-overview.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/adw-tab-overview.c b/src/adw-tab-overview.c
index ef7a0f4b..238deabc 100644
--- a/src/adw-tab-overview.c
+++ b/src/adw-tab-overview.c
@@ -1440,7 +1440,15 @@ escape_cb (AdwTabOverview *self)
return GDK_EVENT_STOP;
}
+ if (!adw_tab_view_get_n_pages (self->view)) {
+ AdwTabPage *page = create_tab (self);
+
+ if (!page)
+ return GDK_EVENT_PROPAGATE;
+ }
+
adw_tab_overview_set_open (self, FALSE);
+
return GDK_EVENT_STOP;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]