aboutsummaryrefslogtreecommitdiffstats
path: root/sway
Commit message (Collapse)AuthorAge
...
* Fix output transform anticlockwiseLibravatar Simon Ser2020-02-17
| | | | This wouldn't have any effect if the transform was flipped.
* output: fix updating output manager configLibravatar Brian Ashworth2020-02-16
| | | | | | | | | | | | | | | | | | The output manager config is created when the output is created. It is updated when the mode, transform, scale, or layout for the output changes, as well as, when the output is destroyed. Since the output->enabled property was not being set before calling apply_output_config, the output event handlers were early returning and never updating the output manager config when the output state was committed. This fixes the issue by setting output->enabled in apply_output_config below the output disabling section. There are also a few other minor changes that are required to function. Additionally, this renames output_enable to output_configure to better describe the recent changes.
* Fix crash: use wlr_output->name instead of possibly missing oc->nameLibravatar Yorick van Pelt2020-02-13
| | | | | Fixes segfault on start: https://gist.github.com/yorickvP/89eccb3782c6edb22aeda6ce9c6d4fcb
* cmd_swap: fix test_mark conditionLibravatar Brian Ashworth2020-02-13
| | | | | | | The condition in test_mark was checking the negation of list_seq_find. This works fine for the first mark, but fails for every other mark. This fixes the condition to check for anything other than -1, which is the value returned from list_seq_find for index not found.
* Apply the output scale filter after the output commitLibravatar Simon Ser2020-02-11
| | | | The smart output filter uses the current output scale.
* Stop calling apply_output_config from output_enableLibravatar Simon Ser2020-02-11
| | | | | | | | | | | | | | | | The only output_enable caller is now apply_output_config. Stop calling apply_output_config from output_enable to simplify the code and avoid the back-and-forth between these two functions. output_enable is now the symmetric of output_disable: it just marks the output as enabled and performs bookkeeping (e.g. creating teh default workspace). It is called from apply_output_config after the output commit, so that it can read the current output state and act accordingly. This change also allows us to avoid an extraneous wlr_output_commit. References: https://github.com/swaywm/sway/issues/4921
* Call apply_output_config instead of output_enableLibravatar Simon Ser2020-02-11
| | | | | | | 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.
* Fix output scale auto-detectionLibravatar Simon Ser2020-02-11
| | | | Closes: https://github.com/swaywm/sway/issues/4960
* config: fix validation exit code and log levelLibravatar Brian Ashworth2020-02-11
| | | | | | | | | 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.
* Fix ordering of setgid and setuidLibravatar Teddy Reed2020-02-11
| | | | | | | 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.
* container_at_{tabbed,stacked}: check x-axis boundsLibravatar Brian Ashworth2020-02-11
| | | | | | | | | 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.
* input: Map virtual-pointer to the requested outputLibravatar Andri Yngvason2020-02-10
|
* Fix seat_set_focus_layer crash when disabling outputLibravatar Simon Ser2020-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* criteria: match containers without viewLibravatar Anders2020-02-04
| | | | | | | | Closes #4929 Replaces criteria_get_views with criteria_get_containers which can return containers without views when the criteria only contains container properties.
* ipc: Handle unsupported binding event typesLibravatar Nathan Rossi2020-01-30
| | | | | | 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.
* Docs: Add marks field to get_tree responseLibravatar Jason Nader2020-01-24
|
* Fix compiling with -fno-commonLibravatar thermitegod2020-01-24
|
* Add documentation for floating_modifierLibravatar Alex Maese2020-01-20
|
* Add ability to remove the floating modifierLibravatar Alex Maese2020-01-20
|
* Check argc>0 before strcasecmp. Should shortcircuitLibravatar Jason Nader2020-01-18
|
* commands/move: Fix crash when required args not providedLibravatar Jason Nader2020-01-18
| | | | Fixes #4919.
* output: apply oc to outputs using wl_for_each_safeLibravatar Brian Ashworth2020-01-16
| | | | | | 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.
* cmd_split: Refuse to split scratchpad hidden split containersLibravatar Ronan Pigott2020-01-16
|
* cmd_move: Fix crash when moving to scratchpad hidden split containersLibravatar Ronan Pigott2020-01-16
|
* Fix crash when showing scratchpad hidden split containersLibravatar Ronan Pigott2020-01-16
|
* desktop/output: fix mem leak in handle_new_outputLibravatar Brian Ashworth2020-01-16
| | | | | | 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.
* sway.5: Document missing bindsym flags for unbindsymLibravatar Ronan Pigott2020-01-16
| | | | sway.5: Remove indents within long command descriptions
* sway-input.5: Document repeat_delay and repeat_rate only onceLibravatar Ronan Pigott2020-01-16
|
* ipc-json: Remove unnecessary dereferenceLibravatar Ronan Pigott2020-01-16
|
* commands/split: Fix error message typosLibravatar Ronan Pigott2020-01-16
|
* container: add inactive fullscreen to focus stackLibravatar Brian Ashworth2020-01-14
| | | | | | | | | | | | 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.
* Fix unreliable scaling filterLibravatar Simon Ser2020-01-13
| | | | | | | | | | | | | 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
* integer scaling, not integralLibravatar Cassandra McCarthy2020-01-10
|
* view: remove workspace pid mapping for assignsLibravatar Brian Ashworth2020-01-09
| | | | | | 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.
* input/cursor: handle setting a NULL image surfaceLibravatar Brian Ashworth2020-01-06
| | | | | | 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.
* input/cursor: handle image surface destroyLibravatar Brian Ashworth2020-01-05
| | | | | | 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.
* render: do not render indicator on floating viewsLibravatar Brian Ashworth2020-01-05
| | | | | | | | | 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.
* Fix small typo in sway-input(5)Libravatar Ross Schulman2020-01-05
|
* Add missing items to documentation for GET_TREE response in ipc.Libravatar Thayne McCombs2020-01-05
| | | | | A few items in the response for the get_tree ipc call were missing from the documentation. This adds some documentation for them.
* xwayland: handle size_hints == NULLLibravatar Rouven Czerwinski2020-01-03
| | | | | | | | 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
* input: Assign virtual input devices to their selected seatsLibravatar Andri Yngvason2020-01-01
|
* Make sure we don't calculate fractional pixel gapsLibravatar Pedro Côrte-Real2020-01-01
| | | | | | 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.
* Avoid numerical instability in resizeLibravatar Pedro Côrte-Real2020-01-01
| | | | | | | | | | | | | | | | | | | 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
* Add virtual pointer protocolLibravatar Josef Gajdusek2019-12-31
|
* Fix sway_log using non initialised output_config pointerLibravatar Paul Riou2019-12-31
| | | | | This fixes a crash where the `oc->name` would be accessed by sway_log() even when `oc` was NULL.
* Re-add support for wlr_output's atomic APILibravatar Simon Ser2019-12-30
| | | | | | | | | | | | | 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)
* cmd_client_*: support optional args for i3 compatLibravatar Brian Ashworth2019-12-29
| | | | | | 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.
* bar_cmd_colors: remove add_colorLibravatar Brian Ashworth2019-12-28
| | | | | | | | | | | | 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.
* cmd_client_*: refactor duplicated codeLibravatar Brian Ashworth2019-12-28
| | | | | | | | | | | | | 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.
* layer-shell: refocus if keyboard interactive lostLibravatar Brian Ashworth2019-12-27
| | | | | | | | 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.