discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wayland backend


From: Riccardo Canalicchio
Subject: Re: Wayland backend
Date: Thu, 11 Nov 2021 08:36:56 +0100

Hello!
I made some more progress, I implemented cairo-egl surfaces for the wayland backend, this should make things snappier (at least it works way better in my VM)

Given that the previous PR is quite complex already, I'd suggest to keep these changes separated for now, here you can take a look:
https://github.com/nongio/libs-back/pull/1

If you want to try it out, the branch is "wayland-egl":
https://github.com/nongio/libs-back/tree/wayland-egl

To be able to use it, you will need a version of cairo with EGL support and surface backend: OpenGL ES 2.0, here a gist of the modified meson_options.txt to compile it yourself:
https://gist.github.com/nongio/e0365186b867d85c4092c6c3d9e998cc

If you are interested i am available to have a session where i can explain the approach,
cheers,
Riccardo

On Sun, 7 Nov 2021 at 21:37, Riccardo Canalicchio <riccardo.canalicchio@gmail.com> wrote:
sure, in wayland when creating a popup window is requested to provide a parent window.
When creating a window for a submenu, I had to find a way to retrieve the window of the parent menu, what the code does is:
1) get a NSWindow from windowid
2) get the NSMenu associated
3) get supermenu from the menu
4) get the window from the supermenu

to access the NSWindow [instance menu] I had to expose the attribute previously private. Here the change
https://github.com/gnustep/libs-gui/pull/122/files

cheers,
Riccardo


On Sun, 7 Nov 2021 at 21:23, Fred Kiefer <fredkiefer@gmx.de> wrote:
Great improvement! Thank you for that.

> Am 06.11.2021 um 13:33 schrieb Riccardo Canalicchio <riccardo.canalicchio@gmail.com>:
>
> Hello,
> following up on this, I moved forward with the implementation and I have got to a working state. (with still some bugs but usable)
> Windows are shown properly, dropdown menus as well, resize and move work.
> The implementation is tested on Weston, GnomeShell and some other compositors based on wlroots. It uses the protocol xdgshell widely adopted in all the compositors as well the layer shell protocol which is currently adopted by the wlroots compositors and ubuntu shell.
> Here a PR: https://github.com/gnustep/libs-back/pull/33
>
> note: To be able to associate submenus to the parent windows i had to make a change to libs-gui:
> https://github.com/nongio/libs-back/blob/wayland/Source/wayland/WaylandServer.m#L894
> maybe there are better ways to do it, in case you think it's ok i would proceed to make a PR for libs-gui too

Could you please explain this a bit? What is the issue here and what is your workaround? And what could be a better workaround in gui?

Cheers,
Fred

reply via email to

[Prev in Thread] Current Thread [Next in Thread]