aboutsummaryrefslogtreecommitdiff
path: root/sway/layout.c
AgeCommit message (Collapse)Author
2017-03-19Prevent "move next" and "move prev" commands from crashingJarkko Oranen
Fixes #1120 When the parent of a view is C_WORKSPACE and the movement direction is either MOVE_PREV or MOVE_NEXT, the code would attempt to move the views to the next output, but swayc_adjacent_output can't accept non-directional movement commands and causes undefined behaviour and a segfault. If the code is simply skipped, we end up in an infinite loop. Instead, we can allow containers whose parent is a C_WORKSPACE take the path that handles MOVE_PREV and MOVE_NEXT, which behaves as you would expect. I'm not certain that this fix is entirely correct as the desired behaviour of move_container is not very well defined, but it seems to work.
2017-03-10UnGNUify the codebaseDrew DeVault
2017-03-01i3 feature support: Moving flotaing containersCalvin Lee
This commit lets the 'move' command apply to floating containers as well as tiled ones. The command may be appended with a number of pixels and then optionally the string `px` (like '10 px') in order to move the container more or fewer than the standard ten pixels.
2017-01-14[fix] handle auto layout of empty containerwil
2017-01-14Improved behavior of insert/remove child in auto layoutswil
Previous implementation would not preserve dimension of groups along the major axis. This should avoid weird behavior when using container motion commands.
2017-01-14Merge branch 'master' into masterwillakat
2017-01-12Implement hide_edge_borders smart (like in i3 4.13)Frantisek Fladung
2017-01-08fixed up space-after-cast style issueswil
2017-01-08Indent cleanupswil
2017-01-08[fix] Keep Clang happywil
2017-01-07Added mouse resize for auto layoutswil
2017-01-07simplification of apply_auto_layoutwil
Achieved by introducing auto_group_bounds function that produces the start/end indexes of a group inside an auto layot container.
2017-01-07[fix] scale check to prevent un-necessary layouts was in the wrong place.wil
2017-01-07[fix] corner cases win nb_children < nb_master|nb_colwil
2017-01-07Moved auto_* layout functions from resize.c to layout.cwil
2017-01-01Merge branch 'master' of https://github.com/willakat/swaywil
2017-01-01[fix] cleanups suggested by Sway communitywil
2017-01-01changed "layout promote" command to "move first"wil
This is more consistent with other Sway semantics.
2017-01-01Fix inline is_auto_layoutDrew DeVault
2016-12-29[fix] move next/prev behavior for vert/horiz layoutwil
2016-12-29introduce next/prev as a direction for focus/move commands.wil
2016-12-29[fix] handle cases where nb_master > children->length in auto layoutwil
2016-12-29Added Awesome/Monad type "auto" layoutswil
2016-12-04wrap some views under workspacesD.B
If workspace layout is set to tabbed or stacked, its C_VIEW children should get wrapped in a container. Alongside that, move_container was modified to retain previous functionality.
2016-12-04add workspace_layout to containerD.B
Add swayc_change_layout function, which changes either layout or workspace_layout, depending on the container type.
2016-10-12Revert "Fixes dealing with workspace_layout and related bugs [rfc]"Drew DeVault
2016-10-11generalize wrapping views under workspacesD.B
2016-10-11add workspace_layout, ensure ws is always L_HORIZD.B
Add swayc_change_layout function, which changes either layout or workspace_layout, depending on the container type. Workspace being always L_HORIZ makes this much more i3-compatible.
2016-10-07Fix creating of sibling floating/childrenNicolas Cornu
If we want to add a sibling of different type than current container it failed. Because we add it to the wrong list
2016-10-07add focus changing between floating containersD.B
It will also wrap if needed.
2016-10-07add force_focus_wrapping optionD.B
2016-10-07wrap container in direction (if possible)D.B
Introduces container wrapping - if there is no other viable move, the selection wraps on the first container where such action is possible.
2016-09-21add unique IDs to containersZandr Martin
2016-09-17add global `current_focus` pointerZandr Martin
2016-09-05Make it possible to move views between outputsMikkel Oscar Lyderik
This patch makes it possible to move views between outputs using the `move left|right|up|down` commands. It behaves similar to i3 with one important difference. The focus will always follow the view being moved, unlike i3 where the focus doesn't always follow the view to a new output (I assume that's a bug in i3).
2016-09-02Correct `hide_edge_borders` commandLukas Lihotzki
`vertical` and `horizontal` should be swapped. If border_left and border_right were set to 0, the vertical borders instead of the horizontal borders would be hidden. i3 handles this command equally.
2016-09-01Reorganize includesDrew DeVault
2016-08-07Sort workspaces when moving workspace to outputD.B
This should fix #839
2016-07-31Refactor functions to update container bordersTony Crisci
Replace `update_view_border()` with `update_container_border()`. The latter should handle both the case where the container is a view or if the container has children.
2016-07-30revert border hiding to more recent versionD.B
2016-07-30properly hide top border inside tabbed/stackedD.B
When titlebar is hidden, top border of the topmost view inside tabbed/stacked container will not be drawn. This is changed in layout.c On the other hand, top border should be drawn sometimes, for example when titlebar is hidden on a view that is not the topmost inside tabbed/stacked container. This is changed in border.c
2016-07-28Update hidpi support to latest wlc APIDrew DeVault
2016-07-28Initial pass on HiDPI supportDrew DeVault
2016-07-28Merge pull request #793 from thejan2009/workspace_layout_first_window_fixDrew DeVault
bugfix: invisible windows on empty workspace with tabbed/stacked layout
2016-07-28bugfix: windows on empty workspaces with layout tabbed/stacked would spawn ↵D.B
with 0x0 geometry
2016-07-27Implement `focus child` commandTony Crisci
The `focus child` command focuses the child container within the selected container.
2016-07-22properly hide bottom and right bordersD.B
2016-07-21fix regression in hide_edge_bordersZandr Martin
2016-07-21rename ws to workspace for clarityD.B
2016-07-21calculate borders for hiding from workspace geometryD.B