-
Notifications
You must be signed in to change notification settings - Fork 43
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
Dirty hack to make keepassxc work. #68
base: master
Are you sure you want to change the base?
Conversation
I only ever get one wid. Do you actually see two windows? Ideally there would be some way to distinguish between them and ignore one. Could you give me the output of |
OH, I figured out what the window is - it's the system tray icon. Disabling the system tray icon in my preferences makes tdrop work. Maybe we can add a check for "redirect override" windows:
So the one that makes the dropdown work (77594639):
and the one which doesn't work (the systray window):
|
That may be good enough, but I don't think it's perfect (hypothetically you could want to disable decorations for a some program you wanted to make a dropdown for). Probably I will do it for now if I can't think of anything better. It seems strange to me that the system tray icon gets the same class name as the actual program. Handling all these special cases in tdrop is incredibly ugly. What I'm thinking of doing at some point is adding support for a config file (with all the current defaults moved into it). You could do something like this: [keepassxc]
validate_wid_cmd = "xwininfo -id $wid | grep --quiet 'Override Redirect State: no'" Parsing a config file every invocation would probably be too slow, so either this could only be used for configuration program creation or I would need to rewrite tdrop in another language. |
So, I did some debugging about #66 and isolated the problem.
It seems that inside
create_win_return_wid
, we spawn the program which seems to create two visible windows in succession, and we grab the first one while it's actually the second window we want to store.Here's the output of my patch which gets the dropdown working, though we definitely need a better approach than this! I wanted to touch base before I try to fix it for real. Maybe you have an idea of what the best approach would be.
p.s. I wasn't sure the best way to share my troubleshooting, so I made this "draft pull request". Obviously I don't actually want this merged as is.