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
First key typed is ignored and other input related issues. #11
Comments
yes. I have these same problems. |
My keyboard has tap-layer on the shift, so when I hit letter it releases the shift event and the key event at the same time in a I guess that should be reported to the author. edit: I described the issue and sent a note to jwz. |
I've exchanged some emails with JWZ. Must say - he is very responsive. He suggested some debugging switches and I've found possible culprit (for me at least) and fixed it with following patch. Final fix might differ. diff --git a/driver/xinput.c b/driver/xinput.c
index c9e8b91..7858e66 100644
--- a/driver/xinput.c
+++ b/driver/xinput.c
@@ -128,7 +128,12 @@ init_xinput (Display *dpy, int *opcode_ret)
static Bool
duplicate_xinput_event_p (int evtype, XIDeviceEvent *in)
{
- static unsigned long dups[50] = { 0, };
+ typedef struct {
+ int evtype;
+ int detail;
+ unsigned long serial;
+ } key_t;
+ static key_t dups[50] = { 0, };
int i;
/* Great news, everybody: XEvent.xany.serial is apparently not unique. Wny?
@@ -151,14 +156,18 @@ duplicate_xinput_event_p (int evtype, XIDeviceEvent *in)
I'm starting to suspect that maybe, just maybe, the XInput2 library is
extremely careless about memory management!
*/
- unsigned long key = (in->serial & 0xFFFF) | (evtype << 16);
+ key_t key;
+ key.evtype = evtype;
+ key.detail = in->detail;
+ key.serial = in->serial;
for (i = 0; i < countof(dups); i++)
- if (dups[i] == key)
+ if (dups[i].serial == in->serial && dups[i].evtype == evtype
+ && dups[i].detail == in->detail)
{
if (debug_p)
- fprintf (stderr, "%s: discard duplicate XInput event %08lx\n",
- blurb(), key);
+ fprintf (stderr, "%s: discard duplicate XInput event %d-%ld-%d\n",
+ blurb(), evtype, in->serial, in->detail);
return True;
}
for (i = 0; i < countof(dups)-1; i++) |
I just ran into this problem after switching from XScreenSaver 5.45 on Ubuntu to 6.06 on Debian. It was never an issue on the old version. Let me know if I can help troubleshoot. |
The first character entered as an unlock password is always ignored. For example, if the first character is "A", actually the shift key activates the unlock dialog, but the "A" key is ignored and must be entered twice.
But if you press "Shift", wait a little and then press "A" it is accepted. IMHO, this have something with the window initialization process, which seems to be very slow.
Sometimes when you type the password the whole window flashes (seems like becomes invisible and then back visible).
In addition, the auto-repeat of the keyboard is not working at all. So, when you type the whole password and realize that the first key is ignored, you should press backspace many times in order to correct it. Other editing tricks like selecting all and then delete by the "Del" key are not working as well.
Because of the above misbehavior, after updating XScreenSaver to v6.0 I was never able to type the password correctly from the first time. The only reason why I am still not downgrading is because of the implemented display of the current keyboard layout, which was not available on the 5.x versions.
The text was updated successfully, but these errors were encountered: