summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
* config: improvements to the reload validationLibravatar Brian Ashworth2019-11-27
| | | | | | | | For the validation pass of reloading, there is no need to touch swaybg, swaynag, inputs, outputs, or seats. This drastically improves the speed of a reload by skipping over the expensive I/O configuration and handling of wayland clients. As long as the syntax is valid, the CMD_FAILURE's can be relayed during the actual reload.
* input/keyboard: check keyboard group before removeLibravatar Brian Ashworth2019-11-26
| | | | | | In sway_keyboard_destroy, only remove the keyboard from a keyboard group, if it is part of a keyboard group. If the keyboard is not part of a keyboard group, then there is nothing to remove it from
* input: seat: Fix seat device list not initialised before useLibravatar Paul Riou2019-11-24
| | | | | | | | When being created, non first seats would get through the list of devices without the list being first initialised -> segfault. Issue introduced with ab0248a54564b2f644b6fb367f9eb44fe0bf5f3c Fixes #4750: Crash when reloading Sway with multiple seats configured
* Amend typosLibravatar Jason2019-11-23
|
* Use new presentation-time helperLibravatar Simon Ser2019-11-21
| | | | | This has the advantage to (1) reduce boilerplate and (2) make us correctly handle wlr_output_event_present.commit_seq.
* Add support for wlr_keyboard_groupLibravatar Brian Ashworth2019-11-21
| | | | | | | | | | | | | | | | | A wlr_keyboard_group allows for multiple keyboard devices to be combined into one logical keyboard. This is useful for keyboards that are split into multiple input devices despite appearing as one physical keyboard in the user's mind. This adds support for wlr_keyboard_groups to sway. There are two keyboard groupings currently supported, which can be set on a per-seat basis. The first keyboard grouping is none, which disables all grouping and provides no functional change. The second is keymap, which groups the keyboard devices in the seat by their keymap. With this grouping, the effective layout and repeat info is also synced across keyboard devices in the seat. Device specific bindings will still be executed as normal, but everything else related to key and modifier events will be handled by the keyboard group's keyboard.
* input_cmd_xkb_file: allow shell path expansionLibravatar Brian Ashworth2019-11-21
| | | | | This allows for shell path expansion for input_cmd_xkb_file. The logic has been extracted from output_cmd_background
* input/keyboard: cleanup xkb_file error handingLibravatar Brian Ashworth2019-11-21
| | | | | This fixes an inverted fclose return value check and simplifies the error handling and logging for xkb_file in sway_keyboard_compile_keymap
* Add note about backends to output max_render_timeLibravatar Ivan Molodetskikh2019-11-17
|
* output: check wlr_output in repaint handlerLibravatar Ivan Molodetskikh2019-11-17
| | | | | | It's possible for the output to be disconnected in just the right moment for wlr_output to be NULL in the repaint handler, causing a crash. This check fixes that crash.
* Add max_render_time to view JSONLibravatar Ivan Molodetskikh2019-11-17
|
* Add max_render_time to output JSONLibravatar Ivan Molodetskikh2019-11-17
|
* view: add max_render_timeLibravatar Ivan Molodetskikh2019-11-17
|
* Add sway_surfaceLibravatar Ivan Molodetskikh2019-11-17
| | | | For extending wlr_surface with additional things.
* output: add max_render_timeLibravatar Ivan Molodetskikh2019-11-17
|
* Add -Wno-missing-bracesLibravatar Simon Ser2019-11-17
| | | | | | | -Wmissing-braces makes it annoying to zero-initialize structs with = {0} when the first field is a struct. See for instance [1]. [1]: https://builds.sr.ht/~sircmpwn/job/110425
* grimshot: fix branching on command exit statusLibravatar Manuel Mendez2019-11-17
| | | | | | | | | | | | | | | | | | The previous behavior was incorrect because `if` was checking the return status of the `[` command which was never going to be an error. `[` seems to only return an error if no args are provided. This was basically a useless use of `[` anyway since it was just meant as a straight interpretation of command exit, something that `if` can do itself. Compare: ```sh [ ]; echo ?=$? [ /bin/false ]; echo ?=$? if [ /bin/false ]; then echo this is the unintended bug; fi if /bin/false; then echo this will not be printed; fi ```
* Use an enum instead of a marker string for map_to_Libravatar Tadeo Kondrak2019-11-17
|
* Implement input map_to_region commandLibravatar Tadeo Kondrak2019-11-17
|
* xwayland: get_constraints using size hintsLibravatar Rouven Czerwinski2019-11-16
| | | | | | Previously, Xwayland windows did not have size_constraints implemented, resulting in the window being resizable. This implements the constraints through the X11 size hints supplied by the window itself.
* seatop_default: handle focus for unmanaged xwayland windows lastLibravatar Ronan Pigott2019-11-08
| | | | Fixes #4707
* Use wlr_output_preferred_mode instead of the last modeLibravatar Simon Ser2019-11-05
| | | | | Instead of relying on the order of modes, use wlr_output_preferred_mode to get the preferred mode.
* Fix segfault in set_modeLibravatar Simon Ser2019-11-05
| | | | | | | best is NULL prior to being assigned to a mode. Closes: https://github.com/swaywm/sway/issues/4705 Fixes: f33dcd4c604f ("Prefer higher refresh rate default modes")
* Prefer higher refresh rate default modesLibravatar Ronan Pigott2019-11-05
|
* smart_borders: separate smartness from edge typesLibravatar Ronan Pigott2019-11-04
|
* Add --custom to `output mode` commandLibravatar Simon Ser2019-11-04
| | | | This forces to set the mode as a custom mode.
* seatop_default: handle focus for xwayland_unmanaged viewsLibravatar Ronan Pigott2019-11-04
|
* seatop_move_floating: make container respect pointer constraintLibravatar Ronan Pigott2019-11-04
|
* focus: do nothing on focus prev|next for workspacesLibravatar Ronan Pigott2019-11-04
|
* Rename symbol set_cloexec to sway_set_cloexec, remove duplicates.Libravatar Sheena Artrip2019-11-01
| | | | | | | | set_cloexec is defined by both sway and wlroots (and who-knows-else), so rename the sway one for supporting static linkage. We also remove the duplicate version of this in client/. Fixes: https://github.com/swaywm/sway/issues/4677
* focus: add a NULL check in `focus <direction>`Libravatar lbonn2019-11-01
| | | | | container is checked for NULL in other conditions earlier, it's not obvious that it can't be undefined here.
* Fix potential NULL reference on cleanupLibravatar lbonn2019-11-01
| | | | | | If allocation of bindings failed. Found with clang-tidy
* Fix various memory leaksLibravatar lbonn2019-11-01
| | | | Found with clang-tidy
* seat: simplify a strdupLibravatar lbonn2019-11-01
|
* Skip line continuation when it is a commentLibravatar Robert Günzler2019-10-31
| | | | | | | | | | | | | Currently commented lines ending in the backslash character will be concatenated with the following line. ``` # with this comment \ exec swaynag -m 'will not run' ``` This change modifies `getline_with_cont` to stop reading when the initial character is a '#'.
* Fix presentation feedback when scanning out fullscreen viewLibravatar Simon Ser2019-10-27
| | | | Closes: https://github.com/swaywm/sway/issues/4663
* Handle layer changes for layer shell surfacesLibravatar Simon Ser2019-10-27
| | | | | Closes: https://github.com/swaywm/sway/issues/4644 References: https://github.com/emersion/rootston/commit/1982106c9b0fbd48ee9fe20e013524125f6ca3cf
* criteria: make literal comparison for __focused__ valuesLibravatar Ronan Pigott2019-10-27
|
* focus: support focus prev|next [sibling]Libravatar Ronan Pigott2019-10-27
|
* Fix segfault in wlr_output_manager_v1_set_configurationLibravatar Simon Ser2019-10-27
| | | | | | | | | | | | | | Calling wlr_output_manager_v1_set_configuration with an enabled output and a NULL mode is incorrect if the output doesn't support modes. When DPMS'ing an output, wlr_output_enable(output, false) is called. This de-allocates the CRTC and sets wlr_output.current_mode to NULL. Because we mark DPMS'ed outputs as enabled, we also need to provide a correct output mode. Add a field to sway_output to hold the current mode. Closes: https://github.com/swaywm/wlroots/issues/1867
* Fix apply_output_config return value when enabling outputLibravatar Simon Ser2019-10-27
| | | | | apply_output_config would call output_enable and always return true, even if the output couldn't be enabled.
* Fix tiled containers resize with mouseLibravatar Kirill Chibisov2019-10-23
| | | | Fixes regression introduced in 2c1a11016ccb7646a74de51eff003c18e5aa7902
* swaybar: fix typo in the loop over pixmapsLibravatar Konstantin Pospelov2019-10-23
| | | | Fixes #4665.
* swaybar: do not retry search for tray iconsLibravatar Konstantin Pospelov2019-10-21
| | | | | | | | | In case a tray icon cannot be found or does not have a desirable size, swaybar retries the search again and again, which increases load on disk and CPU. This commit solves it by storing target_size for each icon, so that swaybar does not search for an icon of some size if it already tried to. Fixes #3789.
* Fix refresh rate scale of outputLibravatar Danilo Spinella2019-10-21
| | | | | | | | When applying config, value mode->refresh is mHz; convert it to Hz before assigning it to the temporary output config. oc->refresh_rate will be converted back to mHz in set_mode function. Fix debug log printing GHz instead of Hz.
* focus: support focus_wrapping workspaceLibravatar lbonn2019-10-17
| | | | Following i3 support: https://github.com/i3/i3/pull/3407
* xwayland.c handle_map(): NULL out xsurface->data() to prevent crashing.Libravatar A. M. Joseph2019-10-17
| | | | | | | | | | When changing a surface from managed to unmanaged in handle_map(), the call to handle_destroy(.., view) causes the sway_xwayland_view pointed to by the untyped wlr_xwayland_surface.data field to become invalid garbage, yet the untyped wlr_xwayland_surface.data continues to point at it. In particular: view_get_*(view_from_wlr_surface(..)), even with appropriate NULL checking, will crash sway when this codepath is exercised (reliable test case: drop-down menus in Google Earth).
* Updates per wlroots layer shell changesLibravatar Drew DeVault2019-10-16
|
* Grimshot: a helper for screenshots within swayLibravatar Lauri2019-10-16
| | | | | | | | | | | | | | | | | | | | | | | | Usage: grimshot copy|save win|screen|area [FILE] Troubleshoot: grimshot check Requirements: - `grim`: screenshot utility for wayland - `slurp`: to select an area - `swaymsg`: to read properties of current window - `wl-copy`: clipboard utility - `jq`: json uliity to parse swaymsg output - `notify-send`: to show notifications Those are needed to be installed, if unsure, run `grimshot check` Examples: `grimshot copy win` - to copy current window `grimshot save area` - to select area and save it to default file (Pictures/Grimshot-$datetime.png) `grimshot save screen ~/screenshot.png` - to save screenshot under ~/screenshot.png `grimshot` - usage `grimshot check` - verify if tools are installed
* build: always use the project versionLibravatar Simon Ser2019-10-16
| | | | | | | | Don't use the latest tag, always use the project version for the version string. Because of version branches, getting the version from Git can be unreliable. Closes: https://github.com/swaywm/sway/issues/4631