phillbush / xmenu

a x11 menu utility
Other
296 stars 26 forks source link

dwm-flexipatch and opensuse #49

Open Lucas-mother3 opened 11 months ago

Lucas-mother3 commented 11 months ago

Hi! I was having this issue with xmenu, specifically the fact that it doesn't launch 100% of the time.

It's been isolated to my setup, which is openSUSE Tumbleweed. Launching it by right-clicking the =[] (layouts) tag wouldn't work and determined that something in the program caused it.

I don't have much logs of it due to it relying on a script.

Launching via the terminal works however.

veltza commented 9 months ago

I can confirm this behavior. It just fails with no error messages.

I debugged the code and found that the XGrabPointer() function failed to grab the pointer and caused the silent exit. I also tested the old code that tries to grab the pointer in a loop and it fixed the issue. So maybe we should revert back to that code?

Lucas-mother3 commented 9 months ago

Maybe...

veltza commented 9 months ago

Just to clarify, this fails silently.

rharmonson commented 7 months ago

I am experiencing the same issue on debian based distro, antiX, using a patched dwm, dusk, with the current xmenu version; 8c4013a.

bakkeby commented 7 months ago

Can confirm this issue in an unpatched dwm as well.

veltza is right about the old code that waits for another process to ungrab. I did a bit of digging in the latest code and found that the XGrabPointer call results in AlreadyGrabbed.

There isn't anything in dwm that explicitly calls XGrabPointer in relation to button click handling, but maybe something else is behind the scenes.

That the user is holding down the mouse button plays a part - if you do a super quick tap on the right mouse button (if that is what is bound up) then xmenu shows (presumably because the button has been released before xmenu has reached the point where it tries to grab the pointer).

It is possible to work around this by adding a call to XUngrabPointer(dpy, CurrentTime); at the start of the spawn function in dwm.

morgant commented 7 months ago

I'll have to do some investigating on my end , but I'm also experiencing intermittent launch when activated via a left mouse click in a wmlaunchbutton window, swallowed into the mlvwm menu bar. This is running on OpenBSD amd64/7.4-stable, so the xmenu 6.4.1 package. More specifically, using my WIP menu-bar-icon branch of my xsndiomenu project.

rharmonson commented 5 months ago

In the absence of a fix, can someone share the release version/commit that resulted in the aberrant behavior? My intent is to grab the release or commit just prior to package for distribution.

Thank you!

Lucas-mother3 commented 2 months ago

In the absence of a fix, can someone share the release version/commit that resulted in the aberrant behavior? My intent is to grab the release or commit just prior to package for distribution.

Thank you!

While I didn't find a version of xmenu that doesn't exhibit this behavior, I did use an alternative, in my case jgmenu, which worked in my case, although some modification to the scripts are needed.

rharmonson commented 2 months ago

Since xmenu is unusable with my tiling window managers, I will take a look at jgmenu.

Thank you!

rharmonson commented 1 month ago

@Lucas-mother3, finally took the time out to experiment with jgmenu. Love it! Thank you for recommending it.