https://github.com/swaywm/sway

sort by:
Revision Author Date Message Commit Date
46be879 desktop: output: fix use-after-free in destroy handle_destroy would mark the output es being destroyed and commit the transaction. Committing the transaction results in the output being freed, the output manager can not retrieve the server reference afterwards, resulting in the following use-after-free: ==22746==ERROR: AddressSanitizer: heap-use-after-free on address 0x614000017088 at pc 0x560c1ac17136 bp 0x7ffeab146f20 sp 0x7ffeab146f10 READ of size 8 at 0x614000017088 thread T0 #0 0x560c1ac17135 in handle_destroy ../sway/desktop/output.c:566 #1 0x7f38af69330e in wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 #2 0x7f38af5d3dfc in drm_connector_cleanup ../subprojects/wlroots/backend/drm/drm.c:1448 #3 0x7f38af5d2058 in scan_drm_connectors ../subprojects/wlroots/backend/drm/drm.c:1240 #4 0x7f38af5c6a59 in drm_invalidated ../subprojects/wlroots/backend/drm/backend.c:135 #5 0x7f38af69330e in wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 #6 0x7f38af5e827a in udev_event ../subprojects/wlroots/backend/session/session.c:52 #7 0x7f38aef5d7f1 in wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0+0xa7f1) #8 0x7f38aef5c39b in wl_display_run (/usr/lib/libwayland-server.so.0+0x939b) #9 0x560c1ac0afbe in server_run ../sway/server.c:225 #10 0x560c1ac09382 in main ../sway/main.c:397 #11 0x7f38aed35ce2 in __libc_start_main (/usr/lib/libc.so.6+0x23ce2) #12 0x560c1abea10d in _start (/usr/local/bin/sway+0x3910d) 0x614000017088 is located 72 bytes inside of 432-byte region [0x614000017040,0x6140000171f0) freed by thread T0 here: #0 0x7f38af82df89 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:66 #1 0x560c1acbd1ed in output_destroy ../sway/tree/output.c:243 #2 0x560c1ac23ce5 in transaction_destroy ../sway/desktop/transaction.c:66 #3 0x560c1ac26b71 in transaction_progress_queue ../sway/desktop/transaction.c:348 #4 0x560c1ac284ca in transaction_commit_dirty ../sway/desktop/transaction.c:539 #5 0x560c1ac17110 in handle_destroy ../sway/desktop/output.c:564 #6 0x7f38af69330e in wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 #7 0x7f38af5d3dfc in drm_connector_cleanup ../subprojects/wlroots/backend/drm/drm.c:1448 #8 0x7f38af5d2058 in scan_drm_connectors ../subprojects/wlroots/backend/drm/drm.c:1240 #9 0x7f38af5c6a59 in drm_invalidated ../subprojects/wlroots/backend/drm/backend.c:135 #10 0x7f38af69330e in wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 #11 0x7f38af5e827a in udev_event ../subprojects/wlroots/backend/session/session.c:52 #12 0x7f38aef5d7f1 in wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0+0xa7f1) previously allocated by thread T0 here: #0 0x7f38af82e5a1 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:95 #1 0x560c1acbc228 in output_create ../sway/tree/output.c:91 #2 0x560c1ac17ba2 in handle_new_output ../sway/desktop/output.c:656 #3 0x7f38af69330e in wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 #4 0x7f38af5e4ce8 in new_output_reemit ../subprojects/wlroots/backend/multi/backend.c:143 #5 0x7f38af69330e in wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 #6 0x7f38af5d26d4 in scan_drm_connectors ../subprojects/wlroots/backend/drm/drm.c:1294 #7 0x7f38af5c6a59 in drm_invalidated ../subprojects/wlroots/backend/drm/backend.c:135 #8 0x7f38af69330e in wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29 #9 0x7f38af5e827a in udev_event ../subprojects/wlroots/backend/session/session.c:52 #10 0x7f38aef5d7f1 in wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0+0xa7f1) SUMMARY: AddressSanitizer: heap-use-after-free ../sway/desktop/output.c:566 in handle_destroy Shadow bytes around the buggy address: 0x0c287fffadc0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x0c287fffadd0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c287fffade0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c287fffadf0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c287fffae00: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd =>0x0c287fffae10: fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c287fffae20: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c287fffae30: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa 0x0c287fffae40: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c287fffae50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c287fffae60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Retrieve the reference before the output is destroyed and update the output_management state with the saved reference. 03 June 2019, 12:30:28 UTC
b06d2eb Use parent get_root_coords in subsurfaces Subsurfaces need access to the parent get_root_coords impl for positioning in popups. To do this, we store a reference to the parent view_child where applicable. Fixes #4191. 03 June 2019, 12:30:28 UTC
d088224 common/ipc-client: remove ipc recv timeout log This just removes the ipc recv timeout log statement in `ipc_recv_set_timeout`. The `tv_sec` field of `struct timeval` has varying types and/or sizes depending on the platform and architecture. On some of these, the current format string will cause compilation errors. Additionally, the log statement is not extremely useful and the function is currently only used by swaymsg, which has a hardcoded log level that will prevent it from even being shown, so there is no point in even keeping it. 03 June 2019, 12:30:28 UTC
260ea42 input/switch: fix indentation of file This just changes the indentation of `sway/input/switch.c` to use tabs instead of spaces since I messed up and missed it when approving the PR that added the file. 03 June 2019, 12:30:28 UTC
74ac8d0 Update output manager config on all output events The output manager config was not properly updated when output configuration was changed through some other means (such as a command). 03 June 2019, 12:30:28 UTC
5c20c05 commands/bar: fix mode and hidden_state at runtime For compatibility with i3, `bar mode` and `bar hidden_state` do not require bar-ids (in the normal location) at runtime since they follow the alternative syntax: `bar mode|hidden_state <option> [<bar-id>]` This removes the incorrect error that the bar-id is missing for those two bar subcommands 03 June 2019, 12:30:26 UTC
e12b366 bar: fix segfault with missing or invalid bar id Prior to this patch, if I ran something like this, sway would crash: swaymsg bar height 50 or swaymsg bar not-a-bar-id color bg #ff0000 This was in contrast to other bar subcommands, like status_command, which would exit with a "No bar defined" message. The difference between the subcommands that crashed and the ones that exited was that some subcommands had a check to see if a bar was specified, while others just assumed that it had been and carried on until they segfaulted. Because this check was identical in every subcommand it was present in, and I couldn't think of a case where it would be valid to run a bar subcommand without specifying which bar to apply it to, I moved this check from individual subcommands into the bar command, which is already responsible for actually setting the specified bar. This reduced code duplication, and fixed the crash for the subcommands that were missing this check. 21 May 2019, 14:16:26 UTC
b8f12b4 input/keyboard: attempt default keymap on failure This attempts to use the default keymap when the one defined in the input config fails to compile. The goal is to make it so the keyboard is always in a usable state, even if it is not the user's requested settings as usability is more important. This also removes the calls to `getenv` for the `XKB_DEFAULT_*` family of environment variables. The reasoning is libxkbcommon will fallback to using those (and then the system defaults) when any of the rule names are `NULL` or an empty string anyway so there is no need for sway to duplicate the efforts. 21 May 2019, 14:16:17 UTC
56b7d89 config/output: fix typo in merge_id_on_name This fixes a typo in `merge_id_on_name` for output configs that resulted in incorrect id-on-name output configs being generated. Instead of using the output that matched the name or identifier, the first output in the list was being used instead. This could cause merging across unrelated output configs and preventing output configs from being applied correctly 11 May 2019, 17:34:48 UTC
184663c Destroy swaybg client on reload When reloading, this destroys the old config's swaybg client before spawning the new config's swaybg. This fixes a race condition where the old config's swaybg client's destroy was being called after the new config's swaybg client was being spawned. This was causing the reference to the new swaybg client to be removed and never destroyed. This also modifies handle_swaybg_client_destroy to grab the config reference using wl_container_of on the listener since the swaybg client may be the old config swaybg client and should be used instead of the global config instance 11 May 2019, 17:34:47 UTC
d350660 Fix xdg-decoration unconfigured if set before first commit In case a set_mode/unset_mode request is sent before the first commit, we need to handle the value and send our preference accordingly. This fixes xdg-decoration support for Qt apps. 11 May 2019, 17:34:45 UTC
464a3b4 Bump required wlroots version 03 May 2019, 17:10:53 UTC
c8e4ca3 swaymsg: fix quiet error reporting This makes it so swaymsg still returns the correct successful or failed error code when in quiet mode 03 May 2019, 17:09:49 UTC
c118618 sway.5.scd: clarify workspace config commands This clarifies that `workspace <name> output <outputs...>` and `workspace <name> gaps ...` do not operate on existing workspaces. Additionally, alternate commands/solutions that operate on existing workspaces are listed. 01 May 2019, 03:38:00 UTC
13cbb3b cmd_move: add support for output current This adds support for the following commands for i3 compatibility: - `move [window|container] [to] output current` - `move workspace to [output] current` - `move workspace [to] output current` The above commands are only useful when used with criteria. 30 April 2019, 21:22:02 UTC
3b3e056 Fix a silly mistake 28 April 2019, 18:07:47 UTC
5b454ac Don't send pointer motion when rebasing the cursor 28 April 2019, 18:07:47 UTC
866a19b Clear pointer focus during move and resize seatops 28 April 2019, 18:07:47 UTC
812651d Remove extra inclusion of stdio.h 28 April 2019, 02:53:21 UTC
e41e8d3 Add link to i3 in first mention of README 27 April 2019, 23:28:24 UTC
957a704 Add German translation of the README 27 April 2019, 21:05:43 UTC
9aafef3 Don't submit too much damage 27 April 2019, 15:50:49 UTC
e6fbb3c config: fix clang warning 26 April 2019, 17:56:48 UTC
c42497a bindsym: change xkb_rule_names initialization 26 April 2019, 17:56:48 UTC
ddf63ff bindsym: consider xkb_rule_names for --to-code 26 April 2019, 17:56:48 UTC
d27a5e1 bindsym: update the man page to include --to-code 26 April 2019, 17:56:48 UTC
998de8f bindsym: change default keymap for --to-code Replace XKB_DEFAULT_LAYOUT with NULL as the default layout. 26 April 2019, 17:56:48 UTC
f1609ab config: simplify keysym translation fields Do not store `xkb_keymap` since it can be retrieved from `xkb_state`. 26 April 2019, 17:56:48 UTC
a09c144 Implement bindsym --to-code * `bindsym --to-code` enables keysym to keycode translation. * If there are no `xkb_layout` commands in the config file, the translation uses the XKB_DEFAULT_LAYOUT value. * It there is one or more `xkb_layout` command, the translation uses the first one. * If the translation is unsuccessful, a message is logged and the binding is stored as BINDING_KEYSYM. * The binding keysyms are stored and re-translated when a change in the input configuration may affect the translated bindings. 26 April 2019, 17:56:48 UTC
bd32b30 ci: enable all features If unspecified, feature options are set to "auto", which means enabled only if the required dependencies are found. In CI we don't want to miss compilation errors because a dependency hasn't been found and code isn't built. Leave FreeBSD out for now because it uses a subproject (haven't found a way to make auto_features=enabled only apply to the toplevel project). 25 April 2019, 16:00:55 UTC
236ca63 swaybg: split into standalone project The new upstream is https://github.com/swaywm/swaybg This commit also refactors our use of gdk-pixbuf a bit, since the only remaining reverse dependency is swaybar tray support. 25 April 2019, 15:44:28 UTC
f62c755 Remove obsolete README translations Everything which still mentioned wlc has been removed. 25 April 2019, 15:18:05 UTC
8adb70f Set the correct version for wlroots dependency 25 April 2019, 06:31:38 UTC
462ad4e cmd_move: respect workspace layout when inserting When moving a container to become a direct child of the workspace and the workspace's layout is tabbed or stacked, wrap it in a container with the same layout. This allows for the following: - Run `layout tabbed|stacked` on an empty workspace (or use `workspace_layout tabbed|stacked` in the config) - Open some views - Move one of the views in any direction - Open another view - The new container should also be `tabbed`/`stacked` 25 April 2019, 01:12:24 UTC
dc7a393 swaybar: add multiseat support This just adds multiseat support to swaybar 24 April 2019, 13:16:37 UTC
583ceff swaybar: hide mode visibility improvements This allows swaybar to become visible when the mode changes (to any mode other than the default). swaybar will be hidden again when the modifier is pressed and released or when switching back to the default mode. This also applies the same logic to visible by urgency to hide swaybar when the modifier is pressed and released. These changes are to match i3's behavior. 24 April 2019, 13:14:48 UTC
b6e5506 Update for wlroots#1660 23 April 2019, 20:37:44 UTC
e3d94cb Fix uninitialized read for wlr_surface_send_frame 21 April 2019, 11:06:15 UTC
20762ec Validate icon_struct in read_theme_file The read_theme_file function used to return an invalid icon_struct in some cases, for example when an empty index.theme file was read. This makes sure the struct we're returning is always valid as per the Icon Theme specification. Signed-off-by: Maxime “pep” Buquet <pep@bouah.net> 20 April 2019, 20:41:02 UTC
9099adb swaynag: revamp type configs This revamps the type configs for swaynag. All sizing attributes for swaynag are now `ssize_t` instead of `uint32_t` to allow for a default value of `-1`, which allows for `0` to be a valid value. Additionally, the initialization of the type configs has been changed from a simple calloc to use a new function `swaynag_type_new`. `swaynag_type_new` calloc's the memory, checks for an allocation failure, sets the name, and all sizes to -1. The layering order has also been changed to default, general config, type config, and as highest priority command line arguments. Finally, `swaynag_type_merge` has been modified to handle the layering and sizing changes. 20 April 2019, 15:14:41 UTC
59d9a99 ipc: fix criteria for emitting bar_state_update This fixes the criteria for emitting a `bar_state_update` event to notify swaybar (and any other bars utilizing the event) on whether the bar is visible by modifier. It is not enough to only emit the event when both the bar mode and bar hidden state are `hide` since it is possible to release the modifier while hidden state is `show` and then change hidden state to `hide` without pressing the modifier. This also emits the event whenever visible by modifier is set and should no longer be regardless of the mode and state to ensure that it gets properly cleared. If visible by modifier is not set and the bar is not in `hide`/`hide`, then no events will be sent and visible by modifier will not be set 20 April 2019, 15:09:11 UTC
09595da cmd_move: allow for all i3 syntax options This modifies cmd_move to allow for the syntax options allowed by i3. The following syntaxes are supported: - `move left|right|up|down [<amount> [px]]` - `move [--no-auto-back-and-forth] [window|container] [to] workspace <name>|next|prev|next_on_output|prev_on_output|current|number <num>` - `move [window|container] [to] output <name/id>|left|right|up|down` - `move [window|container] [to] mark <mark>` - `move workspace to [output] <name/id>|left|right|up|down` - `move [window|container] [to] [absolute] position <x> [px] <y> [px]` - `move [window|container] [to] [absolute] position center` - `move [window|container] [to] position mouse|cursor|pointer` This also allows retains the following syntax option that is not supported by i3, but is supported in sway 1.0: - `move workspace [to] output <name/id>|left|right|up|down` The changes are: - `window` and `container` are now optional - `output` is now optional for `move workspace` when `to` is given There is also stricter command checking now. If `absolute` or `--no-auto-back-and-forth` are given for commands that do not support them, it will be treated as invalid syntax instead of being silently ignored. 19 April 2019, 14:39:57 UTC
5e925f0 hide_edge_borders.c: add missing case for --i3 Disable the i3-compatible behavior if the option '--i3' is not given. Previously it was only possible to disable it by changing the config file. Now it also works via swaymsg. 18 April 2019, 21:05:49 UTC
35ddd9a Add unbindsym/unbindcode command for swaybar 18 April 2019, 03:29:43 UTC
8d4f8ae Add unbindswitch command 18 April 2019, 03:29:43 UTC
852f1f0 Create unbindsym and unbindcode commands 18 April 2019, 03:29:43 UTC
d7d29fe swaymsg: add timeout and type checks This adds a 3 second timeout to the initial reply in swaymsg. This prevents swaymsg from hanging when `swaymsg -t get_{inputs,seats}` is used in i3. The timeout is removed when waiting for a subscribed event or monitoring for subscribed events. This also adds type checks to commands where i3 does not reply with all of the properties that sway does (such as `modes` in `get_outputs`). This is mostly just a behavioral adjustment since swaymsg should run on i3. When running under i3, some command reply's (such as the one for `get_outputs) may have more useful information in the raw json than the pretty printed version. 17 April 2019, 06:07:08 UTC
aa4deef Fix the payload type returned by IPC If a client is subscribed and sends a subsequent ipc command which causes event updates, then those event updates override the `client->current_command` and send the incorrect type for the payload associated with the command. Example: SUBSCRIBE {window} RUN_COMMAND focus -> PAYLOAD_TYPE is 0x80000002 for window events Therefore, we decouple the `client->current_command` by passing it as an argument to the ipc_send_reply function, avoiding a data race. The same is done for the `client->payload_length` as a precautionary measure for the same reason. 17 April 2019, 03:48:44 UTC
9ac2342 Don't apply hide_edge_borders to floating windows This change matches i3's behavior. 16 April 2019, 21:05:49 UTC
e9e1fbc view.c: refactor view_autoconfigure() 16 April 2019, 21:05:49 UTC
2f9eed6 Add documentation for rename workspace 16 April 2019, 13:34:07 UTC
fd69036 Send disabled output available modes on IPC get_outputs - Also fix missing trailing newline on pretty print Signed-off-by: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com> 16 April 2019, 04:16:20 UTC
b2cfceb Add deprecation warnings for new_float, new_window, and force_focus_wrapping. 15 April 2019, 00:44:12 UTC
bd37205 Implement input type configs (#3784) Add support for configurations that apply to a type of inputs (i.e. natural scrolling on all touchpads). A type config is differentiated by a `type:` prefix followed by the type it corresponds to. When new devices appear, the device config is merged on top of its type config (if it exists). New type configs are applied on top of existing configs. 14 April 2019, 23:31:36 UTC
6737b90 Add heuristics to differentiate touchpads Use libinput_device_config_tap_get_finger_count to determine whether a pointer is a touchpad. swaymsg is also updated to reflect the new touchpad type. 14 April 2019, 23:31:36 UTC
6961bf2 Spawn swaynag as a wayland client This spawns swaynag as a wayland client similar to how swaybar and swaybg are already done 14 April 2019, 09:41:59 UTC
8c69da1 swaynag: fix pointer management Currently on master, swaynag will retrieve a pointer instance whenever the capabilities change and WL_SEAT_CAPBILITY_POINTER is set. The pointer instances were never being destroyed so swaynag received events multiple times due to having several instances of the pointer. This fixes it so if there is already a pointer instance, swaynag does not attempt to retrieve another. Additionally, if the pointer capability is removed, the pointer instance is destroyed. 14 April 2019, 07:24:19 UTC
69a1a0f Fix scratchpad fullscreen behavior and crash When setting fullscreen on a hidden scratchpad container, there was a check to see if there was an existing fullscreen container on the workspace so it could be fullscreen disabled first. Since the workspace is NULL, it would cause a SIGSEGV. This adds a NULL check to avoid the crash. This also changes the behavior of how fullscreen is handled when adding a container to the scratchpad or changing visibility of a scratchpad container to match i3's. The behavior is as follows: - When adding a container to the scratchpad or hiding a container back into the scratchpad, there is an implicit fullscreen disable - When setting fullscreen on a container that is hidden in the scratchpad, it will be fullscreen when shown (and fullscreen disabled when hidden as stated above) - When setting fullscreen global on a container that is hidden in the scratchpad, it will be shown immediately as fullscreen global. The container is not moved to a workspace and remains in the scratchpad. The container will be visible until fullscreen disabled or killed. Since the container is in the scratchpad, running `scratchpad show` or `move container to scratchpad` will have no effect This also changes `container_replace` to transfer fullscreen and scratchpad status. 13 April 2019, 14:48:37 UTC
913445e Fix potential null accesses 13 April 2019, 14:35:17 UTC
e7d6b8e swaybg: add manpage 13 April 2019, 14:26:17 UTC
27f5136 Fix scratchpad logic for floating windows When a tiled window is sent to the scratchpad, we want to use sane defaults, which is to center it and resize it to the default. For floating windows, we want to use their existing geometry. 12 April 2019, 20:52:24 UTC
090e101 sway-input.5: add xkeyboard-config(7) to "see also" Since xkeyboard-config(7) is mentioned in the man page, add a reference to the "see also" section. 12 April 2019, 18:45:13 UTC
bd4c395 cmd_focus: raise floating for `<criteria> focus` Floaters are currently raised for `focus <direction>`. This extends the same functionality to `<criteria> focus`. 11 April 2019, 15:19:45 UTC
1952261 Honor output for xdg_toplevel_set_fullscreen This honors the fullscreen output request for `xdg_toplevel_set_fullscreen` and `zxdg_toplevel_v6_set_fullscreen`. If the request was sent before mapping, the fullscreen output request will be retrieved from the client_pending state for the toplevel. The output will be passed to `view_map` and if there is a workspace on the output, the view will be placed on that workspace. If the request comes in after being mapped, the view will be moved to the workspace on the output (if there is one) before becoming fullscreen. 11 April 2019, 15:18:48 UTC
e0324fc config/output: unbreak on 32-bit architectures sway/config/output.c:624:54: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] sway_log(SWAY_DEBUG, "spawn_swaybg cmd[%ld] = %s", k, cmd[k]); ~~~ ^ %zu include/log.h:40:74: note: expanded from macro 'sway_log' _sway_log(verb, "[%s:%d] " fmt, _sway_strip_path(__FILE__), __LINE__, ##__VA_ARGS__) ^~~~~~~~~~~ 08 April 2019, 20:02:52 UTC
4b892a7 Add margin to short_text handling. Add a 3xscale margin matching other spacing in swaybar as part of short text width calculations 04 April 2019, 20:14:08 UTC
94dc57f Ensure predicted position for short text handling doesn't overflow. - Predicted status line can be negative, so corresponding variables should not be unsigned. Changed to double as position is actually calculated as double. 04 April 2019, 20:14:08 UTC
0553e75 Implement handling of short_text field of i3 input protocol. Matches i3bar behavior of setting all blocks to use the short_text if the full text width does not fit. 04 April 2019, 20:14:08 UTC
75e7bd2 swaybg: one instance for all outputs This makes it so there will only be one swaybg instance running instead of one per output. swaybg's cli has been changed to a xrandr like interface, where you select an output and then change properties for that output and then select another output and repeat. This also makes it so swaybg is only killed and respawned when a background changes or when reloading. 04 April 2019, 17:08:21 UTC
0ad905f idle_inhibit: fix crash during view destruction This fixes a crash for application set idle inhibitors when their associated view is being destroyed. There is a call to `view_is_visible` to determine is the view is visible and it assumes that the view has an container, but it is possible for the container to already have been destroyed at this point. There is a NULL check for the view in `check_active` and this re-adds the NULL check for the container that I accidentally dropped when refactoring during the inhibit_idle command PR 03 April 2019, 16:46:08 UTC
f0f20f9 root_scratchpad_hide: fix crash when layer focused This fixes a crash in `root_scratchpad_hide` when a layer surface is focused. Since `seat_get_focus` is NULL when a layer surface is focused, the call to `node_has_ancestor` was causing a SIGSEGV since it was attempting to access the parent of NULL. This changes the call to `seat_get_focus_inactive`, which will return a node even when a layer surface is focused and is also guaranteed to have something in the focus stack if a scratchpad container is being hidden (otherwise there would not be any containers yet). 03 April 2019, 16:45:17 UTC
1e1d9e1 fix broken link to README.zh-CN.md 02 April 2019, 07:35:21 UTC
5e0a928 fix typo 02 April 2019, 05:42:10 UTC
f314050 Update formatting of zh-cn link in README.md 01 April 2019, 14:56:56 UTC
4938da2 add link to README-zh-CN 01 April 2019, 14:55:49 UTC
078935a fix cs 01 April 2019, 14:55:49 UTC
3353bb5 fix cs 01 April 2019, 14:55:49 UTC
a32125c add chinese translation 01 April 2019, 14:55:49 UTC
679c058 scratchpad: set initial size This matches i3's behavior of setting scratchpad containers to 50% of the workspace's width and 75% of the workspace's height, bound by the minimum and maximum floating width/height. 31 March 2019, 23:49:05 UTC
0676ace floating: fix size of non-view containers This fixes the sizing of floating non-view containers. On master, the floater will get set to the maximum width and height, which by default is the entire output layout. When setting a non-view container to floating, this will set a sane default size of 50% of the workspace width and 75% of the workspace height, or whatever the closest is that the minimum and maximum floating width/height values allow for. On all future calls to `floating_natural_resize`, the width and height will be kept unless they need to be changed to respect the min/max floating width/height values. 31 March 2019, 23:49:05 UTC
dd28e6a Fix xwayland configure request scratchpad crash This fixes a crash in `container_init_floating` when a xwayland view sends a configure request while in the scratchpad. `container_init_floating` gets called so the configured minimum and maximum sizes gets respected when resizing to the requested size. Since the workspace was NULL, it would SIGSEGV when attempting to get the workspace's output for the output box retrieval. This extracts the resizing portion of `container_init_floating` into a separate function. If the container is in the scratchpad, it will just be resized and skip the centering. Additionally, `container_init_floating` has been renamed to `container_floating_resize_and_center` to more accurately describe what it does. 31 March 2019, 06:32:23 UTC
31eeda1 Fix a crash in swaybar when an icon dir is not readable 30 March 2019, 18:13:34 UTC
2cae0d5 Fix null pointer crash when doing tiling drag * Create layout S[V[view view] view] * Drag bottom view to the top * Sway would crash when the cursor hovers the V[view view] title while dragging 29 March 2019, 15:26:06 UTC
bfdee13 bindings: fix overwrite log argument mismatch Thanks, @RedSoxFan, for the review spotting another instance. 27 March 2019, 16:07:52 UTC
3a31889 Fix crash for floating command on scratchpad window 27 March 2019, 03:38:23 UTC
e9d0964 Update README.uk.md 26 March 2019, 13:25:02 UTC
d9de5b8 Implement inhibit_idle command This implements the following command to set/unset a user idle inhibitor for a view: `inhibit_idle focus|fullscreen|open|none|visible` The modes are as follows: - focus: inhibited when the view is focused by any seat - fullscreen: inhibited when the view is fullscreen (or a descendant of a fullscreen container) and is visible on any output - open: inhibited until the view is closed or the inhibitor is unset or changed - none: unsets any user set idle inhibitors for the view - visible: inhibited when the view is visible on any output This should have no effect on idle inhibitors set by the applications themselves and those should still work as intended. Since this operates on the view in the handler context, it is possible to set it on the currently focused view, on any existing view with criteria, or for any future view with for_window. 25 March 2019, 01:26:12 UTC
8d2c982 Fix #3924 Removes "unescape_string(argv[i]);". Since "do_var_replacement(argv[i])" never adds escape characters, it is both wrong and unnecessary to remove escape characters on the next line. This caused characters that were meant to be escaped to not be anymore. 25 March 2019, 01:04:15 UTC
c3d7036 Updated the french readme (#3964) * Updated the french readme Removed the image at the start of the readme. Removed the mention of bounties. Updated the dependencies. Removed a few lines that were not present in the english readme anymore. * Fix errors. Fixed capitalisation. Changed "root" to italics. 24 March 2019, 19:19:13 UTC
6e30468 Add support for manually setting subpixel hinting on outputs. Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this. Addresses https://github.com/swaywm/sway/issues/3163 24 March 2019, 07:37:24 UTC
200833c Allow for workspace renaming during exec handling This change adds support for renaming a workspace when `exec` command is being processed by keeping sway_workspace and pid_workspace names in sync. The change can be verified by running following command: swaymsg exec <application>; swaymsg rename workspace number 1 to 5 Fixes: #3952 23 March 2019, 21:49:27 UTC
cd8b4ac fix opening a floating view on the NOOP output Since the NOOP output has no size, the minimum floating size is greater than the workspace size for the NOOP output. In this case, the floater gets centered in the output instead of the workspace. However, the NOOP output is not part of the output layout and thus has a NULL box. Attempting to access the properties of this box was causing a segfault. This fixes the issue by just setting the floater's box to all zeroes when mapping on the NOOP output. When the workspace gets moved from the NOOP output to a new output, any floater whose width or height is zero or has an x or y location outside of the output, gets passed to `container_init_floating` again. This will then set the appropriate size and centering. For any floater that has a valid size and location, they are preserved. 23 March 2019, 21:39:42 UTC
7d2076c criteria: fix __focused__ when no focus or unset This fixes the behavior of `__focused__` when there is no focused view to match i3's behavior of successfully matching no views instead of returning an error of a missing value. It also applies the same logic when a token is not applicable (or unset) for a view such as `app_id` for a focused xwayland view or `class` for a focused xdg-shell view. This adds an `autofail` boolean to `struct criteria`. If it is set to `true`, then `criteria_matches_view` will immediately bail out as a no match. If `autofail` is set, the criteria will also not be considered empty by `criteria_is_empty`. To set this new `autofail` property, `get_focused_prop` will now take in a boolean pointer of the same name. If `__focused__` is supported for the token and there is no focused view or the focused view does not have a value for the token, then the boolean will be set to true. In `parse_token`, the boolean value will be checked and if set to true, then `criteria->autofail` will be set to true and `parse_token` will bail successfully. Tokens will still be parsed to make sure the whole criteria is syntactically valid, which is also why `&criteria->autofail` is not passed to `get_focused_prop` and a local boolean is declared in `parse_token`. 23 March 2019, 07:53:23 UTC
8cd7f01 cmd_mode: allow cmd_set to be a subcommand This allows set to be used in mode blocks 23 March 2019, 06:07:25 UTC
cdcc2a5 Support focus <direction> for floating containers This kind of worked before in that focus would change, but it wasn't intentionally supported and had side effects such as not raising the container, and being unable to cycle through all floaters depending on the direction used. This commit makes it properly supported. The new focus is chosen based on the distance to the center point of each floating container in the workspace, and the container is raised. In a multi output setup, if both visible workspaces have floating containers, focus will NOT cross into the other output. It is assumed the user will use a workspace binding in this case. If two floating containers occupy the exact same center point and you try to focus in a direction, the behaviour is undefined. 20 March 2019, 14:55:28 UTC
bdb4024 Support WLR_INPUT_DEVICE_SWITCH in sway This commit adds support for laptop lid and tablet mode switches as provided by evdev/libinput and handled by wlroots. Adds a new bindswitch command with syntax: bindswitch <switch>:<state> <command> Where <switch> is one of: tablet for WLR_SWITCH_TYPE_TABLET_MODE lid for WLR_SWITCH_TYPE_LID <state> is one of: on for WLR_SWITCH_STATE_ON off for WLR_SWITCH_STATE_OFF toggle for WLR_SWITCH_STATE_TOGGLE (Note that WLR_SWITCH_STATE_TOGGLE doesn't map to libinput and will trigger at both on and off events) 20 March 2019, 03:58:47 UTC
bfa20e6 Clean up focus follows mouse logic Firstly, this fixes a recent regression where having `focus_follows_mouse yes` and hovering an inactive tab caused it to gain focus. The code was missing a view_is_visible check. The code is handling the logic for both focus_follows_mouse yes and focus_follows_mouse always, where the latter will apply when nudging the mouse after a workspace switch. However, the view_is_visible check didn't apply when using focus_follows_mouse always, so hovering a tab with that configuration would cause is to focus. This was a bug. When adding the view_is_visible check, it now applies to both yes and always. Note that the comment about the split container was wrong. At this point the hovered node cannot be a split container because it passed the node_is_view check. The comment has been removed. Lastly, the else condition is completely removed. This didn't appear to have any practical use. Setting focus to the result of seat_get_focus_inactive is very likely going to be a no op. There is a slim chance that this will break something, and if so I'd like to find out what so it can be properly documented in the code. 19 March 2019, 20:38:06 UTC
e9a4762 Remove debug tree This feature has served its purpose. It's better to use IPC now. 18 March 2019, 15:29:19 UTC
38bd60c Document the title_format command 18 March 2019, 15:27:36 UTC
0327c99 config/output: handle wildcard in get_output_config In #3916, I overlooked that `get_output_config` does not handle wildcards unless the config is reloading, which is a remnant of older iterations of the output config handling that went unnoticed due to `output_find_config` handling it. With the current version of the output config handling, having `get_output_config` handle wildcard configs is actually preferable. This fixes having only a wildcard output config in the config file or when connecting/enabling a new output with only a wildcard config existing. 17 March 2019, 16:05:27 UTC
back to top