aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAge
* Implement wlr-foreign-toplevel-management-v1Libravatar Drew DeVault2020-06-23
|
* input: disable events for map_to_output devices when output not presentLibravatar Tudor Brindus2020-06-19
| | | | Fixes #3449.
* input/pointer: don't trigger pointer bindings for emulated inputLibravatar Tudor Brindus2020-06-18
| | | | | | | | | | Prior to this commit, a tablet device could trigger mouse button down bindings if the pen was pressed on a surface that didn't bind tablet handlers -- but it wouldn't if the surface did bind tablet handlers. We should expose consistent behavior to users so that they don't have to care about emulated vs. non-emulated input, so stop triggering bindings for any non-pointer devices.
* input/cursor: send idle events based off device type, not input typeLibravatar Tudor Brindus2020-06-18
| | | | | | | | Previously, a tablet or touch device could report activity as a pointer device if it went through pointer emulation. This commit refactors idle sources to be consistently reported based on the type of the device that generated an input event, and now how that input event is being processed.
* Add support for viewporterLibravatar Simon Ser2020-06-17
| | | | | | Depends on [1]. [1]: https://github.com/swaywm/wlroots/pull/2092
* input/keyboard: wlr_keyboard_group enter and leaveLibravatar Brian Ashworth2020-06-16
| | | | | | | | This adds support for wlr_keyboard_group's enter and leave events. The enter event just updates the keyboard's state. The leave event updates the keyboard's state and if the surface was notified of a press event for any of the keycodes, it is refocused so that it can pick up the current keyboard state without triggering any keybinds.
* i3-compat: add GET_BINDING_STATE IPC commandLibravatar Jason Nader2020-06-14
|
* tree/view: fix smart gaps when ancestor container is tabbed or stackedLibravatar Tudor Brindus2020-06-08
| | | | Fixes #5406.
* swaynag: allow specifying more buttons which execute and dismissLibravatar Graham Christensen2020-06-09
| | | | | I don't love -z / -Z, but I figure this patch is far from being accepted for other reasons too.
* tree/container: introduce `container_toplevel_ancestor` helperLibravatar Tudor Brindus2020-06-07
| | | | | This allows us to not have to explicitly write the same while loop everywhere.
* common/util: fix `get_current_time_msec` returning microsecondsLibravatar Tudor Brindus2020-06-06
| | | | | | | | This commit makes `get_current_time_msec` correctly return milliseconds as opposed to microseconds. It also considers the value of `tv_sec`, so we don't lose occasionally go back in time by one second. Finally, the function is moved into `util.c` so that it can be reused elsewhere without having to consider these pitfalls.
* Save transform during transactionLibravatar Kalyan Sriram2020-06-05
| | | Closes: https://github.com/swaywm/sway/issues/5412
* container: Remove useless surface dimensionsLibravatar Kenny Levinsen2020-06-03
| | | | The adjustments to resize logic left them unnecessary.
* view: Save all buffers associated with viewLibravatar Kenny Levinsen2020-06-03
| | | | | | | | | | | | During the execution of a resize transaction, the buffer associated with a view's surface is saved and reused until the client acknowledges the resulting configure event. However, only one the main buffer of the main surface was stored and rendered, meaning that subsurfaces disappear during resize. Iterate over all, store and render buffers from all surfaces in the view to ensure that correct rendering is preserved.
* Add views idle inhibition status in get_tree outputLibravatar Damien Tardy-Panis2020-05-29
| | | | Fixes #5286
* input/cursor: rename `simulated_tool_tip_down` to be more accurateLibravatar Tudor Brindus2020-05-29
| | | | | | | | | This is a tiny cleanup commit that renames `simulated_tool_tip_down` to `simulating_pointer_from_tool_tip`, making it match `simulating_pointer_from_touch`. This is a better name since it makes it clear that it's the *pointer* that's being simulated, not the tool tip.
* input/cursor: keep reference to cursor in constraintLibravatar Tudor Brindus2020-05-26
| | | | | | | set_region accepts a NULL *data, so we can't use it to reference the constraint and find the cursor through its seat. Fixes #5386.
* input/tablet: add seatop_down entry for tablet inputLibravatar Tudor Brindus2020-05-25
| | | | | | | | | | | | | | | | | | | | | | Currently, when tablet input exits a window during an implicit grab, it passes focus to another window. For instance, this is problematic when trying to drag a scrollbar, and exiting the window — the scrollbar motion stops. Additionally, without `focus_follows_mouse no`, the tablet passes focus to whatever surface it goes over regardless of if there is an active implicit. If the tablet is over a surface that does not bind tablet handlers, sway will fall back to pointer emulation, and all of this works fine. It probably should have consistent behavior between emulated and not-emulated input, though. This commit adds a condition for entering seatop_down when a tablet's tool tip goes down, and exiting when it goes up. Since events won't be routed through seatop_default, this prevents windows losing focus during implicit grabs. Closes #5302.
* Remove code related to the security featuresLibravatar Érico Rolim2020-05-21
| | | | | | - Remove struct definitions - Remove struct members - Remove initializations and frees
* Fix typos in commentsLibravatar Martin Michlmayr2020-05-21
|
* input/pointer: only warp cursor when the confine region has changedLibravatar Tudor Brindus2020-05-21
| | | | Refs #5268.
* commands: Add per-view shortcuts_inhibitor commandLibravatar Michael Weiser2020-05-13
| | | | | | | | | | | | | | | | | | | | | Add a separate per-view shortcuts_inhibitor command that can be used with criteria to override the per-seat defaults. This allows to e.g. disable shortcuts inhibiting globally but enable it for specific, known-good virtualization and remote desktop software or, alternatively, to blacklist that one slightly broken piece of software that just doesn't seem to get it right but insists on trying. Add a flag to sway_view and handling logic in the input manager that respects that flag if configured but falls back to per-seat config otherwise. Add the actual command but with just enable and disable subcommands since there's no value in duplicating the per-seat activate/deactivate/toggle logic here. Split the inhibitor retrieval helper in two so we can use the backend half in the command to retrieve inhibitors for a specific surface and not just the currently focused one. Extend the manual page with documentation of the command and references to its per-seat sibling and usefulness with criteria. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* Implement pointer simulation if client hasn't bound to touchLibravatar David962020-05-13
|
* input/tablet: simplify parameter plumbing for tablet referencesLibravatar Tudor Brindus2020-05-10
| | | | | | This is a small cleanup commit for removing `sway_tablet` parameters from functions that already accept `sway_tablet_tool`, since the tablet reference can be accessed through `tool->tablet`.
* input: rename pointer handlers to be unambiguousLibravatar Tudor Brindus2020-05-02
| | | | | | | This commit renames `motion` and `axis` handlers to `pointer_motion` and `pointer_axis`, respectively, to disambiguate them from their tablet (and future touch) handlers. `button` is left as-is, as it is generic across input devices.
* input: refactor tablet motion into seatop handlerLibravatar Tudor Brindus2020-05-02
| | | | | | | This commit moves tablet motion logic into a seatop handler. As a side-effect of seatop implementations being able to receive tablet motion events, fixes #5232.
* input/cursor: make cursor rebasing cursor type-agnosticLibravatar Tudor Brindus2020-05-02
| | | | | | | | This commit refactors `cursor_rebase` into `cursor_update_image`, and moves sending pointer events to the two existing call sites. This will enable this code to be reused for tablets. Refs #5232
* Add a secondary headless backendLibravatar Simon Ser2020-05-01
| | | | This allows the create_output command to work on DRM too.
* input/cursor: release simulated tool tip button when over v2 surfaceLibravatar Tudor Brindus2020-05-01
| | | | | | | d88460f addressed sending v2 tool tip up when over a non-v2 surface. This commit addresses the other direction. Fixes #5230.
* swaybar: Fix scrolling with precise trackpadsLibravatar Martin Dørum2020-04-28
|
* input/cursor: fix hide cursor timeouts on tablets and touchscreensLibravatar Tudor Brindus2020-04-22
| | | | | | | | | This commit refactors `cursor_handle_activity` to also take the idle source, so that it can be reused for tablet and touch activity. Previously, the timeouts would be tracked, but the cursor would never be un-hidden for anything but pointers. Fixes #5169.
* input: Mark virtual devices as suchLibravatar Andri Yngvason2020-04-14
| | | | This is for internal configuration purposes
* Use bitshifts for bitfieldsLibravatar Simon Ser2020-04-10
| | | | | | | | Instead of hardcoded power of 2 values, use bitshifts. This makes the enums more readable, avoids mistakes, and makes it clear how much of the int32_t bit space we have left. While at it, fix other minor style issues.
* Render layer shell popups over the top layerLibravatar David962020-04-10
|
* Introduce test_output_configLibravatar Simon Ser2020-04-08
| | | | | This function checks whether the backend would accept an output configuration, without applying the changes.
* im: make text-input listeners per text-inputLibravatar xdavidwu2020-04-04
|
* Port input method and text input from rootstonLibravatar xdavidwu2020-04-04
| | | | | | | 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>
* tray: track SNI callbacksLibravatar Ian Fan2020-03-30
| | | | | | 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.
* tray: tidy codeLibravatar Ian Fan2020-03-30
| | | | This includes some refactoring and fixing a small memory leak.
* tray: allow themes to inherit from multiple themesLibravatar Ian Fan2020-03-30
|
* add --no-repeat option for bindingsLibravatar Linus Heckemann2020-03-30
| | | | | | | | | 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
* 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>
* 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
* Make handle_destroy and output_repaint_timer_handler staticLibravatar Simon Ser2020-03-04
|
* 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
|