summaryrefslogtreecommitdiffstats
path: root/sway
Commit message (Collapse)AuthorAge
* Fix geometryLibravatar Ryan Dwyer2018-08-18
|
* Add view_get_geometryLibravatar emersion2018-08-18
|
* Merge pull request #2472 from RyanDwyer/refactor-seat-get-focusLibravatar Drew DeVault2018-08-17
|\ | | | | Refactor seat_get_focus functions
| * Refactor seat_get_focus functionsLibravatar Ryan Dwyer2018-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #2467. This commit introduces seat_get_focus_inactive_floating to supplement seat_get_focus_inactive_tiling, and uses it during `focus mode_toggle` which fixes a focus bug. This also refactors the seat_get_focus_inactive functions so that they do their selection logic themselves rather than offloading it to seat_get_focus_by_type which was getting bloated. seat_get_focus_by_type is now removed. Lastly, this commit changes seat_get_focus to just return the first container in the focus stack rather than looping and calling seat_get_focus_by_type.
* | Merge pull request #2471 from RyanDwyer/reap-when-floatingLibravatar emersion2018-08-17
|\ \ | | | | | | Attempt to reap old tiling parent when floating a container
| * | Attempt to reap old tiling parent when floating a containerLibravatar Ryan Dwyer2018-08-17
| |/
* / Add using_csd variable to transaction stateLibravatar Ryan Dwyer2018-08-17
|/ | | | | | | | | | | This fixes a race condition flicker when unfloating a view which uses client side decorations. When the view is floated it has using_csd = true, so the decorations are not drawn. When unfloating it it changes to false, but this change wasn't part of transactions so it could potentially render the decorations around the view while it's waiting for the transaction to apply.
* When the workspace is focused, return it instead of checking parentLibravatar Donnie West2018-08-16
|
* Merge pull request #2458 from RyanDwyer/cleanup-transactionsLibravatar Drew DeVault2018-08-15
|\ | | | | Simplify transactions
| * Simplify transactionsLibravatar Ryan Dwyer2018-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4b8e3a885be74c588291c51f798de80bd81a92db makes it so only one transaction is committed (ie. configures sent) at a time. This commit removes the now-unnecessary code which was used to support concurrent committed transactions. * Instead of containers storing a list of instructions which they've been sent, it now stores a single instruction. * Containers now have an ntxnrefs property. Previously we knew how many references there were by the length of the instruction list. * Instructions no longer need a ready property. It was used to avoid marking an instruction ready twice when they were in a list, but this is now avoided because there is only one instruction and we nullify the container->instruction pointer when it's ready. * When a transaction applies, we no longer need to consider releasing and resaving the surface, as we know there are no other committed transactions. * transaction_notify_view_ready has been renamed to view_notify_view_ready_by_serial to make it consistent with transaction_notify_view_ready_by_size. * Out-of-memory checks have been added when creating transactions and instructions.
* | Use list_find in more places and refactor/fix workspace prev_next functionsLibravatar Ryan Dwyer2018-08-15
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | The original purpose of this commit is to replace some for loops with list_find. But while doing this I found the workspace_prev_next_impl functions to be difficult to read and also contained a bug, so I refactored them and fixed the bug. To reproduce the bug: * Have two outputs, where the left output has workspaces 1, 2, 3 and the right output has workspaces 4, 5, 6. Make workspace 2 focused_inactive and workspace 4 focused. * Run `workspace prev`. * Previously it would visit the left output, then apply `workspace prev` to workspace 2, which focuses workspace 1. * Now it will focus the rightmost workspace on the left output (workspace 3). The refactoring I made to the workspace functions are: * Added the static keyword. * They now accept an int dir rather than bool, to avoid an unnecessary conversion. * Rather than preparing start and end variables for the purpose of iterating, just iterate everything. * Replace for loops with list_find. * Don't call workspace_output_prev_next_impl (this fixes the bug).
* Merge pull request #2445 from RyanDwyer/resize-tiling-via-cursorLibravatar Drew DeVault2018-08-14
|\ | | | | Implement resizing tiled containers via cursor
| * Don't commit multiple transactions at the same timeLibravatar Ryan Dwyer2018-08-12
| |
| * Don't progress transaction queue if any are partially completeLibravatar Ryan Dwyer2018-08-12
| | | | | | | | | | | | This fixes an issue where views might commit to a transaction ahead of the first one, and applying the first transaction causes us to save a buffer of the wrong size.
| * Make mod+resize a floating container resize the container itselfLibravatar Ryan Dwyer2018-08-12
| | | | | | | | Rather than resizing the split within the container.
| * Use col-resize and row-resize cursor imagesLibravatar Ryan Dwyer2018-08-12
| |
| * Fix right-click/popups and add state checksLibravatar Ryan Dwyer2018-08-12
| |
| * Allow resizing tiled views via mod keyLibravatar Ryan Dwyer2018-08-12
| |
| * Refactor dispatch_cursor_buttonLibravatar Ryan Dwyer2018-08-12
| | | | | | | | | | | | | | | | | | | | There was a separate function dispatch_cursor_button_floating which dealt with the resize and move operations, but as resize is not really limited to floating views, it doesn't make as much sense to have this separate. So both functions are now combined into one. Additionally, dispatch_cursor_button now uses a pattern of returning early instead of using else-ifs.
| * Implement resizing tiled containers via cursorLibravatar Ryan Dwyer2018-08-12
| | | | | | | | | | | | | | | | | | * The OP_RESIZE seat operation has been renamed to OP_RESIZE_FLOATING, and OP_RESIZE_TILING has been introduced. * Similar to the above, seat_begin_resize and handle_resize_motion have been renamed and tiling variants introduced. * resize.c's resize_tiled has to be used, so container_resize_tiled has been introduced in resize.c to allow external code to call it.
* | Use assigned workspace name for outputLibravatar minus2018-08-12
|/ | | | | | | Instead of relying on bindings being configured, primarily source new workspace names from workspace-output assignments. Fixes #2435
* man: Correct format for output position configLibravatar Josip Janzic2018-08-11
|
* Fix container_has_ancestor crashLibravatar Ryan Dwyer2018-08-12
| | | | Fixes #2450
* Merge pull request #2449 from RyanDwyer/remove-bfsLibravatar Drew DeVault2018-08-11
|\ | | | | Remove container_for_each_descendant_bfs
| * Remove container_for_each_descendant_bfsLibravatar Ryan Dwyer2018-08-11
| | | | | | | | | | | | | | The function was not used. Also renames container_for_each_descendant_dfs to just container_for_each_descendant.
* | Remove container_has_childLibravatar Ryan Dwyer2018-08-11
|/ | | | | In all cases you can use container_has_ancestor with the arguments swapped, which is faster than container_has_child.
* xwayland: fix unmanaged surfaces orderLibravatar emersion2018-08-10
|
* Update resize documentationLibravatar Ryan Dwyer2018-08-10
|
* Implement resize set <width> <height> for tiled containersLibravatar Ryan Dwyer2018-08-10
| | | | | | Unlike i3, this implementation allows px measurements. Also fixes a sane size check.
* Implement resize grow|shrink <direction> <amount> for tiled containersLibravatar Ryan Dwyer2018-08-10
|
* Remove obsolete security sanity checkLibravatar Drew DeVault2018-08-09
|
* Don't call swaynag_log for bg when not readingLibravatar Brian Ashworth2018-08-08
|
* Allow a fallback color to be specified for swaybgLibravatar Brian Ashworth2018-08-08
| | | | | | This allows for a color to be set when the wallpaper does not fill the entire output. If specified, the fallback color is also used when the image path is inaccessible.
* Merge branch 'master' into masterLibravatar Brian Ashworth2018-08-08
|\
| * Don't call send_pointer_notify_button when doing move or resizeLibravatar Ryan Dwyer2018-08-08
| |
| * Focus floating views when beginning move/resize operationsLibravatar Ryan Dwyer2018-08-08
| |
| * Rename container_at_view to surface_at_view and make it return voidLibravatar Ryan Dwyer2018-08-08
| |
| * Fix focus when clicking floating decorationsLibravatar Ryan Dwyer2018-08-08
| | | | | | | | | | It's not right for container_at_view to only return the swayc if a surface was clicked.
| * Deny moving a sticky container to workspace if it's the same outputLibravatar Ryan Dwyer2018-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rationale: Sticky containers are always assigned to the visible workspace. The basic idea here is to check the destination's output (move.c:190). But if the command was `move container to workspace x` then a workspace might have been created for it. We could destroy the workspace in this case, but that results in unnecessary IPC events. To avoid this, the logic for `move container to workspace x` has been adjusted. It now delays creating the workspace until the end, and uses `workspace_get_initial_output` to determine and check the output before creating it.
| * Fix edge cases when moving floating container to new workspaceLibravatar Ryan Dwyer2018-08-08
| | | | | | | | | | | | | | | | | | | | * Removes container_floating_move_to_container, instead opting to put that logic in container_move_to * In the seat code, focusing a floating view now updates the pending state only and lets the next transaction carry it over to the current state. This is required, otherwise it would crash. * When unfullscreening a floating container, an output check is now done to see if it should center it.
| * Implement move to workspace on a floating containerLibravatar Ryan Dwyer2018-08-08
| | | | | | | | | | Also adjusts container_floating_translate to not change the current properties directly.
| * Merge pull request #2432 from RyanDwyer/fix-move-crashLibravatar Drew DeVault2018-08-07
| |\ | | | | | | Fix crash when running `move container to workspace back_and_forth`
| | * Fix crash when running `move container to workspace back_and_forth`Libravatar Ryan Dwyer2018-08-07
| | | | | | | | | | | | | | | | | | The back_and_forth condition is intended to be handled in the else-if block, but this was never reached because it remained in the first block's conditions.
| * | Fix infinite loop when focusing sticky containers via workspace commandLibravatar Ryan Dwyer2018-08-07
| |/ | | | | | | | | | | | | | | | | | | | | In a multi-output setup, if a sticky container is on one output and focus is on the other output, and you run (eg) `workspace 1` to focus the workspace containing the sticky container, an infinite loop would occur. It would loop infinitely because it would remove the sticky container from the workspace, add it back to the same workspace, and then decrement the iterator variable. The fix just wraps the loop in a workspace comparison.
| * Merge branch 'master' into workspace-move-to-outputLibravatar Brian Ashworth2018-08-06
| |\
| | * Merge pull request #2268 from emersion/server-decoration-bordersLibravatar Drew DeVault2018-08-06
| | |\ | | | | | | | | Enable borders on floating SSD xdg-shell views
| | | * Handle views created after decoration mode is sent for xdg-shell-v6Libravatar emersion2018-08-06
| | | |
| | | * Handle views created after decoration mode is sent for xdg-shellLibravatar emersion2018-08-06
| | | |
| | | * Listen to server-decoration mode changesLibravatar emersion2018-08-06
| | | |
| | * | commands: fix workspace edge casesLibravatar Ian Fan2018-08-06
| | | |