Compare commits

..

10 commits

Author SHA1 Message Date
Hugo Osvaldo Barrera
909a2ddb5f Centre fullscreen surfaces smaller than output
Sway renders fullscreen surfaces smaller than the output left-aligned.

From xdg-shell:

> If the surface doesn't cover the whole output, the compositor will
> position the surface in the center of the output and compensate with
> with border fill covering the rest of the output. The content of the
> border fill is undefined, but should be assumed to be in some way that
> attempts to blend into the surrounding area (e.g. solid black).

Render surfaces smaller than the output centred. Can be tested easily
with:

    weston-simple-egl -f -r

Fixes: https://github.com/swaywm/sway/issues/8845
2026-03-26 18:41:48 +01:00
Simon Ser
ec7e0186e0 build: bump version to 1.13-dev 2026-03-26 16:30:37 +01:00
Hugo Osvaldo Barrera
f50f78c0d9 ext-workspace-v1: initial implementation
Maintain a 1:1 relationship between workspace groups and outputs, so
that moving a workspace across groups effectively moves it across
outputs.

ext_workspace_handle_v1::id is never emitted; sway has no concept of ids
or of stable vs temporary workspaces. Everything is ephemeral to the
current session.

ext_workspace_handle_v1::coordinates is never emitted; sway does not
organise workspaces into any sort of grid.

ext_workspace_handle_v1::assign is mostly untested, because no client
current implements this. Perhaps it's best to not-advertise the feature
for now?

Deactivating a workspace is a no-op. This functionality doesn't really
align with sway, although it could potentially be implemented to "switch
to previous workspace on this output" as a follow-up.

Removing a workspace is a no-op.

Implements: https://github.com/swaywm/sway/issues/8812
2026-03-24 17:25:33 +01:00
Hugo Osvaldo Barrera
7ba11d6dee Make workspace_move_to_output reusable
Move workspace_move_to_output out of the command handler, so it can be
re-used for ext_workspace_handle_v1::assign.
2026-03-24 17:25:33 +01:00
llyyr
131045ce55 sway_text_node: properly check cairo_t status in text_calc_size
cairo_create never returns NULL, so the previous null check never
triggered. Use cairo_status instead.
2026-03-21 11:18:26 +01:00
llyyr
dea166a27c common/pango: use pangocairo directly instead of cairo_create(NULL)
We never need a cairo context for anything here. Use
pango_cairo_font_map_get_default() and pango_font_map_create_context()
directly instead of bootstrapping via a nil cairo context.

Same as last commit, but just a cosmetic fix in this case since we don't
actually use the cairo context for anything
2026-03-21 11:18:26 +01:00
llyyr
e4870d84a2 sway_text_node: fix cairo_create without a backing surface
This fixes sway not being able to draw text on text nodes.

cairo_create(NULL) returns a nil object in an error state rather than
NULL, causing the null check to never trigger and passing a broken cairo
context to get_text_size, which was fine until 40e1dcd29f adding error
handling to it and causing pango_cairo_update_layout to fail with a NULL
pointer.
2026-03-21 11:18:26 +01:00
Stephane Fontaine
8378c560c1 call disable container in arrange_root 2026-03-20 22:53:22 -04:00
Félix Poisot
82227d6103 common/pango: get_text_size out pointers may be NULL
Fixes: 2c2a2ec380
Closes: https://github.com/swaywm/sway/issues/9082
2026-03-20 09:51:55 +01:00
llyyr
85a4b19ac4 build: bump wlroots version
Upstream bumped to 0.21.0-dev 627da39e76
2026-03-19 16:24:39 -04:00
4 changed files with 6 additions and 6 deletions

View file

@ -25,7 +25,7 @@ packages:
- hwdata-dev
sources:
- https://github.com/swaywm/sway
- https://gitlab.freedesktop.org/wlroots/wlroots.git#0.20
- https://gitlab.freedesktop.org/wlroots/wlroots.git
tasks:
- wlroots: |
cd wlroots

View file

@ -22,7 +22,7 @@ packages:
- hwdata
sources:
- https://github.com/swaywm/sway
- https://gitlab.freedesktop.org/wlroots/wlroots.git#0.20
- https://gitlab.freedesktop.org/wlroots/wlroots.git
tasks:
- wlroots: |
cd wlroots

View file

@ -31,7 +31,7 @@ packages:
- misc/hwdata
sources:
- https://github.com/swaywm/sway
- https://gitlab.freedesktop.org/wlroots/wlroots.git#0.20
- https://gitlab.freedesktop.org/wlroots/wlroots.git
tasks:
- setup: |
cd sway

View file

@ -1,7 +1,7 @@
project(
'sway',
'c',
version: '1.12-rc1',
version: '1.13-dev',
license: 'MIT',
meson_version: '>=1.3',
default_options: [
@ -39,14 +39,14 @@ if is_freebsd
endif
# Execute the wlroots subproject, if any
wlroots_version = ['>=0.20.0', '<0.21.0']
wlroots_version = ['>=0.21.0', '<0.22.0']
subproject(
'wlroots',
default_options: ['examples=false'],
required: false,
version: wlroots_version,
)
wlroots = dependency('wlroots-0.20', version: wlroots_version, fallback: 'wlroots')
wlroots = dependency('wlroots-0.21', version: wlroots_version, fallback: 'wlroots')
wlroots_features = {
'xwayland': false,
'libinput_backend': false,