phillbush/xclickroot

Does not work

creio opened this issue · 7 comments

creio commented

Hi, I am trying to run this useful utility, but I see no result.

  • Arch Linux
  • i3
  • nvidia
  • aur pkg xclickroot-git

xclickroot -r urxvt.

Try to run xclickroot in a terminal to see if it returns any error.

It will return the following error if the right mouse button is already grabbed:

X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  28 (X_GrabButton)
  Serial number of failed request:  7
  Current serial number in output stream:  7
creio commented

https://i.imgur.com/ybW5Ve6.png

if not specified in .xinitrc then it does not output anything. he displays an error on the key still does not work.

Only one application can grab a mouse button at a time.
xclickroot is trying to grab the right mouse button while another application has already grabbed it.

Try to run xclickroot earlier, moving it to the beginning of your .xinitrc file.
This is a hacky solution with a race condition that may work in most cases.

A better solution is to find which application is grabbing the mouse button.
See this question on StackExchange to see how to find it.

creio commented

Thanks, I found out by the method of elimination what the conflict was causing numlockx. After I removed it from autostart everything worked.

It seems that having numlock enabled prevents xclickroot from working properly. This seems like a bug on xclickroot end? I know nothing of the intricacies of X, but I would think that numlock should have nothing to do with the mouse?

Indeed, it was a bug on xclickroot end.
xclickroot was grabbing the keys with no modifier. That means that any lock-like modifier (CapsLock, NumLock, ScrollLock) active or shift-like modifier (Shift, Control, Alt) pressed wouldn't send the button press event to xclickroot.
It is fixed now.

Wonderful, thank you!