Wayland?
Hey man,
I want to use pmenu in a wayland environment (without XWayland) but obviously that won't work. Looking at the code it seems to rely pretty heavily on X's own functionality rather than using another lib like cairo or something. This probably makes a wayland option difficult to implement within this tree, as with a wayland version you'd probably want to use something like cairo (there is no real xrender alternative). I'd probably fork pmenu and make it work in wayland but figured I should bring it up here in case you'd want that to become part of the original codebase alongside the X version. This would have many advantages but would probably require a transition to using something that isn't XRender for rendering.
What do you think? Don't bother changing this one and just fork it, or have one repository that does both X and wayland?
πmenu is heavily dependent on X11, it uses the XRender extension to draw anti-aliased stuff, the XSession extension to make the window a circle, and Xlib to handle input. It also uses the X11 override-redirect flag to make it work like a menu window. Unfortunately, I have no experience with Cairo or with Wayland (in fact, I have never used Wayland, as there is no support for OpenBSD).
Feel free to fork πmenu to convert it to use libcairo.
EDIT: Indeed, I'll not change this tree to support Wayland, as it would require changing the code a lot. But you can create other repository for the fork that does both X and Wayland. I will happily contribute to it!
Thought that might be the case. OK, cheers!
On 210211 05:36, phillbush wrote:
πmenu is heavily dependent on X11, it uses the XRender extension to draw anti-aliased stuff, the XSession extension to make the window a circle, and Xlib to handle input. I also use Imlib2 to draw .png Unfortunately, I have no experience with Cairo or with Wayland (in fact, I have never used Wayland, as there is no support for OpenBSD).
I'll not change the masterFeel free to fork πmenu to convert it to use libcairo.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/phillbush/pmenu/issues/6#issuecomment-777461956
You will notice that πmenu does more stuff than its brother, xmenu. For example, it watches for mouse button presses to display the pie menu (something that xmenu does not do, it needs xclickroot to do this). I don't know if this can be done in Wayland, as probably only the compositor has the rights to grab mouse clicks.
I also don't know if all compositors support shaped/circular windows. Maybe make a window rectangular/square but with the corners transparent?
In any case, I'll help in the development of the fork, so count me in!
it watches for mouse button presses to display the pie menu (something that xmenu does not do, it needs xclickroot to do this)
Looks like your πmenu readme is wrong then, it says it needs something like xclickroot to start up.
It would be pretty trivial for compositors to implement xclickroot functionality themselves (which is what i plan on doing for mine) but failing that I think the "right" approach would be having a layer-shell surface in the 'background' layer (used for things like wallpaper clients I believe) that is transparent and exists only to recieve input, creating the menu upon a click.
Maybe make a window rectangular/square but with the corners transparent?
I think that would be the way to go for rendering, but I don't think it would be as simple for catching input... gonna have to think about that and see what other non-rectangular clients do (though I can't think of any).
In any case, I'll help in the development of the fork, so count me in!
Sweet! I'll probably fork and start it up this weekend.
Looks like your πmenu readme is wrong then, it says it needs something like xclickroot to start up.
Fixed.
More information in the manual.
I added the root-click feature to πmenu so I can have a single instance of πmenu in the background watching for right-clicks on the root window. Using xclickroot would fork and exec new instance at each right click, which is slower than having a single instance in the background just waiting to pop itself up.
πmenu depends heavily on Xlib and X extensions.
Closing this issue as wontfix.