| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
| |
If the surface the pointer started to interact with is destroyed we also
want the seatop_down to end. In case a drag is initiated we receive a
call to handle_end.
|
|
|
|
|
|
|
| |
This solves an issue where layer-shell items would not receive a button
release event when the pointer left them while being pressed. The
default seatop changes focus immediately while seatop_down defers any
focus changes until the pointer is released or seatop_down is destroyed.
|
|
|
|
| |
Only works with DRM backend.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use fixed titlebar heights. The default height is calculated based on
font metrics for the configured font and current locale.
Some testing with titles with emoji and CJK characters (which are
substantially higher in my setup) shows that the titlebars retain their
initial value, text does shift up or down, and all titlebars always
remain aligned.
Also drop some also now-unecessary title_height calculations.
Makes also needed to be updated, since they should be positioned with
the same rules.
|
|
|
|
|
|
|
| |
When a layer surface shrinks we need to damage the area it previously
occupied, but we don't know the location of all its subsurfaces in the
previous state, so instead damage a rectangle that encloses the entire
previous extent.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Losing the precision resulted in wlr_cursor and wlr_seat::pointer_state
getting out of sync during pointer motion in seatop_down.
Since the difference was always under 1 px, it was practically
impossible to notice in normal use.
But because of being out of sync, cursor_rebase would always end up
incorrectly calling wlr_seat_pointer_notify_motion from
seatop_default_begin (on releasing mouse button) which broke cursor
locking.
See #5405
Closes #4632
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When emulating touch, the simulating_pointer_from_touch field is
set to true. It's switched back to false when a touch_up event is
received. However we need to ensure we always send a wl_pointer.frame
event following a group of other wl_pointer events.
Since a touch_frame event is always guaranteed to come after a group
of touch events, unset simulating_pointer_from_touch in the touch_frame
handler instead of the touch_up handler. Add a new field to know whether
the touch_frame handler should stop emulation.
|
|
|
|
|
|
| |
Update for the breaking change in [1].
[1]: https://github.com/swaywm/wlroots/pull/3001
|
|
|
|
|
|
| |
Update for the breaking change in [1].
[1]: https://github.com/swaywm/wlroots/pull/3011
|
|
|
|
|
|
|
| |
get_current_time_msec is only used in cursor.c, so we can move it in and
make it static. This is primarily intended to avoid a symbol collision
with wlroots, which we unfortunately do not have a good solution for
yet.
|
|
|
|
|
|
|
| |
This reverts commit 487c83f0de9ca2a7650ad636eed6fd694ddcb82e.
The --create flag is undocumented, not in i3, and at least partially
broken (#5913), so this removes the feature.
|
|
|
|
|
|
|
|
| |
This extracts the code to a separate workspace_auto_back_and_forth
function.
It also removes the bool argument by adding an extra if statement at the call
site, and repurposes the no_auto_back_and_forth variable to
auto_back_and_forth for simpler understanding.
|
|
|
|
| |
Uses --layer/-y set to overlay|top|bottom|background
|
|
|
|
|
|
| |
Until now, swaybar did not have pango markup enabled by default, even if
the sway config had it on. This patch aims to mimic the i3 behavior, but
maintaining the functionality of the "pango_markup" sway config command.
|
|
|
|
| |
See https://github.com/swaywm/wlroots/pull/2718.
|
|
|
|
|
|
|
| |
For full context, read
https://gitlab.freedesktop.org/cairo/cairo/-/issues/479
TL;DR, cairo’s pc file adds `/cairo` to CFLAGS.
So namespace cairo shouldn’t be used.
|
|
|
|
|
|
|
| |
There was some unused code-paths for rendering surfaces with an
arbitrary rotation applied. This was imported from rootston.
Since we don't have plans to make use of this, remove it.
|
|
|
|
|
|
|
|
|
|
|
| |
When an application inhibited idle, a view pointer was stored and a
destroy listener was registered to the wlr inhibitor. As the wlr
inhibitor lives longer than the view, this lead to a dangling view
pointer between view unmap and inhibitor destroy.
Store a pointer to the wlr inhibitor instead of to the view, and look up
the view when needed, which may at any point be NULL. This also allows
for an inhibitor to remain functional if a surface is re-mapped.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the special case handling of scratchpad and unmark commands
was (probably accidentally) limited to criteria directly handled in the
execute_command function. This would exclude: 1. for_window criteria, as
these are handled externally for views and 2. and mouse bindings which
select target the node currently under the mouse cursor.
As a concrete example `for_window [app_id="foobar"] move scratchpad,
scratchpad show` would show (or hide due to the toggling functionality)
another window from the scratchpad, instead of showing the window with
app_id "foobar".
This commit replaces the "using_criteria" flag with "node_overridden"
with the more general notion of signifying that the node (and
container/workspace) in the current command handler context of the sway
config is not defined by the currently focused node, but instead
overridden by other means, i.e., criteria or mouse position.
|
|
|
|
|
|
|
| |
When issuing a focus command on a specific container, users expect to
proceed it even if is hidden by a fullscreen window.
This matches the behavior of i3.
|
|
|
|
|
| |
Detect whether an output is built-in via its type. Detect whether
a touchscreen or tablet tool is built-in via its ID_PATH property.
|
|
|
|
|
|
|
|
|
|
|
| |
In e0a94bee8da3271f942c0881ee18a7e2d4138063, it was believed that if the
container is being rendered, it must have an output.
This turned out not to be the case. When rendering a container, all its
children are rendered, even if the children is positioned off screen and
thus not having any output. This is the cause of the crash in #6061.
This commit introduces a null-check, which fixes #6061.
|
| |
|
|
|
|
|
|
|
|
|
| |
On server request, we need to send configure events to inform the client
of the new intended size. If the client changes size itself, sending a
configure event will only cause problems.
Use transaction_commit_dirty_client to distinguish between the two
transaction causes.
|
|
|
|
|
| |
Needed to check if containers are currently floating from render code,
as container_is_floating checks pending state.
|
|
|
|
|
|
|
|
|
| |
Pending state is currently inlined directly in the container struct,
while the current state is in a state struct. A side-effect of this is
that it is not immediately obvious that pending double-buffered state is
accessed, nor is it obvious what state is double-buffered.
Instead, use the state struct for both current and pending.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The transaction system contains a necessary optimization where a popped
transaction is combined with later, similar transactions. This breaks
the chronological order of states, and can lead to desynchronized
geometries.
To fix this, we replace the queue with only 2 transactions: current and
pending. If a pending transaction exists, it is updated with new state
instead of creating additional transactions.
As we never have more than a single waiting transaction, we no longer
need the queue optimization that is causing problems.
Closes: https://github.com/swaywm/sway/issues/6012
|
| |
|
|
|
|
| |
This will allow us to reuse it for centering elsewhere.
|
|
|
|
| |
And make the functions handling these arrays use const types.
|
|
|
|
| |
Swap the "surface" part for consistency with wlroots' naming.
|
|
|
|
|
|
|
|
| |
Instead of calling wlr_xdg_surface_for_each_popup and then
wlr_surface_for_each_surface, use the new for_each_popup_surface helper
introduced in [1] that does it in one go.
[1]: https://github.com/swaywm/wlroots/pull/2609
|
|
|
|
|
| |
This fixes a crash that happens when input_method_new or text_method_new
events are emitted after the seat has been freed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
workspace_squash is container_flatten in the reverse
direction. Instead of eliminating redundant splits that are
parents of the target container, it eliminates pairs of
redundant H/V splits that are children of the workspace.
Splits are redundant if a con and its grandchild have the
same layout, and the immediate child has the opposite split.
For example, layouts are transformed like:
H[V[H[app1 app2]] app3] -> H[app1 app2 app3]
i3 uses this operation to simplify the tree after moving
heavily nested containers to a higher level in the tree via
an orthogonal move.
|
|
|
|
|
|
|
| |
In i3, the workspace_layout command does not affect the
workspace layout. Instead, new workspace level containers
are wrapped in the desired layout and the workspace layout
always defaults to the output orientation.
|
|
|
|
|
|
|
| |
Meson's generated config.h header defines false macros as 0, not
undefined. This means that the header line, which was checking for the
definition existing, not a non-zero value, was incorrect. Now the
swaybar tray can be used with systemd, elogind, or basu.
|
| |
|
|
|
|
| |
This allows to select a specific provider for the sd-bus library.
|
|
|
|
|
|
|
| |
Damage subsurfaces created by layer surfaces on map, unmap and
commit. This fixes the flicker of Gtk Popovers.
Fixes #5617
|
|
|
|
| |
Fixes #5847.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
| |
This commit switches focusing behavior to force a warp when executing
`focus mode_toggle`.
Fixes #5772.
|
|
|
|
| |
Straightforward cleanup, they haven't been used for a while.
|
|
|
|
|
| |
Add an option for the `hide_cursor` command to hide the cursor when
typing, i.e. whenever a key is pressed.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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 d0f7e0f without jumping through hoops to figure out the
geometry of an `xdg_shell` view.
|