Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree/container: use L_NONE for parent layout of floating container #5785

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Xyene
Copy link
Member

@Xyene Xyene commented Nov 2, 2020

The parent of a floating container is technically the workspace, but it
is incorrect to say that the parent layout of a floating container is
that of the workspace.

For instance, if the workspace layout is tabbed, a floating container
should not (and does not) show tab decorations. However, prior to this
commit, querying its parent layout would nonetheless return L_TABBED.

Fixes #5782.

@Xyene Xyene requested a review from RedSoxFan November 2, 2020 23:02
@Xyene
Copy link
Member Author

Xyene commented Nov 3, 2020

This approach would also remove the need to check container_is_floating here:

https://github.com/swaywm/sway/blob/master/sway/tree/view.c#L1260-L1262

Not entirely sure if it'd regress anything; I looked over all usages of container_is_floating, and no others seemed to be affected by this change.

The parent of a floating container is technically the workspace, but it
is incorrect to say that the parent layout of a floating container is
that of the workspace.

For instance, if the workspace layout is tabbed, a floating container
should not (and does not) show tab decorations. However, prior to this
commit, querying its parent layout would nonetheless return `L_TABBED`.

Fixes swaywm#5782.
@Xyene Xyene force-pushed the fix-scrolling-floating-tabs branch from ceff419 to 1c312c4 Compare November 3, 2020 05:26
Copy link
Member

@RedSoxFan RedSoxFan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only thing this breaks is focus prev|next on floating views. Since i3 does support that functionality, that will need to be fixed before this can get merged.

This does change splitt on a floating view to always be L_VERT, but splith and splitv exist so I think that should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Sway crashes when scrolling mouse wheel on a floating window title bar (layout=tabbed)
2 participants