aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-28Fix gaps issuesRyan Dwyer
* In layout command, arrange parent of parent - not sure why this is needed but it is * Remove gap adjustment when rendering * Workspace should use outer gaps, not inner * Add exceptions for tabbed and stacked containers * Don't mess with gap state when splitting a container
2018-08-28Prepare arrange code for type safe argumentsRyan Dwyer
This commit changes the arrange code in a way that will support type safe arguments. The arrange_output et al functions are now public, however I opted not to use them directly yet. I've kept the generic arrange_windows there for convenience until type safety is fully implemented. This means this patch has much less risk of breaking things as it would otherwise. To be type safe, arrange_children_of cannot exist in its previous form because the thing passed to it could be either a workspace or a container. So it's now renamed to arrange_children and accepts a list_t, as well as the parent layout and parent's box. There was some code which checked the grandparent's layout to see if it was tabbed or stacked and adjusted the Y offset of the grandchild accordingly. Accessing the grandparent layout isn't easy when using type safe arguments, and it seemed odd to even need to do this. I determined that this was needed because a child of a tabbed container would have a swayc Y matching the top of the tab bar. I've changed this so a child of a tabbed container will have a swayc Y matching the bottom of the tab bar, which means we don't need to access the grandparent layout. Some tweaks to the rendering and autoconfigure code have been made to implement this, and the container_at code appears to work without needing any changes. arrange_children_of (now arrange_children) would check if the parent had gaps and would copy them to the child, effectively making the workspace's gaps recurse into all children. We can't do this any more without passing has_gaps, gaps_inner and gaps_outer as arguments to arrange_children, so I've changed the add_gaps function to retrieve it from the workspace directly. apply_tabbed_or_stacked_layout has been split into two functions, as it had different logic depending on the layout. Lastly, arrange.h had an unnecessary include of transaction.h. I've removed it, which means I've had to add it to several other files.
2018-08-27Merge pull request #2523 from RedSoxFan/fix-floating-drag-outputsDrew DeVault
Stop floaters from snapping on move to new output
2018-08-27Merge pull request #2494 from RyanDwyer/fix-overflowing-subsurfacesDrew DeVault
Allow subsurfaces which overflow the container to be interacted with
2018-08-27Merge pull request #2520 from RedSoxFan/destroy-empty-ws-on-evacDrew DeVault
Destroy empty workspaces in output_evacuate
2018-08-27Merge pull request #2519 from ianyfan/set-focus-cleanupDrew DeVault
seat.c: clean-up seat_set_focus_warp function
2018-08-27seat.c: clean-up seat_set_focus_warp functionIan Fan
2018-08-27Merge pull request #2522 from ascent12/build_fixDrew DeVault
Build fix
2018-08-27Stop floaters from snapping on move to new outputBrian Ashworth
2018-08-27Initialise variable properlyScott Anderson
2018-08-27Hide deprecated wayland functionsScott Anderson
2018-08-27Destroy empty workspaces in output_evacuateBrian Ashworth
2018-08-26Merge pull request #2518 from ianyfan/ipcBrian Ashworth
Emit window close event earlier, before destroying
2018-08-26ipc: clean-up container_create_notify functionIan Fan
2018-08-26ipc: emit window close event earlier, before destroyingIan Fan
2018-08-26Merge pull request #2517 from fokditkak/add_fish_completionDrew DeVault
Add fish completion
2018-08-26added fish to meson.buildMartin Kalchev
2018-08-26added untested filesMartin Kalchev
2018-08-26Merge pull request #2513 from RyanDwyer/rename-root-outputsDrew DeVault
Rename sway_root.outputs to sway_root.all_outputs
2018-08-26Merge pull request #2515 from RyanDwyer/remove-layout-fileDrew DeVault
Remove layout.c
2018-08-26Remove layout.cRyan Dwyer
When we have type safety we'll need to have functions for workspace_add_tiling and so on. This means the existing container functions will be just for containers, so they are being moved to container.c. At this point layout.c doesn't contain much else, so I've relocated everything and removed the file. * container_swap and its static functions have been moved to the swap command and made static. * container_recursive_resize has been moved to the resize command and made static. * The following have been moved to container.c: * container_handle_fullscreen_reparent * container_insert_child * container_add_sibling * container_add_child * container_remove_child * container_replace_child * container_split * enum movement_direction and sway_dir_to_wlr have been moved to util.c. Side note: Several commands included layout.h which then included root.h. With layout.h gone, root.h has to be included by those commands.
2018-08-25Merge pull request #2488 from RyanDwyer/separate-gaps-functionsDrew DeVault
Make separate gaps functions per container type
2018-08-26Make separate gaps functions per container typeRyan Dwyer
In preparation for using type safety.
2018-08-25Merge pull request #2512 from apreiml/workspace_move_wrapBrian Ashworth
Workspace move cycle
2018-08-25Workspace move cycleArmin Preiml
On move workspace to direction: Try the farthest on the opposite direction if no workspace is found at given direction.
2018-08-25Add comment for sway_root.all_outputsRyan Dwyer
2018-08-25Rename sway_root.outputs to sway_root.all_outputsRyan Dwyer
This list includes disabled outputs. When sway_container is demoted, we'll need to store the root's children (ie. enabled outputs) in the sway_root. It makes sense to put these in a list called `outputs`, so I'm renaming the existing list in advance.
2018-08-25Merge pull request #2510 from RyanDwyer/relocate-layout-functionsDrew DeVault
Relocate container_move, container_move_to and container_get_in_direction
2018-08-25Merge pull request #2495 from ianyfan/commandsRyan Dwyer
commands: implement move absolute
2018-08-25Merge branch 'master' into commandsRyan Dwyer
2018-08-25Relocate container_move, container_move_to and container_get_in_directionRyan Dwyer
* container_move is only called from the move command * container_move_to was called from both the move command and the sticky command, but the sticky command can easily not call it * container_get_in_direction is only called from the focus command Moving these functions to their respective commands gives better separation of code and removes bloat from layout.c. These functions will need to be refactored to take advantage of type safety, so separating them will make this easier to refactor. The following static functions have also been moved: * is_parellel * invert_movement * move_offs * container_limit * workspace_rejigger * move_out_of_tabs_stacks * get_swayc_in_output_direction They were all used by the move functions, except for the last one which is used by focus. Other changes: * index_child has been renamed to container_sibling_index, moved to container.c and made public * sway_output_from_wlr has been renamed to output_from_wlr_output, moved to output.c and made public * container_handle_fullscreen_reparent has been made public * sway_dir_to_wlr has been made public No changes have been made to any of the moved functions, other than updating calls to functions that have been renamed.
2018-08-24Merge pull request #2499 from RyanDwyer/refactor-destroy-functionsDrew DeVault
Refactor destroy functions and save workspaces when there's no outputs
2018-08-24Refactor destroy functions and save workspaces when there's no outputsRyan Dwyer
This changes the destroy functions to the following: * output_begin_destroy * output_destroy * workspace_begin_destroy * workspace_destroy * container_begin_destroy * container_destroy * view_begin_destroy * view_destroy The terminology was `destroy` and `free`, and it has been changed to `begin_destroy` and `destroy` respectively. When the last output is disconnected, its workspaces will now be stashed in the root. Upon connection of a new output they will be restored. There is a new function `workspace_consider_destroy` which decides whether the given workspace should be destroyed or not (ie. empty and not visible). Calling container_begin_destroy will no longer automatically reap the parents. In some places we want to reap the parents and in some we don't, so this is left to the caller. container_reap_empty_recursive and container_reap_empty have been combined into one function and it will recurse up the tree.
2018-08-22Merge pull request #2470 from ianyfan/completionsemersion
[WIP?] Fix zsh completions
2018-08-22Merge pull request #2507 from RyanDwyer/move-workspace-translate-floatingemersion
Translate floating containers when a workspace is moved
2018-08-22Merge pull request #2506 from vilhalmer/ipc-get_tree-return-app_id-and-classemersion
Add app_id and class to get_tree output
2018-08-22Translate floating containers when a workspace is movedRyan Dwyer
When a workspace is moved to another output, or the output it's on changes its global layout position, the floating containers on that workspace should be translated by the same amount as the workspace. This keeps the floating containers in the same position relative to the workspace. A check is done to make sure the floating container's center point isn't being moved off screen. If it is, it is centered within the workspace. Fixes part of #2500.
2018-08-21Add app_id and class to get_tree outputvilhalmer
2018-08-21Merge pull request #2505 from RyanDwyer/fix-set-fullscreenDrew DeVault
Fix sending fullscreen event to view
2018-08-22Fix sending fullscreen event to viewRyan Dwyer
Fixes #2504
2018-08-20Merge pull request #2503 from RyanDwyer/use-wlr-edgesBrian Ashworth
Replace enum resize_edge with wlr_edges
2018-08-21Replace enum resize_edge with wlr_edgesRyan Dwyer
2018-08-20Merge pull request #2502 from minus7/workspace-namesDrew DeVault
Improve new workspace name selection
2018-08-20Improve new workspace name selectionminus
Improves upon 18e425ed by using the first assigned workspace instead of the last one. The order isn't explicitly guaranteed to be the same as in the config, but in general works.
2018-08-20Merge pull request #2501 from RedSoxFan/fix-bad-free-swaynagDrew DeVault
Fix bad-free in swaynag
2018-08-20Fix bad-free in swaynagBrian Ashworth
2018-08-20commands: implement move absoluteIan Fan
2018-08-20Merge pull request #2498 from RyanDwyer/fix-jumping-viewsemersion
Fix jumping views
2018-08-20Fix jumping viewsRyan Dwyer
Fixes #2490. To be honest I'm not sure why this fixes the issue. I observed that I could only make the view jump if I resized it to the smallest possible size first. Then I had a suspicion that we were accidentally factoring in the title and border sizes into the view size when it uses CSD. So I changed that and it appears to have fixed the jumping issue. I guess when we factor the title and borders in, we send a configure to the surface with a size smaller than the minimum, and it comes back with a surface at the minimum size. We interpret this as an unexpected resize, and this somehow makes it jump.
2018-08-19Merge pull request #2483 from RyanDwyer/floating-emit-reparentDrew DeVault
Send enter/leave events for floating views