summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAge
* commands: add nopLibravatar Ian Fan2018-08-18
|
* Implement iterators per container typeLibravatar Ryan Dwyer2018-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the following `for_each` functions: * root_for_each_workspace * root_for_each_container * output_for_each_workspace * output_for_each_container * workspace_for_each_container And introduces the following `find` functions: * root_find_output * root_find_workspace * root_find_container * output_find_workspace * output_find_container * workspace_find_container * container_find_child And removes the following functions: * container_descendants * container_for_each_descendant * container_find This change is preparing the way for demoting sway_container. Eventually these functions will accept and return sway_outputs, sway_workspaces and sway_containers (meaning a C_CONTAINER or C_VIEW). This change also makes it easy to handle abnormalities like the workspace floating list, root's scratchpad list and (once implemented) root's saved workspaces list for when there's no connected outputs.
* Merge pull request #2460 from RyanDwyer/implement-mousedownLibravatar Drew DeVault2018-08-18
|\ | | | | Implement mousedown operation
| * Don't send motion if the cursor hasn't movedLibravatar Ryan Dwyer2018-08-18
| | | | | | | | Prevents GTK+ comboboxes from immediately closing.
| * Rename mousedown to down and make seat operation a named enumLibravatar Ryan Dwyer2018-08-18
| |
| * Implement mousedown operationLibravatar Ryan Dwyer2018-08-18
| | | | | | | | | | This allows you to move the cursor off the surface while dragging its scrollbar.
* | Rename container_sort_workspaces and container_wrap_childrenLibravatar Ryan Dwyer2018-08-18
|/ | | | | | | | This commit renames container_sort_workspaces to output_sort_workspaces and moves it to output.c. This also renames container_wrap_children to workspace_wrap_children and moves it to workspace.c. This function is only called with workspaces.
* 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.
* | 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.
* 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).
* 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.
* 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.
* 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.
* 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 #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-shellLibravatar emersion2018-08-06
| |
| * Listen to server-decoration mode changesLibravatar emersion2018-08-06
| |
* | commands: complete workspace implementationLibravatar Ian Fan2018-08-06
| | | | | | | | Allow optional --no-auto-back-and-forth flag, as well as refactoring some logic
* | commands: fix layout implementation (also better name for previous split layout)Libravatar Ian Fan2018-08-06
| |
* | commands: complete move implementationLibravatar Ian Fan2018-08-06
|/
* Move workspace pid code to root.cLibravatar Ryan Dwyer2018-08-04
|
* Separate root-related codeLibravatar Ryan Dwyer2018-08-04
| | | | | | | | | This creates a root.c and moves bits and pieces from elsewhere into it. * layout_init has been renamed to root_create and moved into root.c * root_destroy has been created and is called on shutdown * scratchpad code has been moved into root.c, because hidden scratchpad containers are stored in the root struct
* Remove swaynag_clone and use memcpyLibravatar Brian Ashworth2018-08-03
|
* Write to swaynag pipe fd directly on config errorsLibravatar Brian Ashworth2018-08-03
|
* Show swaynag on config errorsLibravatar Brian Ashworth2018-08-03
|
* Fix crash when moving cursor over a fullscreen split containerLibravatar Ryan Dwyer2018-08-03
| | | | | | Calling container_at_view fails an assertion if the container isn't a view. Calling tiling_container_at works correctly, as that function checks if the container is a view and calls container_at_view if so.
* Fix pointer events for fullscreen viewsLibravatar emersion2018-08-02
|
* Revert "Revert "Fix popups""Libravatar Ryan Dwyer2018-08-02
| | | | | | This reverts commit 9aa258d33a9baa42895214da7e82f4568fcb8f76. Reverting the revert, so that popups can be fixed.
* Merge pull request #2366 from RedSoxFan/nagbarLibravatar Drew DeVault2018-08-02
|\ | | | | Implement swaynag
| * Merge branch 'master' into nagbarLibravatar Ryan Dwyer2018-08-02
| |\
| * | swaynag: address some more of sircmpwn's commentsLibravatar Brian Ashworth2018-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes segfauls for any case where swaynag->outputs was not inititalized including -h/--help, -v/--version, and invalid arguments. Sets sane defaults for colors not given. Any color not given will fallback to the default color values for type error. Adds support for a hidpi cursor
| * | swaynag: fix hidpiLibravatar Brian Ashworth2018-08-01
| | |
| * | swaynag: allow more config optionsLibravatar Brian Ashworth2018-08-01
| | |
| * | swaynag: refactor {sway_,}nagbar to swaynagLibravatar Brian Ashworth2018-08-01
| | |
| * | swaynag: split config into own file and fix optindLibravatar Brian Ashworth2018-08-01
| | |
| * | swaynag: implement config file supportLibravatar Brian Ashworth2018-08-01
| | |
| * | Address first round review for swaynagLibravatar Brian Ashworth2018-08-01
| | |
| * | Support a detailed message in swaynagbarLibravatar Brian Ashworth2018-08-01
| | |
| * | Implements swaynagbarLibravatar Brian Ashworth2018-08-01
| | |
* | | Revert "Fix popups"Libravatar Drew DeVault2018-08-02
| |/ |/| | | | | This reverts commit de86d65627e96cffe77f4abf11c4a0b982326ff9.
* | Merge branch 'master' into fix-resize-wiggleLibravatar emersion2018-08-02
|\|
| * Merge pull request #2391 from RyanDwyer/fix-popups-v2Libravatar Drew DeVault2018-08-01
| |\ | | | | | | Fix popups (v2)
| | * Close popups when changing focusLibravatar Ryan Dwyer2018-07-31
| | | | | | | | | | | | Also reverts the send frame done changes from the previous commit.