aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop
Commit message (Collapse)AuthorAge
* Remove internal references to DPMSLibravatar Simon Ser2022-07-04
| | | | | While at it, use an int for the config field, just like we do for all other fields.
* xdg-shell: schedule a configure on maximize requestLibravatar Kirill Primak2022-05-27
| | | | | This commit reverts 03879290dbee26127f6867ef60bc2a7f9a6c8c5f and fc84bcb7fb0ffa29b1f9bed287762241a3473803.
* chore: chase wlroots xdg-shell updateLibravatar Kirill Primak2022-05-27
|
* ext-session-lock: disable direct scan-out when lockedLibravatar Daniel De Graaf2022-05-23
|
* Implement ext-session-lock-v1Libravatar Daniel De Graaf2022-04-29
|
* Chase wlroots X11 hints updateLibravatar kraftwerk282022-04-18
|
* layer_shell: keep output non-NULL wherever possibleLibravatar Thomas Hebb2022-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our layer shell implementation assigns every layer surface to an output on creation. It tracks this output using the output field on the underlying wlr_layer_surface_v1 structure. As such, much of the existing code assumes that output is always non-NULL and omits NULL checks accordingly. However, there are currently two cases where we destroy a sway_layer_surface and output is NULL. The first is when we can't find an output to assign the surface to and destroy it immediately after creation. The second is when we destroy a surface in response to its output getting destroyed, as we set output to NULL in handle_output_destroy() before we call wlr_layer_surface_v1_destroy(), which is what calls the appropriate unmap and destroy callbacks. The former case doesn't cause any problems, since we haven't even allocated a sway_layer_surface at that point or registered any callbacks. The latter case, however, currently triggers a crash (#6120) if a popup is visible, since our popup_handle_unmap() implementation can't handle a NULL output. To fix this issue, keep output set until right before we free the sway_layer_surface. All we need to do is remove some of the cleanup logic from handle_output_destroy(), since as of commit c9060bcc12d0 ("layer-shell: replace close() with destroy()") that same logic is guaranteed to be happen later when wlroots calls handle_destroy() as part of wlr_layer_surface_v1_destroy(). This lets us remove some NULL checks from other unmap/destroy callbacks, which is nice. We also don't need to check that the wlr_output points to a valid sway_output anymore, since we unset that pointer after disabling the output as of commit a0bbe67076b8 ("Address emersions comments on output re-enabling") Just to be safe, I've added assertions that the wlr_output is non-NULL wherever we use it. Fixes #6120.
* Don't enter seatop_move_floating when fullscreenLibravatar Thomas Hebb2022-02-24
| | | | | | | | | | | Currently, a floating window that's been fullscreened can send us xdg_toplevel::move, and we'll enter seatop_move_floating, which lets us drag the surface around while it's fullscreen. We don't want this--fullscreen surfaces should always be aligned to the screen--so add the same check that seatop_default already does when entering this mode. Tested with Weston's weston-fullscreen demo, which sends a move request if you click anywhere on its surface.
* xdg-shell: use wlr_xdg_popup in sway_xdg_popupLibravatar Simon Ser2022-02-07
| | | | Improved type safety.
* xdg-shell: use wlr_xdg_toplevel in sway_viewLibravatar Simon Ser2022-02-07
| | | | | | Improved type safety. Closes: https://github.com/swaywm/sway/issues/6813
* Chase wlroots xdg-shell refactorLibravatar Kirill Primak2022-02-03
|
* chore: chase wlr_output_layout_get_box() updateLibravatar Kirill Primak2022-01-31
| | | | https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3439
* xwayland: listen to `request_activate` eventLibravatar Tuomas Yrjölä2022-01-31
| | | | | | | When REAPER submenu is closed `XCB_CLIENT_MESSAGE` with type `NET_ACTIVE_WINDOW` is sent to set focus to parent menu. Closes: https://github.com/swaywm/sway/issues/6324
* transaction: destroying nodes aren't hiddenLibravatar Rouven Czerwinski2022-01-18
| | | | | | | | | | | | | | | | | | | Commit 37d7bc69986f ("transaction: Only wait for ack from visible views") introduced a check which uses view_is_visible() to check if a view is still visible on the screen. However view_is_visible() will early return in case the node is in the destroying state. This is incorrect for transactions, since a destroying view which is visible will trigger configure events for other clients. This bug was visible when repeatedly opening and closing two views side by side, since we ignore the destroying node we get a frame where the still open view is shown with the old configure values and the rest is the desktop background. The next frame is than correct again. Fix this by considering destroying views as visible, we correctly wait for them and send the configure events to other views in time, fixing the background flicker. Fixes #6473
* Upgrade for wlroots surface refactoringLibravatar Simon Ser2022-01-13
| | | | | | See [1] for details. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3412
* xdg-shell: use toplevel geometry to adjust the popup boxLibravatar Aleksei Bavshin2022-01-12
| | | | | | | | | | | | | `popup_unconstrain` uses view coordinates to init the output box for popups. However wlroots expects the box to be set in a toplevel surface coordinate system, which is not always equal to view. The difference between those is a window geometry set via xdg-shell. GTK4 reserves some space for client-side decoration and thus has a window with top left corner not matching to (0, 0) of a surface. The box calculated without taking that into account was slightly shifted compared to the actual output and allowed to position part of the popup off screen.
* Destroy sub-surfaces with parent layer-shell surfaceLibravatar Simon Ser2022-01-08
| | | | Closes: https://github.com/swaywm/sway/issues/6337
* output: change output::destroy to output::disableLibravatar Ronan Pigott2021-12-17
| | | | | This changes output::destroy to output::disable and emits it only once when an output is disabled, instead of twice in succession.
* Add focused_tab_titleLibravatar Vsevolod2021-12-10
|
* Fixup headless output namesLibravatar Simon Ser2021-12-09
| | | | | | | | | | | | 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
* output: remove surface buffer damage checkLibravatar Kirill Primak2021-12-06
| | | | | A surface can have effective damage even without any buffer damage committed.
* sway: replace noop_output by fallback_outputLibravatar Simon Zeni2021-11-25
| | | | | wlroots removed the support for the noop backend. Instead we rely on the headless backend to provide the fallback output.
* sway: create wlr_renderer and wlr_allocatorLibravatar Simon Zeni2021-11-18
| | | | | wlroots now required the compositor to create its own wlr_renderer and wlr_allocator to initialize the wlr_output
* xwayland: Clear wlr_xwayland_surface in handle_destroyLibravatar David Rosca2021-10-19
| | | | | | | | | 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
* Handle present events with NULL timespec fieldLibravatar Simon Ser2021-10-15
| | | | | | See [1]. [1]: https://github.com/swaywm/wlroots/pull/3245
* Fix compile after wlroots commit c3e54021f8bbf3ec1c1e5906459be0ae85f5fb8cLibravatar Tassilo Horn2021-10-07
|
* idle_inhibit: Fix tree view after changes in commit 152a559eLibravatar Bartel Sielski2021-10-04
| | | | | | | | 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".
* Chase wlr_xdg_surface breaking changesLibravatar Simon Ser2021-10-01
| | | | | | See [1]. [1]: https://github.com/swaywm/wlroots/pull/3106
* layer-shell: fix commit handlerLibravatar Kirill Primak2021-09-25
| | | | | | | 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.
* layer-shell: check `committed` bitmaskLibravatar Kirill Primak2021-09-24
| | | | This avoids infinite configure-ack_configure-commit loop.
* layer-shell: chase wlr layer surface refactorLibravatar Kirill Primak2021-09-23
|
* Revert "xdg_shell: schedule configure on maximize requests"Libravatar Kirill Primak2021-09-21
| | | | | This reverts commit 4dd46f06acc520449b980a5ea52be544cc5bfb6d, as the logic is now handled by wlroots.
* xdg-shell: chase wlr xdg toplevel refactorLibravatar Kirill Primak2021-09-21
|
* Add -Dnoscanout debug optionLibravatar Simon Ser2021-09-20
| | | | | | This can help debugging direct scan-out issues, such as [1]. [1]: https://github.com/swaywm/wlroots/issues/3185
* introduce wlr_drm_lease_v1Libravatar Simon Zeni2021-09-09
| | | | | | | | 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.
* view: fix child position calcLibravatar Kirill Primak2021-09-08
| | | | | Previously, the position was calculated incorrectly for nested subsurfaces.
* render: fix -Ddamage=rerenderLibravatar Kirill Primak2021-09-07
|
* desktop/xwayland: restack surface upon activationLibravatar Tudor Brindus2021-08-28
| | | | This commit updates Sway for swaywm/wlroots#2915.
* Use fixed titlebar heightsLibravatar Hugo Osvaldo Barrera2021-08-26
| | | | | | | | | | | | | | | 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.
* layer-shell: replace close() with destroy()Libravatar Simon Ser2021-08-14
| | | | | | Update for the wlroots breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3108
* layer_shell: damage previous area when a surface shrinksLibravatar Ronan Pigott2021-08-12
| | | | | | | 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.
* xdg-decoration: let floating clients set bordersLibravatar Dudemanguy2021-08-12
| | | | | | | | | 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 wlr_box includesLibravatar Simon Ser2021-07-07
| | | | | | Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3011
* remove usage of `wlr_texture_get_size`Libravatar Tobias Langendorf2021-05-17
| | | | update for wlroots 6369f7093178f0d66414eb67c312a403bfbb84a4
* xdg-shell: ignore unecessary fullscreen request ouput hintsLibravatar Ronan Pigott2021-04-26
|
* Remove support for arbitrary rotationsLibravatar Simon Ser2021-04-26
| | | | | | | 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.
* desktop/render: Pass explicit clip box to renderLibravatar Kenny Levinsen2021-04-26
| | | | | | | | | | | | | 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
* Remove usage of surface->sx|syLibravatar Kenny Levinsen2021-04-26
| | | | | | | | | | | | | | | 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.
* desktop/layer_shell: fix centering for opposing anchorsLibravatar fwsmit2021-04-12
|
* desktop/layer_shell.c: Fix misspelled "exclusive"Libravatar Elyes HAOUAS2021-04-12
| | | | Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>