Transactions currently wait for all configures to be acked, regardless
fo what they were sent to. This includes views that are hidden in tabbed
or stacked containers. If these views do not ack the configure in
response to a single frame callback, they can cause transaction
timeouts.
Check if a container is hidden before registering the configure serial
and saving any view buffers.
Closes: https://github.com/swaywm/sway/issues/6023
Before this commit, there would be cases where focus changes from one
window to another, the new window activates text_input, then the old
window sends a deactivate request, making text_input unfocused
completely.
There is no need to check for transactions at the end of every user
input, as the vast majority of input will not issue transactions. This
implementation can also hide where changes are made without an
appropriate transaction commit, as a future unrelated input would issue
the commit instead.
Instead, commit transactions in places where changes are made or are
likely to be made.
xdg_shell and xwayland handled geometry changes differently despite
needing mostly identical behavior. The xwayland implementation has been
changed to match that of xdg_shell.
The size of a tiled container cannot change in response to new buffer
sizes, so there is no need to commit a new transaction. Instead, simply
recenter the view with the new geometry, leaving the full transaction
flow for floating containers.
We need to use surface_x and surface_y when rendering and damaging saved
buffers as these compensate for views that have been centered due to
being smaller than their container.
Add them to the surface positions on the saved buffer so we have the
values from the time the buffer was saved.
Only wl_pointer.motion was used to update pointer position, which would
cause issues if the pointer was not moved prior to wl_pointer.button.
This also fixes touch input through wl_pointer emulation, which fires
wl_pointer.button immediately after wl_pointer.enter.
Closes: https://github.com/swaywm/sway/issues/5991
Sway records pid, workspace, and output for every new process. However, if the
output gets disabled and the workspace disappears, the workspace is still
re-created on the disabled output. This commit adds a check for the enabled
flag, so that NULL will be passed to workspace_create() in this case.
wlr_output_configuration_head_v1_create normally fills out the head
"enabled" field to match the wlr_output state. We overwrite this to also
set the head as enabled if it is only turned off with DPMS.
However, in some cases we may not have a mode for this display, in which
case setting it as enabled will lead to a segfault later on. Therefore,
enabled conditional on the presence of a mode.
For certain applications (e.g. JetBrains) the parent window controls
input. We need to adhere to the ICCCM input focus specification to
properly handle these cases.
Relates to swaywm/wlroots#2604
The fractional part of the real number we want to represent never has
more than 3 decimal digits, so use 3 decimal digits of precision.
e.g. 'swaymsg -t get_outputs' would show a refresh rate of 59934 mHz
as 59.933998 Hz, now correctly as 59.934 Hz.
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
i3 feature set is mostly frozen as well, so we shouldn't advise people
to open feature requests there. Moreover, i3 will disregard feature
requests from sway users (because it doesn't benefit the i3 project
itself).
There is now no good way to request new WM features, and this is by
design. This aligns with [1].
[1]: fc1148da7f
This fixes a few formatting errors in SYNOPSIS, moves the command
options out of SYNOPSIS, swaps the labels on the SYNOPSIS and
DESCRIPTION sections, creates an EXAMPLES section and slightly rewords
parts of the OPTIONS, DESCRIPTION, EXAMPLES, and OUTPUT sections.
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.