-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
[Bug]: Mouse clicks aren't consumed when llua_mouse_hook returns true. (X11) #1495
Comments
I upgraded my computer, which lead to re-installation of stuff. now I'm running in OpenBox (ran in KDE^(why the f did I forget to say that) before) .
does consume clicks. so seems to work as expected under OpenBox. conky-cairo from AUR |
Thanks for pointing out lack of documentation, I added it to the wiki so people can find out about it.
The way I implemented it, if the hook returns true it should stop the propagation. Given that it works on some WMs, I'd guess that it has to do with how KDE handles events. Maybe if an event isn't captured by any floating windows KDE notifies the desktop code, it's impossible to tell without the config though. Please provide the config so we can know how conky window is mounted.
This is a bug in the merged PR and I'm certain it has to do with how the feature is implemented. Passing events through probably causes X11 to think the desktop is now under the cursor. This has to be handled by conky by making it remember it passed the event through and preventing the callback trigger for enter/leave events to avoid quirks. |
I have my screen-data in a separate .lua file. .conkyrc
addThis.lua, actually a Frankenstein's monster I copy pasted from main.lua which my actual addThis.lua executes... and other lua files I've cut up my project I tested this in into...
I trimmed the stuff down, haven't been messing with conky for a while, life got in the way. I use a console.lua I've written to aproximate javascript's console (console.log() console.warn() console.error() console.group() console.groupEnd()) I think I replaced those with print(""). but the .lua shouldn't matter anyway, nor should you need the values of the screen:functions |
Alright, thanks. I'll check this out soon. I have midterms coming up so it might take some time as I'll have to install KDE and tinker with the sources. This is my general overview for these issues rn, writing it down so I don't forget:
|
Just letting you know that these issues have mostly been fixed in #1672. The issue where an incorrect Mouse movement is now propagated to the background as well, so hovering over KDE widgets through conky, for instance, produces popup bubbles as expected. |
This might be naive, but couldn't you stop Mouse_Enter by tracking Enter/Leave (boolean isInside), and doing only problem I can see happening is somehow not firing off Mouse_Leave to turn isInside to false. |
With that, mouse_enter doesn't get reported when there's an app overlapping conky (because X11 doesn't tell conky mouse left; that's a new edge case). The only solution to this seems to be constantly tracking the mouse position and overlapping windows. I'll sleep on it and see whether there's something else that can be done. EDIT: Okay, we can also listen for XCrossing events on other windows, which isn't much better, but at least it's more CPU friendly than what I had in mind. |
The only solution that woked was listening globally for all cursor movement events, then testing whether cusrsor is over conky and tracking it like you've said. Now it's 100% correct behavior. Though it required an additional X11 extension. |
This was fixed by commits that introduced Xinput. |
What happened?
I noticed the (awesome) implementation of Mouse Events recently added to Conky.
but I think due to this being so new documentation does not exist... so i printed all the args passed to lua and explored stuff...
now I also love the fact that I can click-through the Conky window. but I'll want to consume^(aka, skip pass-through) the clicks from time to time.
I was expecting the event to be consumed by
return true;
in the hook-function. (I also triedreturn false;
)On a sidenote, each click-through also triggers Leave-Enter events (at least on KDE) as the desktop is selected so as to trigger the click on it.
Version
conky-cairo 1.19.0-1 (AUR)
Which OS/distro are you seeing the problem on?
Arch Linux
Conky config
No response
Stack trace
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: