Age | Commit message (Collapse) | Author |
|
This changes output::destroy to output::disable and emits it only
once when an output is disabled, instead of twice in succession.
|
|
|
|
We use the headless backend to create a special fallback output
used when no other output is connected. However this messes up the
"real" headless output names users have come to expect (e.g.
currently the first headless output will be named "HEADLESS-2"
instead of "HEADLESS-1").
Fix this by setting the output name with [1].
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3395
|
|
A surface can have effective damage even without any buffer damage
committed.
|
|
wlroots removed the support for the noop backend. Instead we rely on the
headless backend to provide the fallback output.
|
|
wlroots now required the compositor to create its own wlr_renderer and
wlr_allocator to initialize the wlr_output
|
|
If the destroyed xwayland view is in transaction, it won't
be destroyed immediately. wlr_xwayland_surface then becomes
dangling pointer.
Closes #6605
Closes #5884
|
|
See [1].
[1]: https://github.com/swaywm/wlroots/pull/3245
|
|
|
|
Commit 152a559e replaced the view pointer in the inhibitor struct with a
pointer to the wlr_inhibitor for application inhibitors. But this was not
changed in the sway_idle_inhibit_v1_application_inhibitor_for_view function.
This caused a bug in the sway tree view where the application inhibitor is
always "none".
|
|
See [1].
[1]: https://github.com/swaywm/wlroots/pull/3106
|
|
This commit makes sure the extents are kept up-to-date, fixes not
damaging the surface if its layer shell-specific state didn't change,
and adds a check if the layer shell-specific state didn't change but the
surface got mapped/unmapped, which could affect keyboard focus.
|
|
This avoids infinite configure-ack_configure-commit loop.
|
|
|
|
This reverts commit 4dd46f06acc520449b980a5ea52be544cc5bfb6d, as the
logic is now handled by wlroots.
|
|
|
|
This can help debugging direct scan-out issues, such as [1].
[1]: https://github.com/swaywm/wlroots/issues/3185
|
|
This prevents sway from extending the desktop to i.e. VR headsets, and makes
them available for DRM leasing.
Non-desktop wlr_outputs will be offered through the wlr_drm_lease_v1_manager
interface for client to lease.
|
|
Previously, the position was calculated incorrectly for nested
subsurfaces.
|
|
|
|
This commit updates Sway for swaywm/wlroots#2915.
|
|
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.
|
|
Update for the wlroots breaking change in [1].
[1]: https://github.com/swaywm/wlroots/pull/3108
|
|
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.
|
|
The xdg-decoration protocol allows clients to request whether they want
to use server side decorations or client side decorations. Currently,
sway ignores this and always enforces whatever the server is currently
set to. Although tiled clients cannot be allowed to set borders, there
is no harm in listening requests from floating clients. Sidenote: also
fix an unrelated style error.
|
|
Update for the breaking change in [1].
[1]: https://github.com/swaywm/wlroots/pull/3011
|
|
update for wlroots 6369f7093178f0d66414eb67c312a403bfbb84a4
|
|
|
|
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.
|
|
render_surface_iterator previously deduced the clip box from an optional
container passed with render data. This causes problems when offsets in
view geometry need to be compensated for in the clip dimensions.
Instead, prepare the clip box in render_view_toplevels where the offsets
are being applied, and compensate for them immediately.
A similar compensation is applied to render_saved_view.
Closes: https://github.com/swaywm/sway/issues/6223
|
|
These coordinates contain the all-time accumulated buffer attach point,
which is a way to perform incremental client-side initiated movement of
windows, intended as a way to maintain logical window positioning while
compensating for layout changes such as folding in a left side panel.
This value is not useful for implementing this feature, and break things
if they ever become non-zero. Their inclusion in calculations also tend
to cause confusion.
Remove usage of these coordinates, removing the ability for clients to
move themselves. This may again be supported if a better API is made
available from wlroots.
|
|
|
|
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
|
|
We were calling wlr_gles2_texture_get_attribs, but we were never
using the result.
|
|
|
|
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.
|
|
No need to grab the xwayland surface from the wlr_surface, the
parent is already an xwayland surface.
|
|
|
|
If a surface is associated with a sway container, we limit the
destination box to the container dimensions.
Floating views and popups are exempt from this clipping.
|
|
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.
|
|
Currently, various floating-point expressions involving
the coordinates of borders, titlebars and content surfaces
are directly assigned to integers, and so they are rounded
towards zero.
This results in off-by-one distances between these elements
when the signs of their coordinates differ.
Fixed by wrapping these expressions with a call to
floor before the assignment.
|
|
Needed to check if containers are currently floating from render code,
as container_is_floating checks pending state.
|
|
When a container straddles multiple outputs, the title bar is only rendered
at the scale of the "effective" output. If the title bar straddles onto
another output with a different scale factor, it was drawn at the wrong size.
In this commit, we take into consideration the scale the title was rendered
at and scale it accordingly so that it appears at the right size on the other
outputs.
This fixes #6054.
|
|
To reproduce:
- Open a floating window and a popup that hangs over the bottom or right
- Move the window in the direction of the popup overhang
- The previous position of the popup is damaged, not the new one
|
|
|
|
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
|