https://github.com/swaywm/sway

sort by:
Revision Author Date Message Commit Date
6572621 Update version to 1.3-rc1 31 December 2019, 15:33:11 UTC
2a00bb0 _incr_version: always overwrite old version number 31 December 2019, 15:31:40 UTC
a44ae88 _incr_version: prompt for target wlroots release 31 December 2019, 15:27:13 UTC
f501a60 Add virtual pointer protocol 31 December 2019, 15:04:50 UTC
2b5e750 Fix sway_log using non initialised output_config pointer This fixes a crash where the `oc->name` would be accessed by sway_log() even when `oc` was NULL. 31 December 2019, 14:56:32 UTC
ef2332f Re-add support for wlr_output's atomic API This reverts commit 724926ea6ae119956dc7b1e39c2e30c1e3657676 and re-applies commit 6e0565e9de4247bbf0ca662565c58e0a54258d6e. Outputs now need to be explicitly enabled when performing a modeset. We need to roll back wlr_output_attach_render when we decide not to render. See also: https://github.com/swaywm/wlroots/pull/1797 (wlroots PR) See also: https://github.com/swaywm/sway/pull/4355 (Original sway PR) See also: https://github.com/swaywm/sway/pull/4434 (Revert sway PR) 30 December 2019, 18:24:11 UTC
658b779 Add Chinese (zh-TW) translation of README Co-authored-by: xdavidwu <xdavidwuph@gmail.com> 30 December 2019, 08:45:06 UTC
de43f7c cmd_client_*: support optional args for i3 compat For i3 compatibility, allow the indicator and child_border colors values to be optional. The indicator will fallback to sane defaults and child_border will fallback to the background color for the class. 29 December 2019, 09:40:06 UTC
ed9b4e6 Fix typo in swaybar-protocol.7.scd 28 December 2019, 18:36:00 UTC
f898ca9 bar_cmd_colors: remove add_color This is the third commit in a series of commits to refactor color handling in sway. This removes add_color from commands.c. It was only being used by bar_cmd_colors. This also changes the functions to use parse_color which is used to validate rgb(a) colors throughout the code base and is also what i3bar is using to parse the colors after they are passed over ipc. After parsing the color and ensuring it is valid, the rgba hex string is then generated using snprintf. This refactor also ensures that all the colors for the command are valid before applying any of them. 28 December 2019, 09:07:25 UTC
66dc332 cmd_client_*: refactor duplicated code This is the second in a series of commits to refactor the color handling in sway. This removes the duplicated color parsing code in sway/commands/client.c. Additionally, this combines the parsing of colors to float arrays with that in sway/config.c and introduces a color_to_rgba function in commom/util.c. As an added bonus, this also makes it so non of the colors in a border color class will be changed unless all of the colors specified are valid. This ensures that an invalid command does not get partially applied. 28 December 2019, 09:07:25 UTC
97f9f0b parse_color: return success + drop fallback color This is the first in a series of commits to refactor the color handling in sway. This changes parse_color to return whether it was success and no longer uses 0xFFFFFFFF as the fallback color. This also verifies that the string actually contains a valid hexadecimal number along with the length checks. In the process of altering the calls to parse_color, I also took the opportunity to heavily refactor swaybar's ipc_parse_colors function. This allowed for several lines of duplicated code to be removed. 28 December 2019, 09:07:25 UTC
088b374 layer-shell: refocus if keyboard interactive lost When arranging layer-shell layers, verify that the currently focused layer, if any, for each seat is still keyboard interactive. If the layer is no longer keyboard interactive and there is not a keyboard interactive overlay or top layer to change the focus to, refocus the focus inactive node for the seat. 27 December 2019, 10:38:56 UTC
bd42415 config/output: apply scale_filter even when scale has not changed 27 December 2019, 10:38:05 UTC
1d483c3 desktop/surface: Fix crash when timer is NULL When many surfaces are created, sway can run out of file descriptors, making wl_event_loop_add_timer (which creates a timerfd) fail and return NULL. This patch posts a "no memory" error when that is the case, and only removes the timer if it was created. (Why "no memory"? It is not easy to distinguish between failures due to running out of memory and failures due to running out of file descriptors. Also, using the newer `wl_client_post_implementation_error` function would lead to an increased version requirement for the libwayland-server dependency.) 24 December 2019, 12:03:50 UTC
aa8fe58 License wallpapers as CC-0 16 December 2019, 19:35:58 UTC
452a615 seat_cmd_keyboard_grouping: change keymap to smart This removes `seat <seat> keyboard_grouping keymap` and replaces it with `seat <seat> keyboard_grouping smart`. The smart keyboard grouping will group based on both the keymap and repeat info. The reasoning for this is that deciding what the repeat info should be for a group is either arbitrary or non-deterministic when multiple keyboards in the group have repeat info configured (unless somehow exposed to the user in a reproducible uniquely identifiable fashion). 16 December 2019, 17:03:11 UTC
2b51c5b input/seatop_default: fix focusing floating titles When clicking on the titlebar of a floating container (or descendant of a floating container), the top-level floating container was being focused and then allowing you to move the top-level floating container. This made it so you couldn't switch to a different tab/stack within the floating container. With this patch, the focus inactive view for the container that the titlebar is associated with is focused, then the traversal to the top-level floating container is performed to use with the move floating operation. 16 December 2019, 17:02:05 UTC
0278c4d root_scratchpad_hide: disable fullscreen descendants Any descendant of a scratchpad container may be fullscreen so checking to see if the top-level scratchpad container is fullscreen in root_scratchpad_hide is not sufficient. This iterates through all descendants of the scratchpad container 16 December 2019, 17:01:42 UTC
218b5b9 config/input: set type for new identifier configs When an input becomes available, the input type config for that device type will be merged underneath the input identifier config, provided they both exist. If an input type config gets added or modified at a later point, then those changes get merged onto the input identifier configs for that type. However there was a missing case of the input identifier config being added after the device is already available and the input type config existing. This makes it so that the first time an input identifier config gets stored, there will be a check to see if it matched any of the available devices. If it does, then there will be a search for the associated input type config, which will be merged underneath the input identifier config if found. 14 December 2019, 14:31:42 UTC
f9ce874 input/keyboard: defer wlr_keyboard_group destroy This defers the destruction of wlr_keyboard_groups until idle. This is to prevent the keyboard group's keyboard from being destroyed in the middle of handling a keyboard event. This would occur when changing the keymap of the last keyboard in a group with a keyboard binding. The prevents crashing when attempting to update the xkb state of the keyboard group's keyboard. The sway_keyboard_group is still immediately destroyed so that the group is no longer used 13 December 2019, 08:53:51 UTC
f365ffe input/keyboard: remove group listeners on destroy This adds two missing calls to wl_list_remove to remove the key and modifier listeners for the keyboard group's keyboard when destroying the keyboard group. This fixes some crashes when changing the keymap of the last keyboard in a group with a keyboard binding. 13 December 2019, 08:53:51 UTC
2f84d6e Auto-detect output scale If the screen DPI is high enough, auto-enable scale=2 (if the user hasn't set the scale). Uses heuristics based on [1]. [1]: https://gitlab.gnome.org/GNOME/mutter/blob/05217066171992b0bc50882869aad6385285c878/src/backends/meta-monitor.c#L1590 Closes: https://github.com/swaywm/sway/issues/1800 13 December 2019, 00:00:24 UTC
2f3c6cc Add seat <seat> idle_{inhibit,wake} <sources...> This adds seat configuration options which can be used to configure what events affect the idle behavior of sway. An example use-case is mobile devices: you would remove touch from the list of idle_wake events. This allows the phone to stay on while you're actively using it, but doesn't wake from idle on touch events while it's sleeping in your pocket. 12 December 2019, 15:37:30 UTC
f645f8e Fix lingering workspace with scratchpad show Showing a window in the scratchpad can move a visible scratchpad window from another workspace to the current one. If the scratchpad window was the last visible container in that workspace, the old workspace should be destroyed. 12 December 2019, 11:51:13 UTC
b7f0656 layer-shell: unfocus output-less layer on unmap If a layer is focused by any seat, it needs to be unfocused on unmap. If the unmap was due to an output being disabled, there would not be a sway_output and unmap would do an early return. This results in a use-after-free if the layer was focused by any seat prior to being unmapped. This change just moves the refocusing code above the early returns. 11 December 2019, 02:09:48 UTC
2d0f15d input/cursor: remove gesture listeners in destroy Part of #4794. Forgot to remove gesture listeners when the cursor is destroyed. 07 December 2019, 17:55:37 UTC
9ef026e input/cursor: pass gesture events to clients Some wayland clients (mostly GTK3 apps) like eog or evince support gestures like pinch-to-zoom. These gestures are given to clients via the pointer_gestures_v1 protocol. This is already supported in wlroots, so we just need to hook up the events here in sway. Fixes #4724 07 December 2019, 17:26:21 UTC
1cad862 A Script to change sway workspace name. This script automatically changes the workspace name when an application gets closed, moved or openend. 06 December 2019, 20:52:33 UTC
6235423 Improve transparency script Transparency gets reset when the script is terminated. Added command line option to set transparency strength without changing the script. Added support for multiple displays. 06 December 2019, 20:52:33 UTC
fe7ec80 config: apply input type configs on reload When making the reload validation improvements, I forgot that input type configs are stored in a separate list. This makes it so input type configs are correctly applied on reload. 04 December 2019, 01:11:22 UTC
ad189d2 Revert "fix bar_state_update/input event" This reverts commit a3da7fec32b8f18d7a70ea346618e09892c707ed. 02 December 2019, 18:57:06 UTC
a3da7fe fix bar_state_update/input event 01 December 2019, 21:40:26 UTC
275af2a output: Restore previous max_render_time behavior 01 December 2019, 11:44:07 UTC
d1eab10 output: Schedule idle frames if we do not render Repaint scheduling delays output render and frame done events from output frame events, and block idle frame events from being scheduled in between output frame done and output render in this period of time. If a surface is committed after its frame done event, but before output render, idle frame requests will be blocked, and the surface relies on the upcoming render to schedule a frame. If when the repaint timer expires, output render is deemed unnecessary, no frame will be scheduled. This can lead to surfaces never having their frame callbacks fire. To fix this, we store that a surface has requested a frame in surface_needs_frame. When the repaint expires, if no render is deemed necessary, we check this flag and schedule an idle frame. Fixes #4768 01 December 2019, 11:44:07 UTC
57f615e output: Replace block_idle_frame with frame_pending 01 December 2019, 11:44:07 UTC
6968fb3 add scale_filter output config option 29 November 2019, 17:13:37 UTC
4b57953 output: Ensure that frame_done is delayed on max_render_time max_render_time can be set on output, view, or both. However, if only applied to the output, send_frame_done_iterator would erroneously send frame_done immediately, ignoring the output max_render_time. As damage_handle_frame processed max_render_time correctly, idle frames would be blocked in anticipation of the delay that was meant to happen. Without the delay, frame events would be dispatched during the idle frame block, and some clients would never receive the frame done events they had requested, at least not until something else actively drove another render. Respecting both view and output max_render_time in send_frame_done_iterator ensures that the frame events are always correctly delayed. Fixes #4756 28 November 2019, 22:40:36 UTC
9979382 Rename 'node' to 'nodes' in swayipc doc 28 November 2019, 22:29:17 UTC
0cdad33 input/keyboard: reset seat keyboard on destroy If a sway keyboard is being destroyed, then the keyboard is being removed from a seat. If the associated wlr_keyboard is the currently set keyboard for the wlr_seat, then we need to reset the wlr_seat's keyboard to NULL so it doesn't reference an invalid device for the seat. The next configured keyboard from the seat or the next keyboard from that seat that has an event will then become the seat keyboard. Similarly, this needs to be done for a wlr_keyboard_group's keyboard when the wlr_keyboard_group is being destroyed. 28 November 2019, 09:34:49 UTC
1a57978 config: improvements to the reload validation 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. 27 November 2019, 01:04:13 UTC
90e3d25 input/keyboard: check keyboard group before remove 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 26 November 2019, 10:31:55 UTC
3334d11 input: seat: Fix seat device list not initialised before use 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 24 November 2019, 20:51:06 UTC
939c7b2 Amend typos 23 November 2019, 10:48:31 UTC
1d3cbe9 Use new presentation-time helper This has the advantage to (1) reduce boilerplate and (2) make us correctly handle wlr_output_event_present.commit_seq. 21 November 2019, 16:19:00 UTC
5d882cb Add support for wlr_keyboard_group 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. 21 November 2019, 15:42:10 UTC
2f858a1 input_cmd_xkb_file: allow shell path expansion This allows for shell path expansion for input_cmd_xkb_file. The logic has been extracted from output_cmd_background 21 November 2019, 15:36:15 UTC
66725f2 input/keyboard: cleanup xkb_file error handing This fixes an inverted fclose return value check and simplifies the error handling and logging for xkb_file in sway_keyboard_compile_keymap 21 November 2019, 14:49:25 UTC
ba8586e Add note about backends to output max_render_time 17 November 2019, 19:18:42 UTC
76210c1 output: check wlr_output in repaint handler 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. 17 November 2019, 19:18:42 UTC
7f8a478 Add max_render_time to view JSON 17 November 2019, 19:18:42 UTC
fe84ec2 Add max_render_time to output JSON 17 November 2019, 19:18:42 UTC
bd9a53f view: add max_render_time 17 November 2019, 19:18:42 UTC
5421198 Add sway_surface For extending wlr_surface with additional things. 17 November 2019, 19:18:42 UTC
022df25 output: add max_render_time 17 November 2019, 19:18:42 UTC
cb905ef Add -Wno-missing-braces -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 17 November 2019, 16:21:13 UTC
8ffa3cf grimshot: fix branching on command exit status 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 ``` 17 November 2019, 16:18:54 UTC
7f54495 Use an enum instead of a marker string for map_to_ 17 November 2019, 12:34:24 UTC
4829f1c Implement input map_to_region command 17 November 2019, 12:34:24 UTC
df1a046 xwayland: get_constraints using size hints 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. 16 November 2019, 09:18:26 UTC
37afbc4 seatop_default: handle focus for unmanaged xwayland windows last Fixes #4707 09 November 2019, 00:06:00 UTC
f576bcd Use wlr_output_preferred_mode instead of the last mode Instead of relying on the order of modes, use wlr_output_preferred_mode to get the preferred mode. 05 November 2019, 19:00:23 UTC
01b5350 Fix segfault in set_mode 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") 05 November 2019, 18:35:56 UTC
f33dcd4 Prefer higher refresh rate default modes 05 November 2019, 09:34:44 UTC
3975ca2 smart_borders: separate smartness from edge types 05 November 2019, 02:16:27 UTC
38b3724 Add --custom to `output mode` command This forces to set the mode as a custom mode. 05 November 2019, 00:40:47 UTC
eaee087 seatop_default: handle focus for xwayland_unmanaged views 04 November 2019, 22:56:27 UTC
d159b98 seatop_move_floating: make container respect pointer constraint 04 November 2019, 22:53:30 UTC
1f469e1 focus: do nothing on focus prev|next for workspaces 04 November 2019, 22:48:39 UTC
7efb5d4 Rename symbol set_cloexec to sway_set_cloexec, remove duplicates. 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 01 November 2019, 16:41:08 UTC
cf95de9 focus: add a NULL check in `focus <direction>` container is checked for NULL in other conditions earlier, it's not obvious that it can't be undefined here. 01 November 2019, 16:18:09 UTC
30fa7d1 Fix potential NULL reference on cleanup If allocation of bindings failed. Found with clang-tidy 01 November 2019, 16:18:09 UTC
a6307ae Fix various memory leaks Found with clang-tidy 01 November 2019, 16:18:09 UTC
32caabc seat: simplify a strdup 01 November 2019, 16:18:09 UTC
354e705 Skip line continuation when it is a comment 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 '#'. 31 October 2019, 22:05:06 UTC
1a253ca Fix presentation feedback when scanning out fullscreen view Closes: https://github.com/swaywm/sway/issues/4663 27 October 2019, 15:07:48 UTC
ad07886 Handle layer changes for layer shell surfaces Closes: https://github.com/swaywm/sway/issues/4644 References: https://github.com/emersion/rootston/commit/1982106c9b0fbd48ee9fe20e013524125f6ca3cf 27 October 2019, 15:07:18 UTC
7c9b71f criteria: make literal comparison for __focused__ values 27 October 2019, 15:06:05 UTC
f5f12a6 focus: support focus prev|next [sibling] 27 October 2019, 15:02:57 UTC
ec14a00 Fix segfault in wlr_output_manager_v1_set_configuration 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 27 October 2019, 14:51:02 UTC
58a40ce Fix apply_output_config return value when enabling output apply_output_config would call output_enable and always return true, even if the output couldn't be enabled. 27 October 2019, 14:51:02 UTC
43bd8dc Fix tiled containers resize with mouse Fixes regression introduced in 2c1a11016ccb7646a74de51eff003c18e5aa7902 23 October 2019, 15:21:09 UTC
06fcebc swaybar: fix typo in the loop over pixmaps Fixes #4665. 23 October 2019, 07:53:16 UTC
fa0abaf swaybar: do not retry search for tray icons 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. 21 October 2019, 15:22:25 UTC
a5b6f40 Fix refresh rate scale of output 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. 21 October 2019, 12:22:20 UTC
3ee3a9e focus: support focus_wrapping workspace Following i3 support: https://github.com/i3/i3/pull/3407 17 October 2019, 10:48:52 UTC
74c0e79 xwayland.c handle_map(): NULL out xsurface->data() to prevent crashing. 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). 17 October 2019, 08:40:16 UTC
d19f4f7 Updates per wlroots layer shell changes 16 October 2019, 14:24:15 UTC
992726a Grimshot: a helper for screenshots within sway 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 16 October 2019, 14:08:08 UTC
72ba9be build: always use the project version 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 16 October 2019, 13:42:28 UTC
344c259 sway(5): move workspace_layout to config only According to the source files, workspace_layout is a configuration only command, move it to the correct section within the man page. 16 October 2019, 11:21:45 UTC
533acbe Update version to 1.2 12 October 2019, 19:58:05 UTC
12505e4 Update .github/FUNDING.yml 11 October 2019, 23:36:58 UTC
f79f00d sway(5): Highlight valid values in the description of tiling_drag 09 October 2019, 20:32:08 UTC
42db446 sway(5): Add a missing verb 09 October 2019, 20:32:08 UTC
b4d785c build: bump wlroots version to 0.8.1 08 October 2019, 16:42:40 UTC
352a3e1 build: remove rootston from wlroots subproject Fixes an invalid option warning from Meson. 03 October 2019, 00:40:03 UTC
cf18bd8 Fix syntax in examples in sway-output(5) Some examples use comma to separate x and y for setting the output position which is wrong. Let's change it to spaces, as correctly demonstrated in the `output <name> position|pos <X> <Y>` section. 02 October 2019, 21:37:54 UTC
edcd353 layer-shell: Fix damage tracking of nested popups Popups are positioned relative to local surface coordinates of the parent surface. There's no need to consider values set with xdg_surface.set_window_geometry for parent surfaces. 29 September 2019, 16:50:58 UTC
00c4c7e Fix direct scan-out flickering Sometimes when using direct scan-out, some flickering between the fullscreen app and the regular desktop could be seen. This happened because we called wlr_output_attach_render and then wlr_output_attach_buffer for direct scan-out. wlr_output_attach_render makes the OpenGL context current but also attaches the OpenGL buffer to the primary plane apparently (all of this happens inside eglMakeCurrent). This patch moves the scan-out logic outside of output_render, before wlr_output_attach_render. This lines it up with rootston's implementation. This also makes more sense since no rendering is involved when using direct scan-out. Sorry about that, I should've tested this with more clients. The new code has been tested with mpv and a GLFW demo. 26 September 2019, 14:36:18 UTC
back to top