pass search active state through blueprint

This commit is contained in:
rhodes-b
2026-03-08 15:57:28 -05:00
parent 8635fef7a5
commit 1d59f5dbcd
2 changed files with 4 additions and 11 deletions

View File

@@ -822,19 +822,12 @@ pub const Surface = extern struct {
/// Callback used to determine whether unfocused-split-fill / unfocused-split-opacity
/// should be applied to the surface
fn closureShouldUnfocusedSplitBeShown(
self: *Self,
_: *Self,
search_active: c_int,
focused: c_int,
is_split: c_int,
) callconv(.c) c_int {
const priv = self.private();
var val = gobject.ext.Value.new(bool);
defer val.unset();
gobject.Object.getProperty(
priv.search_overlay.as(gobject.Object),
SearchOverlay.properties.active.name,
&val,
);
return @intFromBool(val.getBoolean() == 0 and focused == 0 and is_split != 0);
return @intFromBool(search_active == 0 and focused == 0 and is_split != 0);
}
pub fn toggleFullscreen(self: *Self) void {

View File

@@ -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