workspaces: derive trail width only from a live button; wire the launcher hotkey
Two fixes. The trail pill still grew when spamming between workspace 1 and an empty 6. Switching to an empty workspace makes Hyprland create and destroy it, which rebuilds the button row mid-animation and leaves the source button detached — button_geom then returned None and the fallback handed the wide mid-stretch span straight back in, reintroducing exactly the accumulation the previous commit removed. Width now falls back to the destination button, which is always live, and no path returns the live width any more. Separately, AppInput::OpenLauncher's local arm only called grab_focus(). Focus stopped opening the capsule when connect_enter's open_fn() call was removed (that call was what opened the capsule during window construction), so the keybind focused the entry and left the drawer shut. It now invokes launcher_open_fn, which was added for this and never read — the dead-code warning on that field is what surfaced it.
This commit is contained in:
parent
42d5acb736
commit
1b523eab63
2 changed files with 26 additions and 5 deletions
|
|
@ -1915,6 +1915,13 @@ impl SimpleComponent for App {
|
|||
// below is a silent no-op.
|
||||
self.launcher_entry.set_can_focus(true);
|
||||
self.launcher_entry.grab_focus();
|
||||
// ...and then actually OPEN it. Focus alone no longer
|
||||
// opens the capsule: `connect_enter` used to call
|
||||
// `open_fn()`, which is precisely what made the capsule
|
||||
// open itself during window construction, so that path
|
||||
// was deliberately removed. Without this call the
|
||||
// keybind focuses the entry and leaves the drawer shut.
|
||||
(self.launcher_open_fn)();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue