aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-11Call apply_output_config instead of output_enableSimon Ser
apply_output_config will call output_enable if necessary. This fixes a lone wlr_output_enable call (without a matching wlr_output_commit call) which was a no-op.
2020-02-11Fix output scale auto-detectionSimon Ser
Closes: https://github.com/swaywm/sway/issues/4960
2020-02-11config: fix validation exit code and log levelBrian Ashworth
This makes it so invalid configs will return the exit code 1 when the validation flag is given. This also reduces the log level to SWAY_ERROR, which makes it so only the errors are shown. If someone wants more verbose output, the can use the -V/--verbose or -d/--debug flags. Additionally, this also makes it so swaybg will not be spawned when validating the config.
2020-02-11Fix ordering of setgid and setuidTeddy Reed
It looks like the code to drop privileges may have been broken via commit 37f0e1f. That commit reverted the correct order from #911, which first drops the gid then the uid. If setuid is called first then the target user may not have the ability to setgid.
2020-02-11container_at_{tabbed,stacked}: check x-axis boundsBrian Ashworth
The container_at_tabbed and container_at_stacked container were checking the bounds along the y-axis, but not the x-axis. This made it possible to cause a segfault for specific resolution, horizontal gap, and workspace children lengths. The issue is that child_index was -1 and was resulting in a buffer underflow. Adding the x-axis bound checks for early returns should prevent this from happening.
2020-02-10input: Map virtual-pointer to the requested outputAndri Yngvason
2020-02-10swaybar: fix i3bar relative coordinates when scaling is usedHristo Venev
24e8ba048aef4751c6fa1d5982ee634f921e6cf6 did not take scaling into account. The hotspot size used pixel coordinates, the absolute coordinates were logical, and the relative coordinates were completely wrong. This commit makes all coordinates use logical values. If `"float_event_coords":true` is sent in the handshake message, coordinates are sent as floating-point values. The "scale" field is an integer containing the scale value.
2020-02-10Do not truncate pointer coordinates to int.Hristo Venev
This increases the precision of the clicks when using i3bar.
2020-02-10Avoid calling strcmp on nullptrTill Hofmann
The function group_handler may get a nullptr as `new_group`. If that's the case, return true, as if `new_group` was the empty string. Also make the conversion to bool explicit when calling `strcmp`.
2020-02-06Fix seat_set_focus_layer crash when disabling outputSimon Ser
This fixes the following crash: #0 0x00007f7daac3af25 in raise () at /usr/lib/libc.so.6 #1 0x00007f7daac24897 in abort () at /usr/lib/libc.so.6 #2 0x00007f7daac24767 in _nl_load_domain.cold () at /usr/lib/libc.so.6 #3 0x00007f7daac33526 in () at /usr/lib/libc.so.6 #4 0x0000555bfbc35029 in seat_set_focus_layer (seat=0x555bfd76d860, layer=0x555bfdda2ff0) at ../sway/input/seat.c:1164 __PRETTY_FUNCTION__ = "seat_set_focus_layer" __PRETTY_FUNCTION__ = "seat_set_focus_layer" #5 0x0000555bfbc35029 in seat_set_focus_layer (seat=seat@entry=0x555bfd76d860, layer=0x555bfdda2ff0) at ../sway/input/seat.c:1164 __PRETTY_FUNCTION__ = "seat_set_focus_layer" #6 0x0000555bfbc25899 in handle_output_destroy (listener=0x555bfdb90688, data=<optimized out>) at ../sway/desktop/layer_shell.c:263 layer = 0x555bfdd6b040 sway_layer = 0x555bfdb90610 seat = 0x555bfd76d860 client = 0x555bfdb76d70 set_focus = <optimized out> #7 0x0000555bfbc5b669 in wl_signal_emit (data=0x555bfd795930, signal=0x555bfd795ae0) at /usr/include/wayland-server-core.h:472 l = <optimized out> next = 0x555bfdb6a3e8 __PRETTY_FUNCTION__ = "output_disable" index = <optimized out> #8 0x0000555bfbc5b669 in output_disable (output=output@entry=0x555bfd795930) at ../sway/tree/output.c:263 __PRETTY_FUNCTION__ = "output_disable" index = <optimized out> #9 0x0000555bfbc3b890 in apply_output_config (oc=0x555bfd7d73d0, output=output@entry=0x555bfd795930) at ../sway/config/output.c:321 wlr_output = 0x555bfd7afaf0 scale = <optimized out> output_box = <optimized out> #10 0x0000555bfbc28309 in handle_output_manager_apply (listener=0x555bfbc7f148 <server+488>, data=0x555bfdca6eb0) at ../sway/desktop/output.c:936 wlr_output = <optimized out> output = 0x555bfd795930 oc = <optimized out> server = 0x555bfbc7ef60 <server> config = 0x555bfdca6eb0 config_head = 0x555bfdb79350 ok = true #11 0x00007f7dab4fbf7c in wlr_signal_emit_safe (signal=<optimized out>, data=0x555bfdca6eb0) at ../subprojects/wlroots/util/signal.c:29 pos = 0x555bfbc7f148 <server+488> l = 0x555bfbc7f148 <server+488> cursor = {link = {prev = 0x555bfbc7f148 <server+488>, next = 0x7fff238a8390}, notify = 0x7f7dab4fbef0 <handle_noop>} end = {link = {prev = 0x7fff238a8370, next = 0x555bfd7419f8}, notify = 0x7f7dab4fbef0 <handle_noop>} #12 0x00007f7daa45469a in ffi_call_unix64 () at /usr/lib/libffi.so.6 #13 0x00007f7daa453fb6 in ffi_call () at /usr/lib/libffi.so.6 #14 0x00007f7daae6f82f in () at /usr/lib/libwayland-server.so.0 #15 0x00007f7daae6c193 in () at /usr/lib/libwayland-server.so.0 #16 0x00007f7daae6d7f2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0 #17 0x00007f7daae6c39c in wl_display_run () at /usr/lib/libwayland-server.so.0 This crash happens because focus can only be set on mapped surfaces.
2020-02-04criteria: match containers without viewAnders
Closes #4929 Replaces criteria_get_views with criteria_get_containers which can return containers without views when the criteria only contains container properties.
2020-02-04Change wordingCyril Levis
2020-02-04Add the possibility to capture only one screen if several screens are use.Cyril Levis
2020-02-04fix typoLucas M. Dutra
2020-01-30ipc: Handle unsupported binding event typesNathan Rossi
Handle binding event types that cannot be encoded gracefully by dropping the event. This prevents issues for binding types like BINDING_SWITCH, where the event would cause a crash.
2020-01-27add danish READMEsalkin-mada
2020-01-24Docs: Add marks field to get_tree responseJason Nader
2020-01-24Fix compiling with -fno-commonthermitegod
2020-01-23Adding the link to the Portuguese on the English version of README.mdJamelly Ferreira
2020-01-23Adding a version of README.md in PortugueseJamelly Ferreira
2020-01-22Update version to 1.4Drew DeVault
2020-01-22fish-completion: use the correct fallback directoryEli Schwartz
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.
2020-01-22completion: use pkg-config to get install location for bash/fishEli Schwartz
Both shells provide pkg-config files which declare their designated completionsdir. Use this as the primary source of truth.
2020-01-22meson: use join_paths to build paths, instead of string concatEli Schwartz
It makes sure to handle paths as paths, and is generally safer and the blessed solution.
2020-01-20Add documentation for floating_modifierAlex Maese
2020-01-20Add ability to remove the floating modifierAlex Maese
2020-01-18Check argc>0 before strcasecmp. Should shortcircuitJason Nader
2020-01-18commands/move: Fix crash when required args not providedJason Nader
Fixes #4919.
2020-01-16output: apply oc to outputs using wl_for_each_safeBrian Ashworth
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.
2020-01-16cmd_split: Refuse to split scratchpad hidden split containersRonan Pigott
2020-01-16cmd_move: Fix crash when moving to scratchpad hidden split containersRonan Pigott
2020-01-16Fix crash when showing scratchpad hidden split containersRonan Pigott
2020-01-16desktop/output: fix mem leak in handle_new_outputBrian Ashworth
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.
2020-01-16sway.5: Document missing bindsym flags for unbindsymRonan Pigott
sway.5: Remove indents within long command descriptions
2020-01-16sway-input.5: Document repeat_delay and repeat_rate only onceRonan Pigott
2020-01-16ipc-json: Remove unnecessary dereferenceRonan Pigott
2020-01-16commands/split: Fix error message typosRonan Pigott
2020-01-15Revert "Make all the container dimensions integers"Simon Ser
This reverts commit 79c5f5ba1245a8c3d575770419a6501447e78919. Fixes: https://github.com/swaywm/sway/issues/4908
2020-01-14container: add inactive fullscreen to focus stackBrian Ashworth
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.
2020-01-13Docs: explain why menu command should be passed to swayJason
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.
2020-01-13Fix unreliable scaling filterSimon Ser
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
2020-01-13Amend typoJason Nader
2020-01-10integer scaling, not integralCassandra McCarthy
2020-01-09Use transparency arg in the window focus eventJR Boyens
2020-01-09view: remove workspace pid mapping for assignsBrian Ashworth
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.
2020-01-06input/cursor: handle setting a NULL image surfaceBrian Ashworth
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.
2020-01-05input/cursor: handle image surface destroyBrian Ashworth
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.
2020-01-05render: do not render indicator on floating viewsBrian Ashworth
This adds a check to make it so the indicator is only rendered on views with a parent, which floating views do not. Since floating views do not have a parent, the workspace layout was being incorrectly used to determine whether to show the split indicator previously. This has no impact on floating containers and a view within a floating container will still have indicators rendered appropriately.
2020-01-05swaybar: Fix input device removalAndri Yngvason
Before swaybar would exit with a protocol error when a pointer or touch device was removed.
2020-01-05swaynag: Add multi-seat supportAndri Yngvason
This also adds cleanup for all seat resources