aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2018-08-20Fix crash when a view destroys with pending transactionsRyan Dwyer-2/+4
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.
2018-08-19Merge pull request #2493 from RyanDwyer/fix-popup-positionemersion-2/+4
Fix popup position when parent uses geometry
2018-08-19Merge pull request #2478 from RyanDwyer/standardise-debugDrew DeVault-80/+68
Standardise debug variables
2018-08-19Allow subsurfaces which overflow the container to be interacted withRyan Dwyer-3/+20
Fixes #2492.
2018-08-19Fix popup position when parent uses geometryRyan Dwyer-2/+4
Fixes #2489.
2018-08-19Merge pull request #2487 from RyanDwyer/workspace-floating-listemersion-136/+109
Replace hacky L_FLOATING container with a list
2018-08-19Replace hacky L_FLOATING container with a listRyan Dwyer-136/+109
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
2018-08-19Use enum for damage debug optionsRyan Dwyer-12/+14
2018-08-19Standardise debug variablesRyan Dwyer-77/+63
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.
2018-08-19Merge pull request #2453 from ianyfan/commandsRyan Dwyer-57/+121
More commands
2018-08-19Merge branch 'master' into commandsRyan Dwyer-61/+152
2018-08-18Merge pull request #2466 from RyanDwyer/geometryDrew DeVault-60/+151
Fix geometry
2018-08-19Merge pull request #2484 from ianyfan/con-for-each-child-fixRyan Dwyer-1/+1
Fix double iterating in container_for_each_child
2018-08-18commands: move newly-stickied containers to focused workspaceIan Fan-0/+16
2018-08-18Fix double iterating in container_for_each_childIan Fan-1/+1
2018-08-18commands: prevent focusing mode with no containersIan Fan-0/+4
Explicitly fail when trying to focus tiling/floating when there are no tiling/floating containers.
2018-08-18commands: complete assign commandIan Fan-23/+45
2018-08-18commands: saner workspace number handlingIan Fan-18/+29
2018-08-18commands: handle quoted exec commandIan Fan-1/+10
2018-08-18commands: fix documentation formatting mistakes for move commandIan Fan-3/+3
2018-08-18commands: require set variable to start with $Ian Fan-12/+2
2018-08-18commands: add nopIan Fan-0/+12
2018-08-18Merge pull request #2473 from RyanDwyer/iterators-per-typeDrew DeVault-110/+268
Implement iterators per container type
2018-08-18Implement iterators per container typeRyan Dwyer-110/+268
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.
2018-08-18Merge pull request #2460 from RyanDwyer/implement-mousedownDrew DeVault-8/+63
Implement mousedown operation
2018-08-18Merge pull request #2481 from RyanDwyer/rename-functionsDrew DeVault-54/+54
Rename container_sort_workspaces and container_wrap_children
2018-08-18Rename container_sort_workspaces and container_wrap_childrenRyan Dwyer-54/+54
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.
2018-08-18Merge pull request #2480 from RyanDwyer/fix-mod-resizeemersion-5/+5
Fix mod+resize
2018-08-18Fix mod+resizeRyan Dwyer-5/+5
Fixes #2479. It was missing a mod_pressed check. This also moves the parent traversal into the `if` block.
2018-08-18Fix nitpickRyan Dwyer-4/+4
2018-08-18Store geometry in the view and handle any floating view resizingRyan Dwyer-112/+144
2018-08-18Set current size when a floating xwayland view resizesRyan Dwyer-0/+2
This avoids sending an unnecessary configure.
2018-08-18Handle xwayland views sending new sizes in their commitsRyan Dwyer-2/+11
2018-08-18Add get_geometry for xdg_shell_v6Ryan Dwyer-1/+13
2018-08-18Render saved buffer using saved geometryRyan Dwyer-4/+2
2018-08-18Fix geometryRyan Dwyer-10/+57
2018-08-18Add view_get_geometryemersion-37/+28
2018-08-18Don't send motion if the cursor hasn't movedRyan Dwyer-1/+6
Prevents GTK+ comboboxes from immediately closing.
2018-08-18Rename mousedown to down and make seat operation a named enumRyan Dwyer-17/+18
2018-08-18Implement mousedown operationRyan Dwyer-1/+50
This allows you to move the cursor off the surface while dragging its scrollbar.
2018-08-17Merge pull request #2472 from RyanDwyer/refactor-seat-get-focusDrew DeVault-55/+81
Refactor seat_get_focus functions
2018-08-17Merge pull request #2471 from RyanDwyer/reap-when-floatingemersion-1/+2
Attempt to reap old tiling parent when floating a container
2018-08-17Merge pull request #2474 from RyanDwyer/transactionise-csdemersion-3/+5
Add using_csd variable to transaction state
2018-08-17Add using_csd variable to transaction stateRyan Dwyer-3/+5
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.
2018-08-17Refactor seat_get_focus functionsRyan Dwyer-55/+81
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.
2018-08-17Attempt to reap old tiling parent when floating a containerRyan Dwyer-1/+2
2018-08-17Merge pull request #2465 from DonnieWest/masterRyan Dwyer-1/+2
Default to the previous workspace if the current one has no focused windows
2018-08-16When the workspace is focused, return it instead of checking parentDonnie West-1/+2
2018-08-16Fix swaylock zsh completionsIan Fan-3/+3
2018-08-15Merge pull request #2458 from RyanDwyer/cleanup-transactionsDrew DeVault-80/+51
Simplify transactions