summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* Merge pull request #2512 from apreiml/workspace_move_wrapLibravatar Brian Ashworth2018-08-25
|\ | | | | Workspace move cycle
| * Workspace move cycleLibravatar Armin Preiml2018-08-25
|/ | | | | On move workspace to direction: Try the farthest on the opposite direction if no workspace is found at given direction.
* Merge pull request #2510 from RyanDwyer/relocate-layout-functionsLibravatar Drew DeVault2018-08-25
|\ | | | | Relocate container_move, container_move_to and container_get_in_direction
| * Relocate container_move, container_move_to and container_get_in_directionLibravatar Ryan Dwyer2018-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Merge pull request #2495 from ianyfan/commandsLibravatar Ryan Dwyer2018-08-25
|\ \ | |/ |/| commands: implement move absolute
| * Merge branch 'master' into commandsLibravatar Ryan Dwyer2018-08-25
| |\ | |/ |/|
* | Merge pull request #2499 from RyanDwyer/refactor-destroy-functionsLibravatar Drew DeVault2018-08-24
|\ \ | | | | | | Refactor destroy functions and save workspaces when there's no outputs
| * | Refactor destroy functions and save workspaces when there's no outputsLibravatar Ryan Dwyer2018-08-24
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #2470 from ianyfan/completionsLibravatar emersion2018-08-22
|\ \ | | | | | | [WIP?] Fix zsh completions
| * | Fix swaylock zsh completionsLibravatar Ian Fan2018-08-16
| | |
* | | Merge pull request #2507 from RyanDwyer/move-workspace-translate-floatingLibravatar emersion2018-08-22
|\ \ \ | | | | | | | | Translate floating containers when a workspace is moved
| * | | Translate floating containers when a workspace is movedLibravatar Ryan Dwyer2018-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #2506 from vilhalmer/ipc-get_tree-return-app_id-and-classLibravatar emersion2018-08-22
|\ \ \ \ | |/ / / |/| | | Add app_id and class to get_tree output
| * | | Add app_id and class to get_tree outputLibravatar vilhalmer2018-08-21
|/ / /
* | | Merge pull request #2505 from RyanDwyer/fix-set-fullscreenLibravatar Drew DeVault2018-08-21
|\ \ \ | | | | | | | | Fix sending fullscreen event to view
| * | | Fix sending fullscreen event to viewLibravatar Ryan Dwyer2018-08-22
|/ / / | | | | | | | | | Fixes #2504
* | | Merge pull request #2503 from RyanDwyer/use-wlr-edgesLibravatar Brian Ashworth2018-08-20
|\ \ \ | | | | | | | | Replace enum resize_edge with wlr_edges
| * | | Replace enum resize_edge with wlr_edgesLibravatar Ryan Dwyer2018-08-21
|/ / /
* | | Merge pull request #2502 from minus7/workspace-namesLibravatar Drew DeVault2018-08-20
|\ \ \ | | | | | | | | Improve new workspace name selection
| * | | Improve new workspace name selectionLibravatar minus2018-08-20
|/ / / | | | | | | | | | | | | | | | 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.
* | | Merge pull request #2501 from RedSoxFan/fix-bad-free-swaynagLibravatar Drew DeVault2018-08-20
|\ \ \ | | | | | | | | Fix bad-free in swaynag
| * | | Fix bad-free in swaynagLibravatar Brian Ashworth2018-08-20
|/ / /
| | * commands: implement move absoluteLibravatar Ian Fan2018-08-20
| |/ |/|
* | Merge pull request #2498 from RyanDwyer/fix-jumping-viewsLibravatar emersion2018-08-20
|\ \ | | | | | | Fix jumping views
| * | Fix jumping viewsLibravatar Ryan Dwyer2018-08-20
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #2483 from RyanDwyer/floating-emit-reparentLibravatar Drew DeVault2018-08-19
|\ \ | | | | | | Send enter/leave events for floating views
| * | Fix crash when adding outputLibravatar Ryan Dwyer2018-08-20
| | |
| * | Clean up tracked outputs when an output is destroyedLibravatar Ryan Dwyer2018-08-20
| | |
| * | Send output enter/leave events correctlyLibravatar Ryan Dwyer2018-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we used a reparent event to detect when a view changes parent, then sent an output enter/leave to the surfaces if needed. This worked for tiling views but not floating views, as floating views can intersect another output without changing parent. The solution implemented for floating views also applies cleanly to tiling views, so the previous method has been completely replaced and the reparent event has been removed. This introduces a new function container_discover_outputs. This function compares the container's `current` position to the outputs, sends enter and leave events as needed, and keeps track of which outputs it's intersecting in a new `container->outputs` list. If it has entered a new output with a different scale then the title and marks textures will also be recreated at the new scale. The function is called when a transaction applies. This is convenient as it means we don't have to call it from various places. There is imperfect rendering when a floating view overlaps two outputs with different scales. It renders correctly for the most recently entered output, but there is only one title texture so it renders incorrectly on the old output. Fixes #2482
* | | Merge pull request #2496 from RyanDwyer/fix-transaction-crashLibravatar Drew DeVault2018-08-19
|\ \ \ | |/ / |/| | Fix crash when a view destroys with pending transactions
| * | Fix crash when a view destroys with pending transactionsLibravatar Ryan Dwyer2018-08-20
|/ / | | | | | | | | | | | | | | | | | | We were removing the saved buffer when one transaction applies, then didn't have a new buffer to save when the next transaction ran. This made the rendering code crash as it had no surface to use. This commit makes it continue to hold the buffer if the view is destroying and has more transactions. Additionally, a check is added when saving the buffer to make sure there's no one already there.
* | Merge pull request #2493 from RyanDwyer/fix-popup-positionLibravatar emersion2018-08-19
|\ \ | | | | | | Fix popup position when parent uses geometry
| * | Fix popup position when parent uses geometryLibravatar Ryan Dwyer2018-08-19
| | | | | | | | | | | | Fixes #2489.
* | | Merge pull request #2478 from RyanDwyer/standardise-debugLibravatar Drew DeVault2018-08-19
|\ \ \ | |/ / |/| | Standardise debug variables
| * | Use enum for damage debug optionsLibravatar Ryan Dwyer2018-08-19
| | |
| * | Standardise debug variablesLibravatar Ryan Dwyer2018-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes all debug options stored in a single struct rather than in various places, changes/fixes the behaviour of existing options, and introduces some new options. * Fixes damage issues with `-Drender-tree` texture (by removing scissor) * Offsets the render tree overlay's `y` position for those who have swaybar at the top * Replaces `-Ddamage=rerender` with `-Dnodamage` * Replaces `-Ddamage=highlight` with `-Dhighlight-damage` * Replaces `-Dtxn-debug` with `-Dtxn-wait` * Introduces `-Dnoatomic` * Removes the `create_time` and `ms_arranging` figures from transactions and the log message. Transactions are created after arranging and the create time is of no significance. * Fixes `-Dtxn-debug` (now `-Dtxn-wait`) not working.
* | | Merge pull request #2487 from RyanDwyer/workspace-floating-listLibravatar emersion2018-08-19
|\ \ \ | |/ / |/| | Replace hacky L_FLOATING container with a list
| * | Replace hacky L_FLOATING container with a listLibravatar Ryan Dwyer2018-08-19
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Workspaces previously had a magical `workspace->floating` container, which had a layout of L_FLOATING and whose children were actual floating views. This allowed some conveniences, but was a hacky solution because the container has to be exempt from focus, coordinate transactions with the workspace, and omit emitting IPC events (which we didn't do). This commit changes it to be a list directly in the sway_workspace. The L_FLOATING layout is no longer used so this has been removed as well. * Fixes incorrect check in the swap command (it checked if the containers had the L_FLOATING layout, but this layout applied to the magical container). * Introduces workspace_add_floating
* | Merge pull request #2453 from ianyfan/commandsLibravatar Ryan Dwyer2018-08-19
|\ \ | | | | | | More commands
| * \ Merge branch 'master' into commandsLibravatar Ryan Dwyer2018-08-19
| |\ \ | |/ / |/| |
* | | Merge pull request #2466 from RyanDwyer/geometryLibravatar Drew DeVault2018-08-18
|\ \ \ | | | | | | | | Fix geometry
| * | | Fix nitpickLibravatar Ryan Dwyer2018-08-18
| | | |
| * | | Store geometry in the view and handle any floating view resizingLibravatar Ryan Dwyer2018-08-18
| | | |
| * | | Set current size when a floating xwayland view resizesLibravatar Ryan Dwyer2018-08-18
| | | | | | | | | | | | | | | | This avoids sending an unnecessary configure.
| * | | Handle xwayland views sending new sizes in their commitsLibravatar Ryan Dwyer2018-08-18
| | | |
| * | | Add get_geometry for xdg_shell_v6Libravatar Ryan Dwyer2018-08-18
| | | |
| * | | Render saved buffer using saved geometryLibravatar Ryan Dwyer2018-08-18
| | | |
| * | | Fix geometryLibravatar Ryan Dwyer2018-08-18
| | | |
| * | | Add view_get_geometryLibravatar emersion2018-08-18
| | | |
* | | | Merge pull request #2484 from ianyfan/con-for-each-child-fixLibravatar Ryan Dwyer2018-08-19
|\ \ \ \ | | | | | | | | | | Fix double iterating in container_for_each_child