swaywm / wlroots

A modular Wayland compositor library
https://gitlab.freedesktop.org/wlroots/wlroots/
MIT License
2.15k stars 343 forks source link

wlroots status #9

Closed ddevault closed 6 years ago

ddevault commented 7 years ago

Planned and completed features, loosely sorted by priority:

ddevault commented 7 years ago

@nyorain added support for output rotation and multihead to the WL backend. Leaving the other tasks to you for now. Thanks again, that backend is going to make things way easier for me to work on upcoming features.

ddevault commented 7 years ago

An additional point of discussion for the wayland backend: the compositor is going to hand us a keyboard layout. Should we give a shit? Right now wlroots doesn't bother with handling keyboard layouts and leaves that up to the user, we just hand it scancodes and the user feeds them to xkb. Maybe we could have a means for a wlr_keyboard to suggest a layout? XKB is going to source from the environment variables which would almost certainly be set in any case.

ddevault commented 7 years ago

Clarification: wayland hands entire XKB keymaps to the client. Maybe we should just move xkb code into wlroots...

torpak commented 7 years ago

Runtime switchable layouts would be nice in the long run.

soredake commented 7 years ago

How about relative-pointer protocol?

ddevault commented 7 years ago

Link?

ascent12 commented 7 years ago

@soredake Yeah, I imagine we'll get most of the extra (currently unstable) things from wayland-protocols.

@SirCmpwn https://github.com/wayland-project/wayland-protocols/blob/master/unstable/relative-pointer/relative-pointer-unstable-v1.xml

ddevault commented 7 years ago

Yeah eventually we'll want that.

martinetd commented 7 years ago

Xwayland init can probably be checked. On top of the other two points, we might also want to add something about cursor as there look like we'll need some special cursor handling within our xwayland layer as well. I'm not sure if "window management utilities" is about stuff like move/resize/full screen/focus/title, if it isn't then will need another checkbox that that and please explain briefly what this actually is :)

ddevault commented 7 years ago

On top of the other two points, we might also want to add something about cursor as there look like we'll need some special cursor handling within our xwayland layer as well.

What do you mean?

I'm not sure if "window management utilities" is about stuff like move/resize/full screen/focus/title, if it isn't then will need another checkbox that that and please explain briefly what this actually is :)

Yes, that's what it is. Though it might make more sense for the compositor to just implement an X11 window manager themselves? Thoughts?

martinetd commented 7 years ago

[xwayland cursor handling]

What do you mean?

Actually not 100% sure, but there is code in both weston and wlc about cursors within their xwayland code. It looks like they send Xwayland cursor pixel maps so it will render it on the X side, but I do not understand yet why that is not redundant with the wayland-side rendering, or why it is useful.

[window management utilities]

Yes, that's what it is. Though it might make more sense for the compositor to just impl\ ement an X11 window manager themselves? Thoughts?

Hm. I think we should handle X11 events as close as possible to what xdg/wl shells do. For example, if I understand this correctly xdg_toplevel_move will be called when an wayland client asks to move the toplevel one way or another. sway in tiled mode will probably not care at all, since we enforce positions; but another compositor or in floating mode we will probably want to get notified when this happens.

That means we either need some kind of upcall vector for shells to notify the compositor something happened, or we need to store the request somewhere until the compositor processes the buffer in the next frame iterating. (I don't know if there already has been a decision for that, could be something else I guess)

I haven't given this much thought yet but at this point I would rather have xwayland behave like another shell and just notify the compositor something happened, so the 'xwm' would really just be something like an x shell handler.

Does that seem to make sense?

Sunderland93 commented 7 years ago

What about presentation-time and viewporter protocols? https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/presentation-time/presentation-time.xml https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/viewporter/viewporter.xml

ddevault commented 7 years ago

Added em

ghallberg commented 7 years ago

Is there a subset of these points that need to be implemented before "releasing" wlroots (starting to use it for sway for example). Or are you planning to finish all of these before that?

RDP for example feels like it's a lot of work, and not really needed for 99% of use cases.

Just asking out of curiosity, and to know where to apply any possible free time I have to spare for contributions.

ddevault commented 7 years ago

There is a subset, yes. Work on porting Sway to wlroots will begin soon. If you're interested in contributing to wlroots, please join us in the IRC channel for direction.

Sunderland93 commented 7 years ago

Hello. Please add this protocols: xwayland-keyboard-grub, relative-pointer, xdg-foreign and xdg-output

ddevault commented 7 years ago

Sure.

L-as commented 7 years ago

Should (can) drag-and-drop be a part of wlroots?

ddevault commented 7 years ago

Yes, and it's already in this list.

emersion commented 7 years ago

We could add gtk-primary-selection for better clipboard support.

Kommynct commented 7 years ago

Would it be appropriate to put shadows for floating windows on this list?

emersion commented 7 years ago

No.

Kommynct commented 7 years ago

Okay, thank you.

ibrokemypie commented 6 years ago

is wayland-wall to be implemented?

valpackett commented 6 years ago

Looks like surface-layers will be used instead of wayland-wall's background/dock-manager/launcher-menu/notification-area.

But wayland-wall also has window-switcher, seems like a useful one (e.g. for rofi)

andrewwakeling commented 6 years ago

Are there any guides on how to install wlroots (in combination with sway), especially with Ubuntu?

emersion commented 6 years ago

From the Wayland ML:

In short, Xwayland will take the current wl_output mode, ignore any scale, and use the mode to configure the Xrandr monitors and the X11 screen. Since we want to make it possible to fix Xwayland to actually take the scale into account, while properly implement wl_output modes, as well as not cause any regressions, we introduced xdg_output (see wayland-protocols) which will actually make it possible to do things correctly by letting clients (read Xwayland) know about the logical size of a wl_output.

So xdg-output will probably allow better Xwayland HiDPI support in the future.

See https://bugzilla.gnome.org/show_bug.cgi?id=787363

Also see https://wiki.gnome.org/Initiatives/Wayland/XWayland

Sunderland93 commented 6 years ago

Please add input-timestamps protocol https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/input-timestamps/input-timestamps-unstable-v1.xml and keyboard-shortcuts-inhibit https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml

emersion commented 6 years ago

Done.

linkmauve commented 6 years ago

linux-dmabuf is another very important protocol from wayland-protocols you are missing, it allows clients to create Wayland buffers from dmabuf fds in the most efficient way allowed by the drivers. You can find the two weston-simple-dmabuf-* test clients in Weston, and any recent Mesa will also implement it.

emersion commented 6 years ago

Yeah, that's true. Even if it's not on the list we talked about implementing it in the past. Thanks for the heads-up!

ascent12 commented 6 years ago

It's probably to the point where we should just promise everything inside wayland-protocols, unless there is a specific reason we don't want to do it.

ddevault commented 6 years ago

I think this ticket has outlived its usefulness. wlroots is ready to build compositors with.

bew commented 6 years ago

So feature-wise it's complete, but is the API stable? (can we write language bindings without breakage)

emersion commented 6 years ago

See https://github.com/swaywm/wlroots/issues/1008

bew commented 6 years ago

Perfect thanks