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 670096 - Use XTest to send out custom bindings
Use XTest to send out custom bindings
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: wacom
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2012-02-14 20:11 UTC by Bastien Nocera
Modified: 2012-02-16 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wacom: Add XSendEvent() usage for custom actions (1.79 KB, patch)
2012-02-14 20:11 UTC, Bastien Nocera
rejected Details | Review

Description Bastien Nocera 2012-02-14 20:11:52 UTC
Not working yet...
Comment 1 Bastien Nocera 2012-02-14 20:11:54 UTC
Created attachment 207584 [details] [review]
wacom: Add XSendEvent() usage for custom actions
Comment 2 Bastien Nocera 2012-02-14 23:42:55 UTC
When using InputFocus as the destination window, we get in xev:

KeyPress event, serial 32, synthetic YES, window 0x161,
    root 0x161, subw 0x10584f8, time 52402051, (60,188), root:(60,188),
    state 0x0, keycode 24 (keysym 0x71, q), same_screen YES,
    XLookupString gives 1 bytes: (71) "q"
    XmbLookupString gives 1 bytes: (71) "q"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic YES, window 0x161,
    root 0x161, subw 0x10584f8, time 52402150, (60,188), root:(60,188),
    state 0x0, keycode 24 (keysym 0x71, q), same_screen YES,
    XLookupString gives 1 bytes: (71) "q"
    XFilterEvent returns: False

Which means that the target window would have been the root window.
Comment 3 Bastien Nocera 2012-02-16 11:55:46 UTC
Comment on attachment 207584 [details] [review]
wacom: Add XSendEvent() usage for custom actions

XSendEvent() is only usable if you know for certain the target window, which we cannot, as the window that wants to receive the event might be the parent of the window with input focus. And you wouldn't know that.
Comment 4 Bastien Nocera 2012-02-16 11:56:12 UTC
commit fa5958fd261ef2c97d5722fa70cfcd33eb7be0c0
Author: Bastien Nocera <hadess@hadess.net>
Date:   Tue Feb 14 20:11:06 2012 +0000

    wacom: Use XTest to send out custom bindings
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670096