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

Left click immediately after right clicking #207

Open
raidermax opened this Issue Jun 22, 2014 · 5 comments

Comments

Projects
None yet
2 participants
@raidermax

raidermax commented Jun 22, 2014

I am on Manjaro, XFCE edition, with compton version "0.1_beta2-2" (this is in the "extras" repo on Manjaro). Whenever I right click on the xfce desktop, or in thunar, the drop menu appears but immediately after, the first selection on the drop down menu gets selected. Basically, whenever releasing the right mouse button (on the areas listed above) counts as a left click afterwards. I know this is something to do with compton because when I killed compton and enabled XFCE's window manager the issue was no longer occurring.
EDIT: This happens when I set compton to use the GLX backend instead of xrender.

Extra-
I love you work, I do not know who the developers are exactly or if this is a one man project, but thank you. Compton has allowed me to use linux for everday use as well as for gaming as compton has been the only window manager I have tried that has been able to get rid of screen tearing (amd user here). I hope this project continues to get better and better.

Compton config- http://pastebin.com/Y48zbupU

@richardgv

This comment has been minimized.

Collaborator

richardgv commented Jul 12, 2014

Hi, raidermax,

I'm sorry for not replying to your report for such a long period of time...

It's a very weird (and weirdly common) issue that releasing the right mouse button somewhat causes "left click" effect. I found numerous reports with all sort of bizarre workarounds on the web: change GTK+ theme, switch mouse to left-handed and back to right-handed, disable then enable "Use nautilus to draw desktop", turn off animation plugin in compositor, use sxhkd to fake mouse movement, "this is a design decision", etc.

  1. I don't know how a bug in compton might be trigger such an issue. compton, as far as know, doesn't manipulate anything other than what is displayed on your screen (except modifying _NET_WM_WINDOW_OPACITY in the case of --opacity-rule). It doesn't process or send input, or actively send messages to other programs. I'm currently aware of 4 ways that compton's presence could be detected (so that other application may change behavior when a compositor is running): Try window redirection, search for process, search for registration window xcompmgr, and search for X selection _NET_WM_CM_S?. The last one is the most common method. If you wish to verify whether it's related to how other applications detects the presence of a compositor through _NET_WM_CM_S, please comment out the XSetSelectionOwner() line in register_cm() of src/compton.c, recompile compton, and check if the issue still occurs. Keep in mind that this may break other applications.

    If the issue is only happening on Xfce applications, however, it may have its own ways to detect if its own compositor running and adjust behavior based on it.

    It isn't logical for me if the issue only occurs on GLX backend, though...

  2. Does the problem actually occur when you have no compositor running?

  3. Does the problem occur on all places where you could right-click? (Especially those places where you can't open a menu through right click, and those applications using a different GUI kit than what your most applications use (for example, try a Qt application if most of your applications are GTK+-based.))

  4. To verify if X is receiving incorrect events, please install xev, run xev | grep -A 3 Button, right click in the xev window, and check the output. Normally you would get something like this:

    ButtonPress event, serial 38, synthetic NO, window 0x1000001,
        root 0x292, subw 0x0, time 17539921, (64,103), root:(96,202),
        state 0x10, button 3, same_screen YES
    
    ButtonRelease event, serial 38, synthetic NO, window 0x1000001,
        root 0x292, subw 0x0, time 17540017, (64,103), root:(96,202),
        state 0x410, button 3, same_screen YES
    ...
    

    (Note the "button 3" thing. Left click is button 1 while right click is button 3.)

  5. Try press the right mouse button, move the cursor out of menu area, then release the mouse button. Is the first menu option still automatically clicked? What if you move the cursor over another menu item, then move directly out (so that the first menu item is not the one that is last selected), and release the mouse button?

  6. Please check if the issue occurs with compton --config /dev/null and compton --config /dev/null --backend glx, just in case.

  7. You could also try all the solutions/workarounds Google presents.

  8. I can't reproduce the issue with xfwm4-4.11.1, thunar-1.6.3, xfdesktop-4.11.6, and compton git-v0.1_beta2-33-g3a3e138-2014-06-15, on GLX backend, with configuration compton.sample.conf, or without compositor.

I love you work, I do not know who the developers are exactly or if this is a one man project, but thank you. Compton has allowed me to use linux for everday use as well as for gaming as compton has been the only window manager I have tried that has been able to get rid of screen tearing (amd user here). I hope this project continues to get better and better.

Thanks! I'm glad compton is helpful for you! :-)

We have two developers, chjj and me. But I'm not very active recently and chjj hasn't been very active since almost 2 years ago, heh. Maintaining compton is so time-consuming. Investigating an issue and posting a reply could take me hours of time (this one took like 2 hours), so I can't really guarantee this project would even be maintained in the future.

richardgv added a commit that referenced this issue Jul 13, 2014

Misc: Add --version & --no-x-selection
- Add --version. (#206)

- Add --no-x-selection for debugging. (#207)
@richardgv

This comment has been minimized.

Collaborator

richardgv commented Jul 13, 2014

By the way, I've added --no-x-selection in richardgv-dev branch (4e8ccea). Now you don't need to modify the source code to disable XSetSelectionOwner().

@raidermax

This comment has been minimized.

raidermax commented Jul 15, 2014

Hey, thanks for replying its fine if you took so and so many days I dont mind. I am going to answer this post like I did my previous. FYI, I forgot to mention I am using the latest stable AMD closed source drivers.

  1. I have no idea what you are trying to tell me in the beginning of #1, I am sorry I am just unable to understand. Although I do understand where you ask if this only occurs in XFCE applications which I think it does or rather it occurs in all applications that use GTK such as Thunar, Remmina, XFCE settings, the XFCE desktop, (not an app but you know what I mean), right clicking on the xfce panel. However, this does not occur for apps that use QT such as Spotify and Skype. Oddly enough, as I said right clicking on the xfce panel causes the immediate left click issue, right clicking on other applets such as the sound, internet, or remmina tray does not trigger the immediate left click after right clicking.
  2. Problem does not occur if I have a compositor running, as extra information, if I tell compton to use xrender instead of glx this problem does not occur at all.
  3. I answered this in #1 by accident I guess and the answer would be no. I think it only happens on apps that use GTK.
  4. Wow that is a cool little tool that I did not know existed. Anyway (got a bit excited), I did get something to similar to you, here is output incase you want it.

xev | grep -A 3 Button
ButtonPress event, serial 37, synthetic NO, window 0x4200001,
root 0xbe, subw 0x4200002, time 20363863, (46,26), root:(757,384),
state 0x10, button 3, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x4200001,
root 0xbe, subw 0x4200002, time 20363963, (46,26), root:(757,384),
state 0x410, button 3, same_screen YES

  1. Alright so I am doing this one in order. If I press the right mouse button and hold it to move the cursor out the way of the menu and then let go, then no the first option does not get selected but the menu disappears...which is probably because it is still doing a left click on the desktop after releasing the right click. The next one you ask to me to do, I tried it on xfce desktop (as I did the first one) and if I right click on the desktop and hold the right button until I reach say the "Properties" item on the menu and let go then it will still select "Properties" it seems to left click right after where ever my mouse is.
  2. With "compton --config /dev/null" the left click right after right clicking does not occur at all. With "compton --config /dev/null --backend glx" it does the left click after right clicking thing again. As I said on my previous bug/issue report I am going to install the FOSS ati drivers and report back what happens.
@raidermax

This comment has been minimized.

raidermax commented Jul 15, 2014

So I installed the FOSS ati drivers on kernel 3.13 and the left click after right clicking glitch no longer occurs. Its really sad that the people who work at AMD cant even get this simple thing right yet a third party team (are they a 3rd party?) can.

@richardgv

This comment has been minimized.

Collaborator

richardgv commented Jul 20, 2014

So I installed the FOSS ati drivers on kernel 3.13 and the left click after right clicking glitch no longer occurs. Its really sad that the people who work at AMD cant even get this simple thing right yet a third party team (are they a 3rd party?) can.

Which is truly weird... The driver shouldn't affect any input, either. Anyway, I'm glad that you've found a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment