mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
GTK: Don't apply unfocused options when searching (#11224)
If you have multiple splits and start searching naturally the focus transfers over to the search widget which would apply the unfocused options. This could make it difficult to view your matches from searching without re-focusing the surface. This was discovered when I tested https://github.com/ghostty-org/ghostty/discussions/11218 (which is a different issue)
This commit is contained in:
@@ -823,10 +823,11 @@ pub const Surface = extern struct {
|
||||
/// should be applied to the surface
|
||||
fn closureShouldUnfocusedSplitBeShown(
|
||||
_: *Self,
|
||||
search_active: c_int,
|
||||
focused: c_int,
|
||||
is_split: c_int,
|
||||
) callconv(.c) c_int {
|
||||
return @intFromBool(focused == 0 and is_split != 0);
|
||||
return @intFromBool(search_active == 0 and focused == 0 and is_split != 0);
|
||||
}
|
||||
|
||||
pub fn toggleFullscreen(self: *Self) void {
|
||||
|
||||
@@ -203,7 +203,7 @@ 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(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
|
||||
|
||||
Reference in New Issue
Block a user