[libadwaita/wip/exalm/escape: 9/11] 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: 9/11] tab-overview: Gracefully handle pressing Esc with no tabs open
- Date: Sun, 18 Sep 2022 23:12:16 +0000 (UTC)
commit faa9d48b3afdc96219853b3b0c64b8f9c95da0a9
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]