summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* 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 #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
| * | | Fix double iterating in container_for_each_childLibravatar Ian Fan2018-08-18
|/ / /
| | * commands: move newly-stickied containers to focused workspaceLibravatar Ian Fan2018-08-18
| | |
| | * commands: prevent focusing mode with no containersLibravatar Ian Fan2018-08-18
| | | | | | | | | | | | Explicitly fail when trying to focus tiling/floating when there are no tiling/floating containers.
| | * commands: complete assign commandLibravatar Ian Fan2018-08-18
| | |
| | * commands: saner workspace number handlingLibravatar Ian Fan2018-08-18
| | |
| | * commands: handle quoted exec commandLibravatar Ian Fan2018-08-18
| | |
| | * commands: fix documentation formatting mistakes for move commandLibravatar Ian Fan2018-08-18
| | |
| | * commands: require set variable to start with $Libravatar Ian Fan2018-08-18
| | |
| | * commands: add nopLibravatar Ian Fan2018-08-18
| |/ |/|
* | Merge pull request #2473 from RyanDwyer/iterators-per-typeLibravatar Drew DeVault2018-08-18
|\ \ | | | | | | Implement iterators per container type
| * | 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.
* | Merge pull request #2481 from RyanDwyer/rename-functionsLibravatar Drew DeVault2018-08-18
|\ \ | | | | | | Rename container_sort_workspaces and container_wrap_children
| * | 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 #2480 from RyanDwyer/fix-mod-resizeLibravatar emersion2018-08-18
|\ \ | |/ |/| Fix mod+resize
| * Fix mod+resizeLibravatar Ryan Dwyer2018-08-18
|/ | | | | | | | Fixes #2479. It was missing a mod_pressed check. This also moves the parent traversal into the `if` block.
* 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
| |/
* | Merge pull request #2474 from RyanDwyer/transactionise-csdLibravatar emersion2018-08-17
|\ \ | |/ |/| Add using_csd variable to transaction state
| * 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 #2465 from DonnieWest/masterLibravatar Ryan Dwyer2018-08-17
|\ | | | | Default to the previous workspace if the current one has no focused windows
| * 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.
* | Merge pull request #2459 from RyanDwyer/fix-workspace-prev-nextLibravatar emersion2018-08-15
|\ \ | |/ |/| Use list_find in more places and refactor/fix workspace prev_next functions