Open vicencb opened 1 year ago
This fixes the issue, but
i don't know the meaning of view->container->pending.parent
and
no extensive tests performed, so,
please, review.
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -639,7 +639,7 @@ static bool should_focus(struct sway_view *view) {
// If the view is the only one in the focused workspace, it'll get focus
// regardless of any no_focus criteria.
- if (!view->container->pending.parent && !prev_con) {
+ if (!prev_con) {
size_t num_children = view->container->pending.workspace->tiling->length +
view->container->pending.workspace->floating->length;
if (num_children == 1) {
Sway Version: 1.7
Configuration File: workspace_layout tabbed no_focus [title=".*"] bindsym Mod4+t exec foot bindsym Mod4+Tab focus next
Description: The expected behaviour of no_focus is as stated in the man page: "has no effect on the first window in a workspace". The actual behaviour is that none of the first windows created have focus, although they are all decorated like having focus. Also, focus can not be switched between windows with the keyboard. The only workaround found so far is by moving the mouse cursor. This issue happens with the tabbed layout. Once there is a window with focus, then it works as expected: no new windows will take focus away of the currently focused one and changing focus manually works.