aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
* input: Avoid creating the PAD device multiple timesLibravatar Olivier Fourdan2020-03-12
| | | | | | | | | | | If a pad device for a tablet exists, reloading the configuration, removing/reading the device or even suspending the system will recreate the same Wayland input device multiple times. Make sure we don't re-create the same Wayland device more than necessary. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
* readme: git is an optional dependencyLibravatar Simon Ser2020-03-12
|
* commands: Adjust style in cursors commandLibravatar Michael Weiser2020-03-11
| | | | | | | Remove some unnecessary brackets in an error condition check identified during review of the shortcuts inhibitor command code (#5021). Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* commands: Add shortcuts_inhibitor commandLibravatar Michael Weiser2020-03-11
| | | | | | | | | | | | | | | | | | | Add a command to influence keyboard shortcuts inhibitors. In its current form it can be used to activate, deactivate or toggle an existing inhibitor on the surface currently receiving input. This can be used to define an escape shortcut such as: bindsym --inhibited $mod+Escape seat - shortcuts_inhibitor deactivate It also allows the user to configure a per-seat default of whether keyboard inhibitors are honoured by default (the default) or not. Using the activate/toggle command they can then enable the lingering inhibitor at a later time of their choosing. As a side effect this allows to specifically address a named seat for actions as well, whatever use-case that might serve. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* input: Add support for keyboard shortcuts inhibitLibravatar Michael Weiser2020-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adding support for the keyboard shortcuts inhibit protocol allows remote desktop and virtualisation software to receive all keyboard input in order to pass it through to their clients so users can fully interact the their remote/virtual session. The software usually provides its own key combination to release its "grab" to all keyboard input. The inhibitor can be deactivated by the user by removing focus from the surface using another input device such as the pointer. Use support for the procotol in wlroots to add support to sway. Extend the input manager with handlers for inhibitor creation and destruction and appropriate bookkeeping. Attach the inhibitors to the seats they apply to to avoid having to search the list of all currently existing inhibitors on every keystroke and passing the inhibitor manager around. Add a helper function to retrieve the inhibitor applying to the currently focused surface of a seat, if one exists. Extend bindsym with a flag for bindings that should be processed even if an inhibitor is active. Conversely this disables all normal shortcuts if an inhibitor is found for the currently focused surface in keyboard::handle_key_event() since they don't have that flag set. Use above helper function to determine if an inhibitor exists for the surface that would eventually receive input. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* config: Fix typo in reload bindsym flag bitmaskLibravatar Michael Weiser2020-03-11
| | | | | | | Fix a typo in the bit mask value of the BINDING_RELOAD flag introduced in commit 152e30c37 so it can work as intended. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* input: implement cycling through keyboard layout listLibravatar Bor Grošelj Simić2020-03-11
|
* ipc: add missing required propertiesLibravatar Ian Fan2020-03-10
|
* Null check sway_layer_surface when checking damageLibravatar Tadeo Kondrak2020-03-10
| | | | | Before this change, an overlay layer-shell surface without a buffer attached would segfault the compositor on screen damage.
* common/log: bump POSIX version used after e81d9fde667eLibravatar Jan Beich2020-03-07
| | | | | | | | | ../common/log.c:63:16: error: use of undeclared identifier 'CLOCK_MONOTONIC' clock_gettime(CLOCK_MONOTONIC, &start_time); ^ ../common/log.c:75:16: error: use of undeclared identifier 'CLOCK_MONOTONIC' clock_gettime(CLOCK_MONOTONIC, &ts); ^
* common/log: improve time prefixLibravatar Simon Ser2020-03-07
| | | | | | Same as [1]. [1]: https://github.com/swaywm/wlroots/pull/2052
* Add adaptive_sync_status to output IPC replyLibravatar Simon Ser2020-03-07
|
* Add an adaptive_sync output commandLibravatar Simon Ser2020-03-07
| | | | | | | | | This enables/disables adaptive synchronization on the output. For now, the default is disabled because it might cause flickering on some hardware if clients don't submit frames at regular enough intervals. In the future an "auto" option will only enable adaptive sync if a fullscreen client opts-in via a Wayland protocol.
* Use wlr_client_bufferLibravatar Simon Ser2020-03-06
| | | | | | Update for breaking changes in [1]. [1]: https://github.com/swaywm/wlroots/pull/2043
* Drop sway_output.surface_needs_frameLibravatar Simon Ser2020-03-06
| | | | | | | wlr_output_schedule_frame now sets output->needs_frame [1], so this isn't needed anymore. [1]: https://github.com/swaywm/wlroots/pull/2053
* Only schedule a frame if client has requested a frame callbackLibravatar Simon Ser2020-03-06
| | | | | When a client hasn't damaged its surface, we only need to schedule an output frame if the client has requested a frame callback.
* Make handle_destroy and output_repaint_timer_handler staticLibravatar Simon Ser2020-03-04
|
* ipc-server: improve error messageLibravatar Jason Nader2020-02-29
|
* sway.5: correct description of workspace [number]Libravatar Brian Ashworth2020-02-29
| | | | | | | | This correct the description of the commmand: workspace [--no-auto-back-and-forth] [number] <[num:]name> Previously, the number and num pieces were being confused. This also documents the behavior of the --no-auto-back-and-forth flag.
* Only destroy swaybar surface via ipc when neededLibravatar Bill Doyle2020-02-27
|
* Introduce pid criteria tokenLibravatar Ryan Dwyer2020-02-27
| | | | | | | | | | This can be used as a workaround to flag terminal windows as urgent when commands are completed, until urgency is introduced in the Wayland protocol. Configure your shell to run `swaymsg "[pid=$PPID] urgent enable"` when commands are completed, and use a terminal which uses one process per window.
* Add support for wlr-output-power-management-unstable-v1Libravatar Simon Ser2020-02-26
|
* Revert "Don't apply exclusive zones of unmapped layer-shell surfaces"Libravatar Brian Ashworth2020-02-25
| | | | This reverts commit e1eda8a09c15780e7f6ab0b6a1ab7e811a3d8764.
* Don't apply exclusive zones of unmapped layer-shell surfacesLibravatar Simon Ser2020-02-24
| | | | | | Backport of [1]. [1]: https://github.com/emersion/rootston/pull/15/files
* Fix get_int_prop(WINDOW_TYPE) crashLibravatar Simon Ser2020-02-19
|
* treewide: fix typosLibravatar Torstein Husebø2020-02-18
|
* input_cmd_events: add support for input typesLibravatar Brian Ashworth2020-02-18
| | | | | | | | | | | This adds support for input type configs to input_cmd_events. This works similar to the wildcard handling that existed where configs for the devices are stored and the type config is reset to INT_MIN so that it does not override. This also condenses the toggle_send_events and toggle_wildcard_send_events functions into a single function to reduce code duplication.
* tree/view: do not attempt enter on hidden childLibravatar Brian Ashworth2020-02-18
| | | | | | | | If a subsurface is created for a surface that is associated with a scratchpad hidden view, do not attempt to send an enter to it. The subsurface is not on any output and since there is no workspace associated with the view, attempting to get the output for the NULL workspace will result in a SIGSEGV.
* i3compat: add `window_type` to IPC responseLibravatar Jason Nader2020-02-17
| | | | i3 added these in i3/i3#3797
* i3compat: add `window_type` to IPC responseLibravatar Jason Nader2020-02-17
| | | | i3 added these in i3/i3#3797
* Specify that output transform applies clockwise rotationsLibravatar Simon Ser2020-02-17
|
* Fix output transform rotation directionLibravatar Simon Ser2020-02-17
| | | | | | | | This patch makes it so users that have configured their screen with a transform don't have to update their config after the wlroots breaking change. References: https://github.com/swaywm/wlroots/pull/2023
* 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
|
* swaybar: fix i3bar relative coordinates when scaling is usedLibravatar Hristo Venev2020-02-10
| | | | | | | | | | | | 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.
* Do not truncate pointer coordinates to int.Libravatar Hristo Venev2020-02-10
| | | | This increases the precision of the clicks when using i3bar.
* Avoid calling strcmp on nullptrLibravatar Till Hofmann2020-02-10
| | | | | | | 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`.
* 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.
* Change wordingLibravatar Cyril Levis2020-02-04
|