aboutsummaryrefslogtreecommitdiffstats
path: root/sway
Commit message (Collapse)AuthorAge
* Adhere to ICCCM focus specificationLibravatar BrassyPanache2021-01-20
| | | | | | | | For certain applications (e.g. JetBrains) the parent window controls input. We need to adhere to the ICCCM input focus specification to properly handle these cases. Relates to swaywm/wlroots#2604
* Log when config file is not foundLibravatar Simon Ser2021-01-17
| | | | | This happens when Sway is not installed on the system, so there's no default config in /etc.
* Raise verbosity of error message in load_main_configLibravatar Simon Ser2021-01-17
|
* Changed fprintf(stdout,...) to printf(...) for more readable codeLibravatar SpizzyCoder2021-01-16
|
* config/output: correct refresh rate rounding errorLibravatar Ronan Pigott2021-01-15
|
* Rename output_layer_for_each_surface_{toplevel,popup}Libravatar Simon Ser2021-01-12
| | | | Swap the "surface" part for consistency with wlroots' naming.
* Switch to wlr_xdg_surface_for_each_popup_surfaceLibravatar Simon Ser2021-01-12
| | | | | | | | Instead of calling wlr_xdg_surface_for_each_popup and then wlr_surface_for_each_surface, use the new for_each_popup_surface helper introduced in [1] that does it in one go. [1]: https://github.com/swaywm/wlroots/pull/2609
* desktop/xwayland: use index constants for atom arrayLibravatar Simon Ser2021-01-08
| | | | This ensures we don't swap two atoms by mistake.
* man: update maintainerLibravatar Simon Ser2021-01-08
| | | | | Also remove the AUTHORS section from swaybar-protocol(7), for consistency with the rest of the man pages.
* cmd_move: update container representation in sibling swapsLibravatar Ronan Pigott2021-01-04
|
* input/seat: Reset command handler context in seat_destroy()Libravatar Andri Yngvason2021-01-01
| | | | This fixes a dangling reference which causes a use-after-free.
* input/seat: Clean up focus_stack in seat_destroy()Libravatar Andri Yngvason2021-01-01
| | | | This fixes use-after-free when seat_destroy() has been called.
* input: Clean up input_method_relay in seat_destoy()Libravatar Andri Yngvason2021-01-01
| | | | | This fixes a crash that happens when input_method_new or text_method_new events are emitted after the seat has been freed.
* Remove create_renderer_func argumentLibravatar Simon Ser2020-12-30
| | | | | | It's removed upstream [1]. [1]: https://github.com/swaywm/wlroots/pull/2561
* container: set fullscreen mode before attempting focusLibravatar Ronan Pigott2020-12-24
|
* workspace: rework workspace prev|next like i3Libravatar Ronan Pigott2020-12-20
| | | | | Changes workspace prev|next commands to visit each numbered or named workspace first before considering workspace from the other category
* commands/move: reset geometry of promoted containersLibravatar Ronan Pigott2020-12-20
|
* commands/move: squash workspace after directional con moveLibravatar Ronan Pigott2020-12-20
|
* introduce workspace_squashLibravatar Ronan Pigott2020-12-20
| | | | | | | | | | | | | | | | | | workspace_squash is container_flatten in the reverse direction. Instead of eliminating redundant splits that are parents of the target container, it eliminates pairs of redundant H/V splits that are children of the workspace. Splits are redundant if a con and its grandchild have the same layout, and the immediate child has the opposite split. For example, layouts are transformed like: H[V[H[app1 app2]] app3] -> H[app1 app2 app3] i3 uses this operation to simplify the tree after moving heavily nested containers to a higher level in the tree via an orthogonal move.
* commands/move: rework container_move_in_directionLibravatar Ronan Pigott2020-12-20
| | | | | | | | | | This changes the move command to better match i3 behavior after the layout changes. workspace_rejigger handled the case where containers would escape their workspace in an orthogonal move by changing the layout to accomodate them, but this case is now handled within the loop.
* Change workspace_layout to match i3 behaviorLibravatar Ronan Pigott2020-12-20
| | | | | | | In i3, the workspace_layout command does not affect the workspace layout. Instead, new workspace level containers are wrapped in the desired layout and the workspace layout always defaults to the output orientation.
* Revert "commands/move: maintain workspace_layout when moving"Libravatar Ronan Pigott2020-12-20
| | | | | | | This is in preparation for changing the workspace_layout command to work like it does in i3. This reverts commit b4a75a1ab2a72842830aeea37733311f85e6f660.
* commands/move: don't flatten on move; reap empty former parent insteadLibravatar Tudor Brindus2020-12-20
| | | | | | | | | | | | | | | | | | Some comparisons of current Sway versus i3 behavior: 1) T[T[T[app]]] + move left * Sway: T[app] * i3: T[T[app]] 2) H[V[H[V[app]]]] + move left * Sway: H[app] * i3: H[V[app]] After this commit, Sway behavior matches i3. The intermediate states are now: T[T[T[app]]] -> T[T[app T[]]] -> T[T[app]] H[V[H[V[app]]]] -> H[V[app H[V[]]]] -> H[V[app]]
* commands/layout: don't change the layout of workspaces with childrenLibravatar Ronan Pigott2020-12-20
| | | | | | In i3 the layout command on a workspace affects the workspace layout only on empty workspaces. Otherwise children are placed in a new container with the desired layout to preserve the workspace layout.
* container: don't split single childrenLibravatar Ronan Pigott2020-12-20
| | | | | | In i3 splits are ineffective on singleton H/V containers, and the command is interpreted to affect the parent layout instead.
* Test output before direct scan-outLibravatar Simon Ser2020-12-20
| | | | | | | | | | | This avoids some log spam. Eventually when we wire up the atomic test commit this will take care of the other log spam referenced below. References: https://github.com/swaywm/sway/pull/5010 References: https://github.com/swaywm/wlroots/issues/2181 Closes: https://github.com/swaywm/wlroots/issues/2532
* Route wlroots logs into Sway logging infrastructureLibravatar Simon Ser2020-12-09
| | | | | | | | | | Instead of letting wlroots print messages to stdout, route debugging messages into Sway's logging functions. This allows a more consistent output (e.g. if Sway or wlroots changes its output style, they don't get out-of-sync). I also added a [wlr] prefix to wlroots messages, not yet sure it's a good thing.
* Handle secondary headless backend failuresLibravatar Simon Ser2020-12-08
|
* Drop gtk-primary-selection supportLibravatar Isaac Freund2020-12-08
|
* Add layer shell subsurfacesLibravatar Vlad Pănăzan2020-12-07
| | | | | | | Damage subsurfaces created by layer surfaces on map, unmap and commit. This fixes the flicker of Gtk Popovers. Fixes #5617
* input/cursor: unhide cursor on synthetic inputLibravatar Tudor Brindus2020-12-06
| | | | Fixes #5847.
* criteria: fix crash when comparing NULL propertiesLibravatar Paul Riou2020-12-04
| | | | | | | | | | | | | | | | | | | | | | | | For each following combinations of criteria & command below, the command would crash sway without the fix. It's particular about the __focused__ criteria, where the view matches part of the criteria but not the focused app, leading to a failure when calling `strcmp` with NULL. "xterm" is a non-wayland app (X11) and "kitty" is. Both are terminals. # "class" is specific to X11 # The view is X11 (xterm) leading to the criteria checking for the # focused app's class, leading to a crash for_window [class="__focused__"] floating enable exec kitty -e xterm # Similarly, crash as the focused app (xterm) has no app_id when the view has one for_window [app_id="__focused__"] floating enable exec xterm -e kitty # If the view has a title but not the focused app: NULL title will crash criteria checking for_window [title="__focused__"] floating enable exec xterm -title "" -e xterm
* xdg_shell: allow views to change geometry anytimeLibravatar Ronan Pigott2020-11-24
| | | | | | | | | | | Currently, when sway sends a configure with some geometry and the client responds with a different geometry in a commit that acks that configure, sway ignores the new size. Sway applies the surface geometry it had requested to the container, not what was actually committed, in the following transaction. This change allows any client commit to change its surface geometry, even if it is a response to a configure event.
* document parse_errorLibravatar Rex Hackbro2020-11-21
|
* Log which output is using direct scan-outLibravatar Simon Ser2020-11-16
|
* input/keyboard: fix Group# bindings for keyboard groupsLibravatar Brian Ashworth2020-11-12
| | | | | | The keyboard group's effective keyboard layout was never being changed due to a condition that incorrectly preventing it from being performed. The IPC event that follows the change was correctly being prevented.
* tree/container: introduce `container_is_sticky[_or_child]` functionsLibravatar Tudor Brindus2020-11-11
| | | | | | | | | | To query whether a container is sticky, checking `con->is_sticky` is insufficient. `container_is_floating_or_child` must also return true; this led to a lot of repetition. This commit introduces `container_is_sticky[_or_child]` functions, and switches all stickiness checks to use them. (Including ones where the container is already known to be floating, for consistency.)
* Add missing includes for wlr_input_device.hLibravatar Simon Ser2020-11-11
| | | | References: https://github.com/swaywm/wlroots/pull/2470
* Replace wlr_key_state with wl_keyboard_key_stateLibravatar Simon Ser2020-11-11
| | | | References: https://github.com/swaywm/wlroots/pull/2446
* input/seatop_default: consider fullscreen views to have no edgesLibravatar Tudor Brindus2020-11-05
| | | | | | | | | | | | | Previously, `find_edge` on a single fullscreen view would occasionally return an edge rather than `WLR_EDGE_NONE`. This would trigger entry into `seatop_resize_tiling`, which doesn't have meaning for a fullscreen view. The result was that the fullscreen container hitbox was considered to be that of where it'd be if it were tiling, so most clicks would not go through. Fixes #5792.
* input: fully change focus when scrolling tabs/stacksLibravatar Tudor Brindus2020-11-01
| | | | | | | | When scrolling on a tabbed/stacked container, i3 focuses its inactive-focused focused child. Sway does the same, but then resets the focus to whatever was focused previously. Ref https://github.com/i3/i3/blob/e5992eed163179f5cd2715c2c212d3d757f04b31/src/click.c#L207-L219
* commands/focus: force container warp when fulfilling `focus mode_toggle`Libravatar Tudor Brindus2020-11-01
| | | | | | | This commit switches focusing behavior to force a warp when executing `focus mode_toggle`. Fixes #5772.
* input: remove motion deltas from seatop callbacksLibravatar Tudor Brindus2020-10-31
| | | | Straightforward cleanup, they haven't been used for a while.
* hide_cursor: Add an option to hide when typingLibravatar Tamir Zahavi-Brunner2020-10-30
| | | | | Add an option for the `hide_cursor` command to hide the cursor when typing, i.e. whenever a key is pressed.
* output: Revert implementation of evacuate_sticky()Libravatar mwenzkowski2020-10-28
| | | | | | | | The function evacuate_sticky() was changed in commit 32788a93 to be used by workspace_for_each_container() to make the code more readable. But I overlooked that it is not safe to use workspace_for_each_container() to remove container from a workspace. This commit restores the previous implementation for evacuate_sticky().
* In container_split, set a floating container's view to tiledLibravatar Dimitris Triantafyllidis2020-10-28
| | | | | | | | | | | | | | | Currently, when a floating container with a view is split and children are added to it, the new views are rendered as tiled, while the first view stays in floating style. Here this is addressed by setting the view to tiled as soon as the container is split, by duplicating the "view part" of the logic in container_set_floating(..., false). Since the new container of the view is no longer considered floating, it makes sense to set the view to tiling at this point. The view would have to be set back to floating if it was possible to "unsplit" the container.
* output: evacuate sticky containers only if new output has a workspaceLibravatar mwenzkowski2020-10-27
| | | | | | | Sticky floating containers on an otherwise empty workspace can only be evacuated if the new output has an active workspace. The noop output may not have one and in that case we have to move the whole workspace to the new output.
* Smart borders fix: always show borders for floating containersLibravatar Dimitris Triantafyllidis2020-10-25
| | | | | | | | | | | | | | Currently, in view_autoconfigure, the only condition for show_border is !view_is_only_visible. view_is_only_visible does not cross the boundary between the workspace's tiling and floating lists and does not differentiate between them. The result is, that in a workspace with zero or more tiling containers and a single floating container, the floating container will lose its borders as soon as it is split, provided that a only one view is visible within the floating container. Fixed by adjusting the condition for show_borders.
* container: Fix NULL pointer dereferenceLibravatar mwenzkowski2020-10-24
| | | | | | | Reset the workspace layout to the output's default only if the workspace is actually attached to an output. Fixes #5762
* commands/move: fix crash when moving sphsc childLibravatar Ronan Pigott2020-10-24
|