aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/apprt/gtk/ui
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/apprt/gtk/ui
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/apprt/gtk/ui')
-rw-r--r--vendor/libghostty-vt/src/apprt/gtk/ui/1.2/config-errors-dialog.blp4
-rw-r--r--vendor/libghostty-vt/src/apprt/gtk/ui/1.2/search-overlay.blp7
-rw-r--r--vendor/libghostty-vt/src/apprt/gtk/ui/1.2/surface.blp72
-rw-r--r--vendor/libghostty-vt/src/apprt/gtk/ui/1.5/tab.blp9
-rw-r--r--vendor/libghostty-vt/src/apprt/gtk/ui/1.5/window.blp37
5 files changed, 114 insertions, 15 deletions
diff --git a/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/config-errors-dialog.blp b/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/config-errors-dialog.blp
index 845909eb..77c71ede 100644
--- a/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/config-errors-dialog.blp
+++ b/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/config-errors-dialog.blp
@@ -4,7 +4,9 @@ using Adw 1;
template $GhosttyConfigErrorsDialog: $GhosttyDialog {
heading: _("Configuration Errors");
- body: _("One or more configuration errors were found. Please review the errors below, and either reload your configuration or ignore these errors.");
+ body: _(
+ "One or more configuration errors were found. Please review the errors below, and either reload your configuration or ignore these errors."
+ );
responses [
ignore: _("Ignore"),
diff --git a/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/search-overlay.blp b/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/search-overlay.blp
index 6523d414..8ab2e310 100644
--- a/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/search-overlay.blp
+++ b/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/search-overlay.blp
@@ -46,7 +46,12 @@ template $GhosttySearchOverlay: Adw.Bin {
"dim-label",
]
- label: bind $match_label_closure(template.has-search-selected, template.search-selected, template.has-search-total, template.search-total) as <string>;
+ label: bind $match_label_closure(
+ template.has-search-selected,
+ template.search-selected,
+ template.has-search-total,
+ template.search-total
+ ) as <string>;
width-chars: 6;
xalign: 1.0;
}
diff --git a/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/surface.blp b/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/surface.blp
index 2ae0a347..010798ae 100644
--- a/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/surface.blp
+++ b/vendor/libghostty-vt/src/apprt/gtk/ui/1.2/surface.blp
@@ -1,4 +1,5 @@
using Gtk 4.0;
+using Gdk 4.0;
using Adw 1;
Adw.StatusPage error_page {
@@ -96,7 +97,9 @@ Overlay terminal_page {
// TODO: the tooltip doesn't actually work, but keep it here for now so
// that we can get the tooltip text translated.
has-tooltip: true;
- tooltip-text: _("This terminal is in read-only mode. You can still view, select, and scroll through the content, but no input events will be sent to the running application.");
+ tooltip-text: _(
+ "This terminal is in read-only mode. You can still view, select, and scroll through the content, but no input events will be sent to the running application."
+ );
halign: end;
valign: start;
spacing: 6;
@@ -205,7 +208,11 @@ Overlay terminal_page {
// Apply unfocused-split-fill and unfocused-split-opacity to current surface
// this is only applied when a tab has more than one surface
Revealer {
- reveal-child: bind $should_unfocused_split_be_shown(search_overlay.active, template.focused, template.is-split) as <bool>;
+ reveal-child: bind $should_unfocused_split_be_shown(
+ search_overlay.active,
+ template.focused,
+ template.is-split
+ ) as <bool>;
transition-duration: 0;
// This is all necessary so that the Revealer itself doesn't override
// any input events from the other overlays. Namely, if you don't have
@@ -221,10 +228,57 @@ Overlay terminal_page {
}
}
+ [overlay]
+ CenterBox drag_handle {
+ halign: fill;
+ valign: start;
+ visible: bind $should_drag_handle_be_shown(template.config, template.is-split) as <bool>;
+
+ styles [
+ "drag-handle",
+ ]
+
+ [center]
+ Image {
+ icon-name: "view-more-horizontal-symbolic";
+ }
+
+ DragSource surface_drag_source {
+ actions: move;
+ prepare => $surface_drag_prepare();
+ drag-begin => $surface_drag_begin();
+ }
+ }
+
+ [overlay]
+ DrawingArea drop_overlay {
+ halign: fill;
+ valign: fill;
+ can-focus: false;
+ can-target: false;
+ focusable: false;
+
+ styles [
+ "drop-overlay",
+ ]
+ }
+
DropTarget drop_target {
drop => $drop();
actions: copy | move;
}
+
+ DropTarget surface_drop_target {
+ // Enabling preload is required since that lets us know
+ // which surface is currently being dragged, and to turn off
+ // the drop overlay if the source and target are the same
+ preload: true;
+ leave => $surface_drop_leave();
+ motion => $surface_drop_motion();
+ drop => $surface_drop();
+ notify::value => $notify_drop_value();
+ actions: move;
+ }
}
template $GhosttySurface: Adw.Bin {
@@ -349,6 +403,11 @@ menu context_menu_model {
label: _("Window");
item {
+ label: _("Change Window Title…");
+ action: "win.prompt-window-title";
+ }
+
+ item {
label: _("New Window");
action: "win.new-window";
}
@@ -365,8 +424,15 @@ menu context_menu_model {
label: _("Config");
item {
- label: _("Open Configuration");
+ label: _("Open Configuration in OS Editor");
+ action: "app.open-config";
+ target: "os-open";
+ }
+
+ item {
+ label: _("Open Configuration in New Window");
action: "app.open-config";
+ target: "new-window";
}
item {
diff --git a/vendor/libghostty-vt/src/apprt/gtk/ui/1.5/tab.blp b/vendor/libghostty-vt/src/apprt/gtk/ui/1.5/tab.blp
index 55f2e7ef..21a30bec 100644
--- a/vendor/libghostty-vt/src/apprt/gtk/ui/1.5/tab.blp
+++ b/vendor/libghostty-vt/src/apprt/gtk/ui/1.5/tab.blp
@@ -8,7 +8,14 @@ template $GhosttyTab: Box {
orientation: vertical;
hexpand: true;
vexpand: true;
- title: bind $computed_title(template.config, split_tree.active-surface as <$GhosttySurface>.title, split_tree.active-surface as <$GhosttySurface>.title-override, template.title-override, split_tree.is-zoomed, split_tree.active-surface as <$GhosttySurface>.bell-ringing) as <string>;
+ title: bind $computed_title(
+ template.config,
+ split_tree.active-surface as <$GhosttySurface>.title,
+ split_tree.active-surface as <$GhosttySurface>.title-override,
+ template.title-override,
+ split_tree.is-zoomed,
+ split_tree.active-surface as <$GhosttySurface>.bell-ringing
+ ) as <string>;
tooltip: bind split_tree.active-surface as <$GhosttySurface>.pwd;
$GhosttySplitTree split_tree {
diff --git a/vendor/libghostty-vt/src/apprt/gtk/ui/1.5/window.blp b/vendor/libghostty-vt/src/apprt/gtk/ui/1.5/window.blp
index b66a9309..32d1bf37 100644
--- a/vendor/libghostty-vt/src/apprt/gtk/ui/1.5/window.blp
+++ b/vendor/libghostty-vt/src/apprt/gtk/ui/1.5/window.blp
@@ -40,14 +40,17 @@ template $GhosttyWindow: Adw.ApplicationWindow {
visible: bind template.headerbar-visible;
title-widget: Adw.WindowTitle {
- title: bind template.title;
+ title: bind $computed_title(template.config, template.title, template.title-override) as <string>;
// Blueprint auto-formatter won't let me split this into multiple
// lines. Let me explain myself. All parameters to a closure are used
// as notifications to recompute the value of the closure. All
// elements of a property chain are also subscribed to for changes.
// This one long, ugly line saves us from manually building up this
// massive notify chain in code.
- subtitle: bind $computed_subtitle(template.config, tab_view.selected-page.child as <$GhosttyTab>.active-surface as <$GhosttySurface>.pwd) as <string>;
+ subtitle: bind $computed_subtitle(
+ template.config,
+ tab_view.selected-page.child as <$GhosttyTab>.active-surface as <$GhosttySurface>.pwd
+ ) as <string>;
};
[start]
@@ -209,6 +212,11 @@ menu main_menu {
section {
item {
+ label: _("Change Window Title…");
+ action: "win.prompt-window-title";
+ }
+
+ item {
label: _("New Window");
action: "win.new-window";
}
@@ -291,14 +299,25 @@ menu main_menu {
action: "win.toggle-inspector";
}
- item {
- label: _("Open Configuration");
- action: "app.open-config";
- }
+ submenu {
+ label: _("Config");
- item {
- label: _("Reload Configuration");
- action: "app.reload-config";
+ item {
+ label: _("Open Configuration in OS Editor");
+ action: "app.open-config";
+ target: "os-open";
+ }
+
+ item {
+ label: _("Open Configuration in New Window");
+ action: "app.open-config";
+ target: "new-window";
+ }
+
+ item {
+ label: _("Reload Configuration");
+ action: "app.reload-config";
+ }
}
}