diodon fails to remember calling window
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Diodon |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Xubuntu 22.04.1
diodon 1.12.0-1 from the standard Ubuntu repository
I installed diodon to replace xfce4-clipman which has been seriously broken since thew upgrade to Xubuntu 22.04.1.
There are two issues:
1) A minor point, but there is a noticeable delay between making a menu selection and having it paste. This may or may not have something to do with the next more serious issue.
2) I have focus-follows-mouse enabled. When I pop-up the diodon menu using a keyboard shortcut, if the menu is completely within the target window frame, there is no problem. However, if the pop-up menu extends outside the window frame and overlaps another one, then if a menu selection is made that falls outside the target window, the other window becomes active and diodon pastes the selection into the wrong location.
To simulate this, open multiple adjacent terminals. In one terminal open the diodon pop-up so that it extends over an adjacent terminal. Select an entry where the cursor is above the adjacent terminal. While doing this, the target terminal remains active. However, when the diodon menu is dismissed the adjacent terminal immediately receives focus and the selection is pasted there rather than to the desired terminal.
Diodon needs to register which window is active when it is initiated and make sure that that window has focus when the paste occurs.
This problem did not occur with xfce4-clipman back under Xubuntu 20.04.
Thanks for your report.
I have also checked the xfce4-clipman code how they simulate paste and they do it the same as in Diodon using the XTest library. There is a delay there before instant pasting (your first point) as pasting does not work under some circumstances when the paste executes too fast.
I briefly want to explain how the instant paste works and that might make the situation a bit clearer. So Diodon uses XTest so simulate pressing of Ctrl+V. It is like if just after you selected an item in the history you would straight away press Ctrl+V on your keyboard. It is not possible to simulate key presses to a certain window so it will simply be pasted to the window which has the focus.
Why it might have worked in xfce4-clipman is that they use a different delay. Thing is, though, if the delay in diodon is adjusted it might not work in other setups which have worked previously.
Also, Xorg is less and less relevant and in Wayland “Instant Paste” simply does not work anymore, as there is no such functionality to simulate key presses in a window not belonging to Diodon for security restrictions.
This said, I see three ways forward:
1. You disable automatically paste selected item in the Diodon preferences follows- mouse” option in XFCE /github. com/diodon- dev/diodon/ blob/589c190b5e 616677585493a31 c5fe115c0a17430 /libdiodon/ controller. vala#L296 How to build Diodon you can find in the README.md. If you find a delay which works in your setup, let me know.
2. You disable “focus-
3. You try to play around the delay in https:/