aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorLines
2020-12-02build: add basu as sd-bus providerFurkan Sahin-0/+2
2020-12-02build: introduce sd-bus-provider optionFurkan Sahin-2/+2
This allows to select a specific provider for the sd-bus library.
2020-12-05Add layer shell subsurfacesFurkan Sahin-0/+11
Damage subsurfaces created by layer surfaces on map, unmap and commit. This fixes the flicker of Gtk Popovers. Fixes #5617
2020-12-05input/cursor: unhide cursor on synthetic inputFurkan Sahin-1/+3
Fixes #5847.
2020-12-03common: make 'lenient_strcmp' arguments constFurkan Sahin-1/+1
Prevents build failures when calling the function with 'const char *' arguments. This is also more accurate since the function is not expected to modify the args.
2020-11-03tree/container: introduce `container_is_sticky[_or_child]` functionsFurkan Sahin-0/+7
To query whether a container is sticky, checking `con->is_sticky` is insufficient. `container_is_floating_or_child` must also return true; this led to a lot of repetition. This commit introduces `container_is_sticky[_or_child]` functions, and switches all stickiness checks to use them. (Including ones where the container is already known to be floating, for consistency.)
2020-10-31commands/focus: force container warp when fulfilling `focus mode_toggle`Furkan Sahin-1/+1
This commit switches focusing behavior to force a warp when executing `focus mode_toggle`. Fixes #5772.
2020-10-31input: remove motion deltas from seatop callbacksFurkan Sahin-9/+4
Straightforward cleanup, they haven't been used for a while.
2020-09-07hide_cursor: Add an option to hide when typingFurkan Sahin-0/+13
Add an option for the `hide_cursor` command to hide the cursor when typing, i.e. whenever a key is pressed.
2020-10-28output: evacuate sticky containers only if new output has a workspaceFurkan Sahin-0/+2
Sticky floating containers on an otherwise empty workspace can only be evacuated if the new output has an active workspace. The noop output may not have one and in that case we have to move the whole workspace to the new output.
2020-10-18transaction: validate X transaction completions by geometry, not sizeFurkan Sahin-3/+9
Xwayland views are aware of their coordinates, so validating transaction completions should take into account the reported coordinates of the view. Prior to this commit they didn't, and matching dimensions would suffice to validate the transaction. Also introduced `transaction_notify_view_ready_immediately` to support the fix from 520067f without jumping through hoops to figure out the geometry of an `xdg_shell` view.
2020-10-18xwayland: listen to `set_geometry` eventFurkan Sahin-0/+1
Closes #5735, refs #3007. This makes the "Search everywhere" dialog in JetBrains IDEs movable.
2020-06-19input/tablet: add tool_mode option to set tablet tools as relative inputFurkan Sahin-0/+16
Closes #4139.
2020-10-03Add support for workspace_min_width bar option.Furkan Sahin-0/+3
2020-08-29xwayland: support views that change override-redirect statusFurkan Sahin-0/+2
2020-09-08swaynag: add details background optionFurkan Sahin-0/+1
Adds a new config option for details background for swaynag issue/#5673
2020-09-02swaynag: adds option to separately specify the text color for buttonsFurkan Sahin-0/+1
2020-08-27Use wlr_output_event_commitFurkan Sahin-2/+1
Instead of listening to both transform and scale events, we can listen to the commit event and use the new wlr_output_event_commit struct to decide what to do. This de-duplicates some of the work we were doing twice when an output was re-configured. Depends on [1]. [1]: https://github.com/swaywm/wlroots/pull/2315
2020-08-23exec: fix validation during config reloadFurkan Sahin-0/+6
Split cmd_exec_always into separate methods for general validation and process creation. This fixes a potential call of join_args with 0 arguments.
2020-08-03view: remove foreign toplevel listeners on destroyFurkan Sahin-0/+1
2020-07-30view: implement foreign toplevel fullscreen requestFurkan Sahin-0/+1
2020-07-18Fix X11 clients getting stuck minimizedFurkan Sahin-0/+1
Usually it should be enough to simply not grant a client's minimize request, however some applications (Steam, fullscreen games in Wine) don't wait for the compositor and minimize anyway, getting them stuck in an unrecoverable state. Restoring them immediately lead to heavy flickering when unfocused on my test application (Earth Defense Force 5 via Steam), so it's preferable to grant their request without actually minimizing and then restoring them once they are in focus again.
2020-07-16moved and renamed movement-unit parsing to commonFurkan Sahin-0/+24
2020-07-06input: implement xdg_toplevel interactive resize hintsFurkan Sahin-0/+3
2020-07-10config/output: don't change output state before commitFurkan Sahin-2/+2
Previously, we called output_disable prior to wlr_output_commit. This mutates Sway's output state before the output commit actually succeeds. This results in Sway's state getting out-of-sync with wlroots'. An alternative fix [1] was to revert the changes made by output_disable in case of failure. This is a little complicated. Instead, this patch makes it so Sway's internal state is never changed before a successful wlr_output commit. We had two output flags: enabled and configured. However enabled was set prior to the output becoming enabled, and was used to prevent the output event handlers (specifically, the mode handler) from calling apply_output_config again (infinite loop). Rename enabled to enabling and use it exclusively for this purpose. Rename configure to enabled, because that's what it really means. [1]: https://github.com/swaywm/sway/pull/5521 Closes: https://github.com/swaywm/sway/issues/5483
2020-07-04Reload command now matches i3's implementationFurkan Sahin-0/+1
2020-07-01commands/move: unwrap workspace container on move to new workspaceFurkan Sahin-0/+3
If moving e.g. `T[app app]` into a new workspace with `workspace_layout tabbed`, then post-move the tree in that workspace will be `T[T[app app]]`. This still happens with horizontal or vertical workspace layout, but is less visible since those containers have no decorations. Fixes #5426.
2020-06-28seat: Refocus seat when wlr_drag is destroyedFurkan Sahin-0/+6
wlr_drag installs grabs for the full duration of the drag, leading to the drag target not being focused when the drag ends. This leads to unexpected focus behavior, especially for the keyboard which requires toggling focus away and back to set. We can only fix the focus once the grabs are released, so refocus the seat when the wlr_drag destroy event is received. Closes: https://github.com/swaywm/sway/issues/5116
2019-08-20Implement wlr-foreign-toplevel-management-v1Furkan Sahin-0/+6
2020-06-18input: disable events for map_to_output devices when output not presentFurkan Sahin-1/+3
Fixes #3449.
2020-06-14input/pointer: don't trigger pointer bindings for emulated inputFurkan Sahin-1/+1
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.
2020-06-14input/cursor: send idle events based off device type, not input typeFurkan Sahin-1/+1
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.
2020-04-27Add support for viewporterFurkan Sahin-0/+1
Depends on [1]. [1]: https://github.com/swaywm/wlroots/pull/2092
2020-06-13input/keyboard: wlr_keyboard_group enter and leaveFurkan Sahin-0/+2
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.
2020-06-13i3-compat: add GET_BINDING_STATE IPC commandFurkan Sahin-0/+3
2020-05-31tree/view: fix smart gaps when ancestor container is tabbed or stackedFurkan Sahin-4/+5
Fixes #5406.
2020-06-07swaynag: allow specifying more buttons which execute and dismissFurkan Sahin-0/+1
I don't love -z / -Z, but I figure this patch is far from being accepted for other reasons too.
2020-06-04tree/container: introduce `container_toplevel_ancestor` helperFurkan Sahin-0/+7
This allows us to not have to explicitly write the same while loop everywhere.
2020-06-05common/util: fix `get_current_time_msec` returning microsecondsFurkan Sahin-1/+7
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.
2020-06-05Save transform during transactionFurkan Sahin-0/+1
Closes: https://github.com/swaywm/sway/issues/5412
2020-06-03container: Remove useless surface dimensionsFurkan Sahin-1/+0
The adjustments to resize logic left them unnecessary.
2020-05-31view: Save all buffers associated with viewFurkan Sahin-5/+8
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.
2020-05-05Add views idle inhibition status in get_tree outputFurkan Sahin-0/+8
Fixes #5286
2020-05-28input/cursor: rename `simulated_tool_tip_down` to be more accurateFurkan Sahin-1/+1
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.
2020-05-26input/cursor: keep reference to cursor in constraintFurkan Sahin-0/+1
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.
2020-05-04input/tablet: add seatop_down entry for tablet inputFurkan Sahin-0/+6
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.
2020-05-21Remove code related to the security featuresFurkan Sahin-78/+0
- Remove struct definitions - Remove struct members - Remove initializations and frees
2020-05-16Fix typos in commentsFurkan Sahin-1/+1
2020-05-02input/pointer: only warp cursor when the confine region has changedFurkan Sahin-0/+2
Refs #5268.
2020-03-12commands: Add per-view shortcuts_inhibitor commandFurkan Sahin-0/+11
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>