After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 345308 - Keypad does not work properly
Keypad does not work properly
Status: RESOLVED FIXED
Product: ekiga
Classification: Applications
Component: general
2.0.x
Other All
: Normal normal
: ---
Assigned To: Ekiga maintainers
Ekiga maintainers
: 353037 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-06-19 12:22 UTC by philippe.gassmann
Modified: 2006-08-27 06:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch against ekiga 2.0.2 src/gui/main.cpp (431 bytes, patch)
2006-06-22 08:39 UTC, Jean-Baptiste Quenot
none Details | Review

Description philippe.gassmann 2006-06-19 12:22:55 UTC
Please describe the problem:
When I press slowly 0418 with the keypad, ekiga understands 0418.
When I press faster 0418 with the keypad, ekiga understands 4081 (or 4018 or 0481)...

In fact, when typing to much fast, you type the second key before releasing the first...


Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?
yes

Other information:
Comment 1 Snark 2006-06-19 15:52:03 UTC
I remember such a bug... I can't find it in the list, though. I think the conclusion was that it was a GTK+ bug.
Comment 2 Damien Sandras 2006-06-19 15:55:00 UTC
Indeed, GTK+ callbacks are asynchronous. There is no way to change that.
Comment 3 philippe.gassmann 2006-06-19 16:28:24 UTC
So why using these callbacks, why is this working fine in every other GTK+ applications ?
Comment 4 philippe.gassmann 2006-06-19 16:34:12 UTC
(In reply to comment #1)
> I remember such a bug... I can't find it in the list, though. I think the
> conclusion was that it was a GTK+ bug.
> 

No it is not a GTK+ bug : the fact is that you are emulating a mouse click on the keypad buttons when the user press a key from the keypad...  
Comment 5 Damien Sandras 2006-06-19 17:37:56 UTC
The result is the same.

Do you have an idea to fix this if you think it is not a bug?
Comment 6 philippe.gassmann 2006-06-21 08:10:16 UTC
You have to write the number pressed as soon as the key is pressed and not when it's released. This is exactly what are doing keyboard events handlers... or you can use some more high level stuff like "KeyPressed" event (I do not know how this is working in GTK but it should exist).
Comment 7 Damien Sandras 2006-06-21 08:42:18 UTC
The callback is connected to the "clicked" event, so not when it is released.

As I do not see a solution to this problem, but you seem to have an idea, it would be nice if you could spend some time on a patch that fixes the problem. That would be a great help for us (I'm currently a bit over busy).

Thanks,
Comment 8 philippe.gassmann 2006-06-21 11:33:12 UTC
sure, i'll do that when i'll have some spare time !
Comment 9 philippe.gassmann 2006-06-21 12:43:53 UTC
This seems to be working (it's less visual when you type in the keypad but it's work) : 

--- src/gui/main.cpp    2006-05-06 21:49:43.000000000 +0200
+++ /tmp/src/gui/main.cpp       2006-06-21 14:25:48.000000000 +0200
@@ -1285,7 +1285,7 @@
     gtk_container_set_border_width (GTK_CONTAINER (button), 0);
     gtk_container_add (GTK_CONTAINER (button), box);

-    gtk_widget_add_accelerator (button, "activate",
+    gtk_widget_add_accelerator (button, "clicked",
                                mw->accel, key_kp [i],
                                (GdkModifierType) 0, (GtkAccelFlags) 0);
Comment 10 Jean-Baptiste Quenot 2006-06-22 08:38:27 UTC
Tested the patch successfully, thank you Philippe!  However the patch is mangled, please find an updated one attached.
Comment 11 Jean-Baptiste Quenot 2006-06-22 08:39:12 UTC
Created attachment 67833 [details] [review]
Patch against ekiga 2.0.2 src/gui/main.cpp
Comment 12 Snark 2006-06-22 13:51:18 UTC
Applied to cvs. Thanks!
Comment 13 Snark 2006-08-27 06:27:32 UTC
*** Bug 353037 has been marked as a duplicate of this bug. ***