mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
apprt/gtk: create the tab overview even if gtk-titlebar=false (#3940)
self.isAdwWindow() obscures that check a bit.
This commit is contained in:
@ -124,8 +124,8 @@ pub fn init(self: *Window, app: *App) !void {
|
|||||||
// Setup our notebook
|
// Setup our notebook
|
||||||
self.notebook = Notebook.create(self);
|
self.notebook = Notebook.create(self);
|
||||||
|
|
||||||
// If we are using an AdwWindow then we can support the tab overview.
|
// If we are using Adwaita, then we can support the tab overview.
|
||||||
self.tab_overview = if (self.isAdwWindow()) overview: {
|
self.tab_overview = if ((comptime adwaita.versionAtLeast(1, 3, 0)) and adwaita.enabled(&self.app.config) and adwaita.versionAtLeast(1, 3, 0)) overview: {
|
||||||
const tab_overview = c.adw_tab_overview_new();
|
const tab_overview = c.adw_tab_overview_new();
|
||||||
c.adw_tab_overview_set_view(@ptrCast(tab_overview), self.notebook.adw_tab_view);
|
c.adw_tab_overview_set_view(@ptrCast(tab_overview), self.notebook.adw_tab_view);
|
||||||
c.adw_tab_overview_set_enable_new_tab(@ptrCast(tab_overview), 1);
|
c.adw_tab_overview_set_enable_new_tab(@ptrCast(tab_overview), 1);
|
||||||
@ -250,7 +250,7 @@ pub fn init(self: *Window, app: *App) !void {
|
|||||||
|
|
||||||
// If we have a tab overview then we can set it on our notebook.
|
// If we have a tab overview then we can set it on our notebook.
|
||||||
if (self.tab_overview) |tab_overview| {
|
if (self.tab_overview) |tab_overview| {
|
||||||
if (comptime !adwaita.versionAtLeast(1, 4, 0)) unreachable;
|
if (comptime !adwaita.versionAtLeast(1, 3, 0)) unreachable;
|
||||||
assert(self.notebook == .adw_tab_view);
|
assert(self.notebook == .adw_tab_view);
|
||||||
c.adw_tab_overview_set_view(@ptrCast(tab_overview), self.notebook.adw_tab_view);
|
c.adw_tab_overview_set_view(@ptrCast(tab_overview), self.notebook.adw_tab_view);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user