Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[feature request] Add Wayland support #159

Open
sarether opened this issue Jan 29, 2022 · 6 comments
Open

[feature request] Add Wayland support #159

sarether opened this issue Jan 29, 2022 · 6 comments

Comments

@sarether
Copy link

sarether commented Jan 29, 2022

Add Wayland support (without Xwayland).
And thinner widgets in height like 9.3 version (9.3 is latest with "normal" height ).

@afrischk
Copy link

What is necessary for native wayland support? Any pointers? I am a newbie in this field but maybe I can work on a PR...

I am asking because I switched from i3 to sway a couple of days ago and wanted to use yad to build a small shutdown menu with the --notification feature which seems to be not available with native wayland main.c#L879

@v1cont
Copy link
Owner

v1cont commented Apr 27, 2022

i don't use wayland. that's why i cannot add wayland support to yad

@sarether
Copy link
Author

i don't use wayland. that's why i cannot add wayland support to yad

Me too, but it would be nice if YAD worked without XWayland. There have been many cases recently (not mine).

@sarether sarether changed the title Add Wayland support [feature request] Add Wayland support Jun 10, 2022
@sonic2kk
Copy link

Yad seems to mostly work under Wayland, but a few features such as tabs (#109) and tray icons. So I think it's more a case of improving Wayland support. I'm not in any way familiar with the internal workings of Yad or Wayland implementations, but it seems like XDG Foreign Protol (which seems like an in-development spec?) should implement some of the functionality needed for tabs to work on Wayland.

I guess for improved Wayland support it'll need to be contributed by someone else and it'll require waiting for the Wayland spec to implement features needed for Yad to have full Wayland support (i.e., alternatives to what is used on X11).

Improved Native Wayland support would be excellent for Yad at some point in the future 🙏

@Dreded
Copy link

Dreded commented Apr 7, 2024

adding
GDK_BACKEND=x11
before each yad call seems to make tabs etc work

#!/bin/bash
GDK_BACKEND=x11 yad --plug=12345 --tabnum=1 --text="first tab with text" &>res1 &
GDK_BACKEND=x11 yad --plug=12345 --tabnum=2 --text="second tab" --entry &>res2 &
GDK_BACKEND=x11 yad --notebook --key=12345 --tab="Tab 1" --tab="Tab 2"

@tmccombs
Copy link

I have some ideas for how wayland support could be improved:

notebook and panels

Instead of using xembed, have --plug serialize the options to a file, then have notebook and panel read those options and use them to create the sub-components. That could also allow creating a file beforehand. And/or have a way to specify the contents of each tab/panel on the same command line as the tabs itself.

notification

I see two options here.

The first is to change it to be a notification instead of a "status icon". Basically, use GNotification instead of Gtk.StatusIcon. I think this would be pretty straightforward to do, and would better fit the name. Unfortunately, it would fundamentally change how the feature works.

The second is to use "more modern platform-specific APIs" outside of gtk, in particular the StatusNotifierItem protocol, probably with a library such as ayatana indicator library. The biggest problem with this, aside from probably adding a new dependency, is that AFAICT, there isn't any way to do it on vanilla gnome. There are extensions that provide support, but gnome itself refuses to implement SNI, from what I understand because of some limitations of the protocol, but they don't have any alternative. It's also basically linux specific, and I'm not sure if other platforms are supported by this project (although if it relys on xembed I'm guessing not).

--mouse

I don't think there is really anything that can be done about this unless a prototol is added to allow positioning toplevel surfaces somehow

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants