aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
AgeCommit message (Collapse)Author
2021-12-06output: remove surface buffer damage checkKirill Primak
A surface can have effective damage even without any buffer damage committed.
2021-11-25sway: replace noop_output by fallback_outputSimon Zeni
wlroots removed the support for the noop backend. Instead we rely on the headless backend to provide the fallback output.
2021-11-18sway: create wlr_renderer and wlr_allocatorSimon Zeni
wlroots now required the compositor to create its own wlr_renderer and wlr_allocator to initialize the wlr_output
2021-10-19xwayland: Clear wlr_xwayland_surface in handle_destroyDavid Rosca
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
2021-10-15Handle present events with NULL timespec fieldSimon Ser
See [1]. [1]: https://github.com/swaywm/wlroots/pull/3245
2021-10-07Fix compile after wlroots commit c3e54021f8bbf3ec1c1e5906459be0ae85f5fb8cTassilo Horn
2021-10-04idle_inhibit: Fix tree view after changes in commit 152a559eBartel Sielski
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".
2021-10-01Chase wlr_xdg_surface breaking changesSimon Ser
See [1]. [1]: https://github.com/swaywm/wlroots/pull/3106
2021-09-25layer-shell: fix commit handlerKirill Primak
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.
2021-09-24layer-shell: check `committed` bitmaskKirill Primak
This avoids infinite configure-ack_configure-commit loop.
2021-09-23layer-shell: chase wlr layer surface refactorKirill Primak
2021-09-21Revert "xdg_shell: schedule configure on maximize requests"Kirill Primak
This reverts commit 4dd46f06acc520449b980a5ea52be544cc5bfb6d, as the logic is now handled by wlroots.
2021-09-21xdg-shell: chase wlr xdg toplevel refactorKirill Primak
2021-09-20Add -Dnoscanout debug optionSimon Ser
This can help debugging direct scan-out issues, such as [1]. [1]: https://github.com/swaywm/wlroots/issues/3185
2021-09-09introduce wlr_drm_lease_v1Simon Zeni
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.
2021-09-08view: fix child position calcKirill Primak
Previously, the position was calculated incorrectly for nested subsurfaces.
2021-09-07render: fix -Ddamage=rerenderKirill Primak
2021-08-28desktop/xwayland: restack surface upon activationTudor Brindus
This commit updates Sway for swaywm/wlroots#2915.
2021-08-26Use fixed titlebar heightsHugo Osvaldo Barrera
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.
2021-08-14layer-shell: replace close() with destroy()Simon Ser
Update for the wlroots breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3108
2021-08-12layer_shell: damage previous area when a surface shrinksRonan Pigott
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.
2021-08-12xdg-decoration: let floating clients set bordersDudemanguy
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.
2021-07-07Update wlr_box includesSimon Ser
Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3011
2021-05-17remove usage of `wlr_texture_get_size`Tobias Langendorf
update for wlroots 6369f7093178f0d66414eb67c312a403bfbb84a4
2021-04-26xdg-shell: ignore unecessary fullscreen request ouput hintsRonan Pigott
2021-04-26Remove support for arbitrary rotationsSimon Ser
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.
2021-04-26desktop/render: Pass explicit clip box to renderKenny Levinsen
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
2021-04-26Remove usage of surface->sx|syKenny Levinsen
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.
2021-04-12desktop/layer_shell: fix centering for opposing anchorsfwsmit
2021-04-12desktop/layer_shell.c: Fix misspelled "exclusive"Elyes HAOUAS
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2021-04-11desktop/render: remove unused wlr_gles2_texture_attribsSimon Ser
We were calling wlr_gles2_texture_get_attribs, but we were never using the result.
2021-04-01output: damage whole output when exiting scanoutRonan Pigott
2021-03-21idle_inhibit: Store wlr inhibitor instead of viewKenny Levinsen
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.
2021-03-12xwayland: simplify override-redirect focus restorationSimon Ser
No need to grab the xwayland surface from the wlr_surface, the parent is already an xwayland surface.
2021-03-11output: simplify layer surface iterationVyivel
2021-03-01render: Clip surfaces to container boundsKenny Levinsen
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.
2021-02-25render: handle containers without output when rendering titlesQuantum
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.
2021-02-23shells: Update comment about size change on commitKenny Levinsen
2021-02-23transaction: Remove unused ready_immediatelyKenny Levinsen
2021-02-23transaction: Note if instructions are server requestsKenny Levinsen
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.
2021-02-22Fix #5643, #5064: rounding issues in floating-point -> integer conversionsDimitris Triantafyllidis
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.
2021-02-22container: Add container_is_current_floatingKenny Levinsen
Needed to check if containers are currently floating from render code, as container_is_floating checks pending state.
2021-02-22render: scale titlebars correctly when straddling outputsQuantum
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.
2021-02-21Fix incorrect damage being applied on popupsTadeo Kondrak
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
2021-02-16render: Use current instead of pending fullscreenKenny Levinsen
2021-02-16container: Move pending state to state structKenny Levinsen
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.
2021-02-16transactions: Amend pending transactionsKenny Levinsen
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
2021-02-15transaction: Only wait for ack from visible viewsKenny Levinsen
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
2021-02-09view: Read geometry directly in view_update_sizeKenny Levinsen
2021-02-09shells: Align geometry change commit handlingKenny Levinsen
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.