https://github.com/swaywm/sway

sort by:
Revision Author Date Message Commit Date
f681d52 Update version to 1.4 22 January 2020, 18:33:29 UTC
0515c15 fish-completion: use the correct fallback directory fish completions should never be installed to share/fish/completions/ as that directory is reserved exclusively for completions shipped as part of the fish source code. Use the same vendor_completions.d/ directory which the default fish configuration uses. 22 January 2020, 18:30:53 UTC
12535a3 completion: use pkg-config to get install location for bash/fish Both shells provide pkg-config files which declare their designated completionsdir. Use this as the primary source of truth. 22 January 2020, 18:30:53 UTC
004837b meson: use join_paths to build paths, instead of string concat It makes sure to handle paths as paths, and is generally safer and the blessed solution. 22 January 2020, 18:30:53 UTC
3644d6f Check argc>0 before strcasecmp. Should shortcircuit 22 January 2020, 18:30:53 UTC
3bc209f commands/move: Fix crash when required args not provided Fixes #4919. 22 January 2020, 18:30:53 UTC
0bc8d01 output: apply oc to outputs using wl_for_each_safe If applying an output config to an output fails, the output may be destroyed. To be able to handle this situation correctly, apply_output_config_to_outputs needs to use wl_list_for_each_safe. 22 January 2020, 18:30:52 UTC
162743d cmd_split: Refuse to split scratchpad hidden split containers 22 January 2020, 18:30:52 UTC
a4fad12 cmd_move: Fix crash when moving to scratchpad hidden split containers 22 January 2020, 18:30:52 UTC
c52b1cf Fix crash when showing scratchpad hidden split containers 22 January 2020, 18:30:52 UTC
f531e86 desktop/output: fix mem leak in handle_new_output This fixes a memory leak of oc (the output config) in handle_new_output. Output configs returned from find_output_config are not stored and need to be freed after use. 22 January 2020, 18:30:52 UTC
c6b5aef sway.5: Document missing bindsym flags for unbindsym sway.5: Remove indents within long command descriptions 22 January 2020, 18:30:52 UTC
6ac97c4 sway-input.5: Document repeat_delay and repeat_rate only once 22 January 2020, 18:30:52 UTC
94199fe ipc-json: Remove unnecessary dereference 22 January 2020, 18:30:52 UTC
b939854 commands/split: Fix error message typos 22 January 2020, 18:30:52 UTC
bdcec5a Revert "Make all the container dimensions integers" This reverts commit 79c5f5ba1245a8c3d575770419a6501447e78919. Fixes: https://github.com/swaywm/sway/issues/4908 15 January 2020, 17:02:20 UTC
764a270 container: add inactive fullscreen to focus stack When a container was being made fullscreen and it is on the focused workspace for a seat, focus was being set to the container. However, when the container was on a non-focused workspace, the focus stack wasn't being touched. When assigning a fullscreen container to a workspace or moving a fullscreen container to a different workspace, this would make it so the fullscreen container was never added to the focus stack for the workspace thus preventing access to the workspace. This adds the container to the top of the focus stack, behind the container on the focused workspace. 15 January 2020, 17:02:01 UTC
d8030ec Docs: explain why menu command should be passed to sway It was not obvious to me why until I saw a comment from @RyanDwyer on Reddit, so I think it's better to add an explanation. 15 January 2020, 17:01:57 UTC
70ea191 Fix unreliable scaling filter Two changes were made: - Bind the texture before glTexParameteri - Set the scaling filter before each wlr_render_texture_with_matrix call Logging in wlroots allows to check that the scaling filter is properly set prior to rendering. Fixes: 6968fb3123e6 ("add scale_filter output config option") Closes: https://github.com/swaywm/sway/issues/4798 15 January 2020, 17:01:50 UTC
2305237 Amend typo 15 January 2020, 17:01:46 UTC
4781b8e integer scaling, not integral 15 January 2020, 17:01:41 UTC
0c17332 Use transparency arg in the window focus event 15 January 2020, 17:01:35 UTC
06565b1 view: remove workspace pid mapping for assigns If a view is mapped to a workspace using an assign, the pid should still be removed from the pid mapping list. This prevents child processes from matching against it and mapping a view to a likely undesired workspace. 15 January 2020, 17:00:39 UTC
5250eeb input/cursor: handle setting a NULL image surface This fixes a crash when attempting to listen to a signal on a NULL cursor image surface. If the surface is NULL, the listener is just reinitialized using wl_list_init. 08 January 2020, 15:27:20 UTC
9d48a3d input/cursor: handle image surface destroy This adds a listener for the destroy event of the cursor image surface. This prevents a use-after-free when the last visible image surface is freed, there has not been a new cursor set, and the cursor is reshown. 08 January 2020, 15:27:20 UTC
c1cab4b swaybar: Fix input device removal Before swaybar would exit with a protocol error when a pointer or touch device was removed. 08 January 2020, 15:27:20 UTC
5539fb3 Fix small typo in sway-input(5) 08 January 2020, 15:27:20 UTC
e786eda Add missing items to documentation for GET_TREE response in ipc. A few items in the response for the get_tree ipc call were missing from the documentation. This adds some documentation for them. 08 January 2020, 15:27:20 UTC
2aecf93 xwayland: handle size_hints == NULL In case xcb-iccm is not installed on the system, size_hints will be null. Handle this as if the get_constraints functions was not implemented and return the defaults. Fixes #4870 08 January 2020, 15:27:20 UTC
c356637 input: Assign virtual input devices to their selected seats 08 January 2020, 15:27:20 UTC
1f4b3c9 Make all the container dimensions integers Containers are always fixed to the pixel grid so position and size them with integers instead of doubles. Functionally this should be no different since rounding down is already being done on things like layout. But it makes it clear what the intention is and avoids bugs where fractional pixels are used. The translating and moving code is still using doubles because the cursors can have fractional pixels and thus the code is plumbed that way. But that could also probably be changed easily by doing the integer conversions earlier and plumbing with int. 08 January 2020, 15:27:20 UTC
9ad2210 Make sure we don't calculate fractional pixel gaps When gaps are resized for lack of space the calculation could result in a gap size of non-integer pixels. This would result in containers located at non-integer pixels which would be subtly broken. 08 January 2020, 15:27:20 UTC
c284ed3 Avoid numerical instability in resize Because the layout code rounds down the dimensions of the windows resizing would often be off by one pixel. The width/height fraction would not exactly reflect the final computed width and so the resize code would end up calculating things wrong. To fix this first snap the container size fractions to the pixel grid and only then do the resize. Also use round() instead of floor() during layout to avoid a slightly too small width. This applies in two cases: 1. For the container we are actually resizing using floor() might result in being 1px too small. 2. For the other containers it might result in resizing them down by 1px and then if the container being resized is the last all those extra pixels would make the resize too large. Fixes #4391 08 January 2020, 15:27:20 UTC
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
back to top