Skip to content

wayland: add dwl/mango support#609

Open
charlesrocket wants to merge 1 commit intoquickshell-mirror:masterfrom
charlesrocket:dwl
Open

wayland: add dwl/mango support#609
charlesrocket wants to merge 1 commit intoquickshell-mirror:masterfrom
charlesrocket:dwl

Conversation

@charlesrocket
Copy link

@charlesrocket charlesrocket commented Mar 6, 2026

Tested with mango 0.12.4(release)

Closes #457/#51

ItsLemmy added a commit to noctalia-dev/noctalia-qs that referenced this pull request Mar 7, 2026
Merges charlesrocket's dwl branch (PR quickshell-mirror#609) with
wl_proto() refactor replacing hand-rolled protocol bindings.
Copy link
Member

@outfoxxed outfoxxed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wayland protocols are not implemented like this in a qt project. Look at
https://github.com/quickshell-mirror/quickshell/tree/master/src/wayland/hyprland/global_shortcuts for a simple one. We also never check in generated code.

@charlesrocket
Copy link
Author

Wayland protocols are not implemented like this in a qt project. Look at https://github.com/quickshell-mirror/quickshell/tree/master/src/wayland/hyprland/global_shortcuts for a simple one. We also never check in generated code.

Oh, missed that one! It is not generated tho, just a bespoke implementation 😺

@outfoxxed
Copy link
Member

I see how you could potentially miss the QtWayland tooling and qtwaylandscanner but how do you miss wayland-scanner? Nobody does that part by hand

@charlesrocket
Copy link
Author

It was pretty late, and DWL spec is not long enough for me to look for easy ways ahah

@charlesrocket charlesrocket force-pushed the dwl branch 5 times, most recently from 51955ce to 4c7ebfc Compare March 8, 2026 12:03
Copy link
Member

@outfoxxed outfoxxed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review:

Can you clarify if tags are functionally per monitor or global? the global tagCount seems to indicate they're global, and if setting client tags via monitor affects global or monitor state?

Comment on lines +20 to +22
class DwlIpcOutput
: public QObject
, public QtWayland::zdwl_ipc_output_v2 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undecided on if its OK to merge the implementation and interface on this one

Comment on lines +29 to +32
/// Title of the focused window, empty if none.
Q_PROPERTY(QString title READ title NOTIFY titleChanged);
/// App ID of the focused window, empty if none.
Q_PROPERTY(QString appId READ appId NOTIFY appIdChanged);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicates information exposed by toplevel management less usefully.

Comment on lines +37 to +38
/// Whether a client is fullscreen on this output.
Q_PROPERTY(bool fullscreen READ fullscreen NOTIFY fullscreenChanged);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also duplicate

Comment on lines +39 to +40
/// Whether the focused client is floating.
Q_PROPERTY(bool floating READ floating NOTIFY floatingChanged);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If exposed at all this should probably be attached to toplevel

@outfoxxed
Copy link
Member

Also does mango support the ext-workspace protocol? We have a mostly done implementation on a branch that I could fix up and merge, which is strictly an improvement over this protocol.

@charlesrocket
Copy link
Author

Partial review:

Can you clarify if tags are functionally per monitor or global? the global tagCount seems to indicate they're global, and if setting client tags via monitor affects global or monitor state?

DWL is all per output

///! A DWL monitor/output with IPC state.
/// Exposes per-monitor compositor state: tag list, active layout, focused
/// window title, app ID, and fullscreen/floating flags.
///! State of a single DWL tag.
/// Represents one tag slot on @@DwlIpcOutput.

Tho tag count and layouts are global.

@charlesrocket
Copy link
Author

Also does mango support the ext-workspace protocol? We have a mostly done implementation on a branch that I could fix up and merge, which is strictly an improvement over this protocol.

Looks like it does https://github.com/mangowm/mango/blob/d441ca22f4bd7554f04defdd36f13bedc38610e7/src/ext-protocol/ext-workspace.h

@herry6548
Copy link

herry6548 commented Mar 9, 2026

The upcoming release of wlroots0.20 has also integrated the encapsulation support of the ext-workspace protocol. At that time, most compositor will only need little code to use this protocol.

refer:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5115

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.

[Feature Request] MangoWC support

3 participants