Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

applets/wncklet/wayland-backend: Add basic context menu #1276

Merged

Conversation

Consolatis
Copy link
Contributor

Add a basic shared context menu.
I could only verify 'close' on sway because it doesn't support set_minimize or set_maximize but they should work just fine.

This is my first time doing anything with GTK so please verify g_new0 / gtk_widget_destroy / g_free is working as intended and it neither leaks memory nor tries to access free'd memory.

Copy link
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

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

On a test build of this, the build and installation went fine, and things worked normally on Xorg.
I then tried to get the panel running on my (very old) wayfire install, which used to work but now errors out on trying to launch the panel. With or without the xorg mate-session running made no difference, I got this error from dbus on trying to run the panel under wayfire, which I doubt has anything to do with this PR:

** (mate-panel:19455): WARNING **: 12:53:05.092: Cannot register the panel shell: Error spawning command line “dbus-launch --autolaunch=0caba25203a261b01af20e4e0000040f --binary-syntax --close-stderr”: Child process exited with code 1

Thus I am not now able to test this, and I don't know how to debug that error from dbus or wayfire.

@lukefromdc lukefromdc requested a review from a team December 16, 2021 18:21
@Consolatis
Copy link
Contributor Author

Consolatis commented Dec 16, 2021

The wayland implementation of mate panel (or really any other kind of panel) requires wlr-layer-shell support to work in a meaningful way like docking to the top / bottom + applets have to be built in-process.
The tasklist wncklet applet which this PR extends additionally requires wlr-foreign-toplevel-management.

It's quite possible your version of wayfire doesn't implement either of those.
I tested this PR with a recent version of sway (activate / close only) and a recent version of labwc (activate / maximize / minimize only).

@lukefromdc
Copy link
Member

lukefromdc commented Dec 16, 2021

layer-shell is used in the version of wayfire I have (build Jan 2021) but there might have been too many changes since then. No time at the moment to rebuild all of it from scratch. Note that I have always built all the possible applets in-process and am quite familiar with that issue

Copy link
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

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

I have finally gotten mate-panel to work in wayfire again. Still get the dbus-launch problem on starting in a separate vt on wayfire, but now wayfire can be run with x11 as a backend, giving you wayland inside the terminal, sort of like x11-wayland in reverse. In this mode, mate-panel will run, and I get a functional context menu with this.

For all that, the context menu renders, it renders in the right place, and maximize, unmaximize, minimize, and close all work. The option to close windows by middle click does not work, but that's separate from the context menus and is for another PR

@lukefromdc lukefromdc merged commit 1ce4fb2 into mate-desktop:master May 17, 2023
@Consolatis Consolatis deleted the feature/wayland_add_context_menu branch May 17, 2023 11:31
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.

2 participants