aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2020-04-04build: make completions respect install prefixesDominique Martinet-2/+8
Tell pkgconfig about prefix and datadir as required in the .pc files, so if the prefix isn't standard nothing is installed outside of it. For fish, this requires https://github.com/fish-shell/fish-shell/pull/6778 Fixes swaywm/swaybg#13
2020-04-04im: Fix crash when im destorying and no focused surface existsLeo-18/+12
2020-04-04im: remove listener on pending surface destoryedxdavidwu-0/+2
2020-04-04im: make text-input listeners per text-inputxdavidwu-43/+28
2020-04-04input-method: avoid and log unneeded set_focusxdavidwu-0/+3
2020-04-04input-method: remove surface listener before setxdavidwu-0/+1
This make sure pending focused surface listener is not reachable from old surface.
2020-04-04Port input method and text input from rootstonxdavidwu-0/+389
This ports swaywm/wlroots#1203, swaywm/wlroots#1303, swaywm/wlroots#1308, swaywm/wlroots#1759 rootston part to sway. Co-Authored-By: Leo Chen <leo881003@gmail.com>
2020-04-03swapped hiding the cursor and sending a touch event as a more logical sequenceSome Chinese Guy-1/+1
2020-04-02swaynag: exit on wl_display_roundtrip errorDominique Martinet-1/+5
fixes loop when sway closes the socket in the middle of querying outputs, see #5138.
2020-04-02Reference wev instead of xevTobi Fuhrimann-1/+1
2020-04-02Update for new wlr_buffer APISimon Ser-2/+2
Update for [1]. [1]: https://github.com/swaywm/wlroots/pull/2044
2020-03-30change apply_exclusive() to closer match layer shell protocolLeon Plickat-6/+17
With these changes, sway will respect positive exclusive zones of layer surfaces anchored to one or three sides. This matches the protocol, which states that a positive exclusive zone should be respected, "if the surface is anchored to one edge or an edge and both perpendicular edges". If the surfaces is "anchored to only two perpendicular edges (a corner), anchored to only two parallel edges or anchored to all edges a positive value will be treated the same as zero".
2020-03-30tray: track SNI callbacksIan Fan-31/+47
This removes any pending messages once the item is destroyed. Furthermore, this installs SNI event calbacks asynchronously in order to prevent sd-bus from bypassing pending messages.
2020-03-30tray: tidy codeIan Fan-28/+17
This includes some refactoring and fixing a small memory leak.
2020-03-30tray: allow themes to inherit from multiple themesIan Fan-5/+10
2020-03-30tray: better errors when parsing index.themeIan Fan-60/+90
2020-03-30swaybar: fix memory leaksIan Fan-1/+4
2020-03-30add --no-repeat option for bindingsLinus Heckemann-2/+10
This allows e.g. triggering one command while a key is held, then triggering another to undo the change performed by it afterwards. One use case for this is triggering push-to-talk functionality for VoIP tools without granting them full access to all input events. Fixes #3151
2020-03-29Change focus_on_window_activation default to urgentSimon Ser-1/+2
Before the default was "smart". This means a visible app could steal focus whenever it wanted to. This can be an issue since having focus allows for e.g. clipboard access. This commit changes the default to "urgent" instead. Closes: https://github.com/swaywm/sway/issues/5139
2020-03-29switched to setting focus with seat_set_focusSome Chinese Guy-6/+2
2020-03-29Added focus following for touch_downSome Chinese Guy-0/+6
2020-03-29swaynag: fix segfault on exit when arguments are not correctDominique Martinet-2/+2
swaynag_destroy is called on all cleanup cases and needs the lists to be valid, just init them early
2020-03-28sway.5: fix missing background scaling mode in a block examplerinpatch-2/+2
2020-03-27Fix hit test for floaters that cross outputsJosh Shone-1/+4
In the case of multiple overlapping floating windows, this commit fixes an issue where the wrong window would be focused in response to a cursor if one of the windows came from a different output (overhanging).
2020-03-24check for workspace command name argr-c-f-1/+7
* check for workspace command name arg (fix #5131) For the 'workspace <name> output <output>' command, output_location must be greater than zero or the attempt to get the workspace name with join_args will segfault or abort() (depending on the flavor of sway_assert() in use). This checks and returns an error instead. * put workspace output error string on one line To ease grepping as requested * check for name in workspace gaps command as well A malformed command here will lead to the same result seen in #5131, so add a check. Done inside the cmd_workspace_gaps() function itself, to take advantage of the existing 'Expected...' string.
2020-03-23Fix redundant call to seat_send_focus()Leo-2/+5
This commit fix calling to seat_send_focus() twice when a view is closed. This codes revert #2580, but the original issue nolonger exists.
2020-03-21Fix output mode usageSimon Ser-1/+1
The "Hz" part is required.
2020-03-16sway/input/cursor.c: fix undefined behaviour when event is NULLJason Nader-2/+2
2020-03-15Document input selector precedenceDennis Schridde-0/+8
Signed-off-by: Dennis Schridde <devurandom@gmx.net>
2020-03-15sway/input/cursor.c: move NULL check to where it should beJason Nader-3/+3
2020-03-15commands/bind.c: remove unnecessary checkJason Nader-1/+1
2020-03-13Update fish completionsJason-1/+1
`--config` should autocomplete filepaths
2020-03-12Limit workspace numbers within 0..INT32_MAXJason Nader-2/+13
See https://github.com/i3/i3/commit/83c7aff089a6728b6e522d934d656a8e09463112
2020-03-12input: Avoid creating the PAD device multiple timesOlivier Fourdan-5/+9
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>
2020-03-12readme: git is an optional dependencySimon Ser-1/+1
2020-03-11commands: Adjust style in cursors commandMichael Weiser-1/+1
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>
2020-03-11commands: Add shortcuts_inhibitor commandMichael Weiser-0/+150
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>
2020-03-11input: Add support for keyboard shortcuts inhibitMichael Weiser-10/+129
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>
2020-03-11config: Fix typo in reload bindsym flag bitmaskMichael Weiser-1/+1
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>
2020-03-11input: implement cycling through keyboard layout listBor Grošelj Simić-9/+48
2020-03-10ipc: add missing required propertiesIan Fan-0/+5
2020-03-10Null check sway_layer_surface when checking damageTadeo Kondrak-0/+3
Before this change, an overlay layer-shell surface without a buffer attached would segfault the compositor on screen damage.
2020-03-07common/log: bump POSIX version used after e81d9fde667eJan Beich-1/+1
../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); ^
2020-03-07common/log: improve time prefixSimon Ser-8/+30
Same as [1]. [1]: https://github.com/swaywm/wlroots/pull/2052
2020-03-07Add adaptive_sync_status to output IPC replySimon Ser-3/+26
2020-03-07Add an adaptive_sync output commandSimon Ser-0/+43
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.
2020-03-06Use wlr_client_bufferSimon Ser-4/+5
Update for breaking changes in [1]. [1]: https://github.com/swaywm/wlroots/pull/2043
2020-03-06Drop sway_output.surface_needs_frameSimon Ser-9/+0
wlr_output_schedule_frame now sets output->needs_frame [1], so this isn't needed anymore. [1]: https://github.com/swaywm/wlroots/pull/2053
2020-03-06Only schedule a frame if client has requested a frame callbackSimon Ser-2/+4
When a client hasn't damaged its surface, we only need to schedule an output frame if the client has requested a frame callback.
2020-03-04Make handle_destroy and output_repaint_timer_handler staticSimon Ser-4/+2