Skip to content

Swell Wayland (Linux) - #36

Draft
GoranKovac wants to merge 26 commits into
justinfrankel:mainfrom
GoranKovac:Wayland
Draft

Swell Wayland (Linux)#36
GoranKovac wants to merge 26 commits into
justinfrankel:mainfrom
GoranKovac:Wayland

Conversation

@GoranKovac

Copy link
Copy Markdown

Initial Wayland support. While Reaper works perfectly (from what I've tested everything works) to be in usable state plugins need to work and some wayland protocols need to be implemented in various compositors:

https://wayland.app/protocols/xx-zones-v1

This one is the biggest since at the moment all windows open in center and sizes are always max. Will just leave this here for some headstart when time comes to implement this.

To build : make SWELL_SUPPORT_GTK=1 WAYLAND=1

Whats implemented:

  1. Rendering
  2. Menus/tooltips
  3. Display detection
  4. Gtk clipboard
  5. Loading plugins (non cockos) is disabled since it leads to crash

I have experimented bit with plugin bridging/embedding and had some success but approach has some quirks which I was unable to fix ( https://forum.cockos.com/showthread.php?t=305832 ).

Anyway wanted to just leave this here. Take care!

GoranKovac added 18 commits July 1, 2026 17:24
add wayland flag
wayland needs relative mode for knobs etc
add OSWIDGET
fix gtkwidget typo, minimal wayland + screen update
fix again type gtkwidget and utilize gtk widget to fix coordinate offset
fix modal windows for gtkwidget
add gtk clipboard, fix geometry_hints for wayland
os_widget it not properly constructed and cleared
Dont reuse and move (in wayland its not easy to move things around).
Destroy previous menu and create fresh one instead
for wayland choose monitor from focused window.
fixes issue when app thinks current monitor is wrong resolution eg. on
multimonitor setup reaper is on monitor 2 (1440p) but menus are
constrained by monitor 1 (1080p) size so menus cant freely spawn within
1440p but get offset
On wayland media explorer receives null for image when opened for the
first time. Need to trace real problem but for now this guard is enough
fix drag and drop from file explorer
simplify updatetoscreen
fix drag and drop from media explorer
fix maximaxing call when oswindow is null eg. mixer is set to floating
and reaper is started (first time opened)
new gtk windows dont emit broken grab so manually send from here when
window is destroyed
disable plugin bridge in wayland for now
add ifdef for gtkwidget dnd
gtk forces is own thing and we need to explicitly set
set_geometry_hints. Fixes all windows to be requested/normal size rather
than maximized
fix maximized state (hyprland only?)
Fix restoring window size (windows would not restore large widths)
Use gdk_window_move_to_rect so compositor can move them inside display.
Since this does not allow for menu and tooltip to be shown at the same
time close tooltip when menu is about to be shown and dont allow showing
tooltips when menu is opened
got broken with fix restoring window sizes
on x11 this is not and issue but on wayland backend it makes whole app
close when grab is unset (it set internally when set_modal(TRUE).
Properly release/unset modal to release the grab.

NOTE: This issue is hidden when using set_modal(TRUE) but it never
releases the grab. Whole problem was that on wayland backend gdk and
swell is doing window destroy so skip passing GDK_DELETE event to GDK
since swell is already doing it
Docker drag and drop is a regression from a96f334, make drag and drop
tooltips use old path while true tooltips new path.

fix tooltips spawning in wrong (focused) window. Track what initial
window was that spawned tooltip and dont spawn them at all if current
floting window has focus (tooltip spwaned in non focused window)
fix building x11 app (no wayland flag) still producing semi-broken
wayland build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant