Skip to content

Unify with_app_id and with_class on Linux/BSD #1739

@chrisduerr

Description

@chrisduerr

Winit currently has two calls that do very similar things, with_app_id and with_class. Generally I think these are rarely used with different parameters and more commonly the code is just duplicated between both of them. As an abstraction library that shouldn't make downstream care too much about Wayland/X11, I think this gives winit the opportunity to unify these two methods to make things a bit easier to use.

They are of course not exactly the same and depending on the platform the number of arguments is different, but since they should generally overlap this can be resolved by thorough documentation.

Of course even when unified, people could still do x11/Wayland checks on their own if they really want to treat these methods differently.

So the main reason why one wouldn't want to do this is that these aren't commonly set to the same thing. I can only speak for myself and Alacritty where we do indeed set these to the same value, so I'm curious about others here. Are there any downstream users treating these as different things?

Metadata

Metadata

Assignees

Labels

C - needs discussionDirection must be ironed outDS - waylandAffects the Wayland backend, or generally free Unix platformsDS - x11Affects the X11 backend, or generally free Unix platformsS - apiDesign and usability

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions