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 601337 - Only use gdk_input_select_events() if XINPUT_NONE is defined
Only use gdk_input_select_events() if XINPUT_NONE is defined
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Input Methods
2.19.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 598994
 
 
Reported: 2009-11-09 23:30 UTC by Javier Jardón (IRC: jjardon)
Modified: 2009-11-11 16:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use gdk_input_select_events() if XINPUT_NONE is defined (1.30 KB, patch)
2009-11-09 23:31 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Use gdk_input_select_events() if XINPUT_NONE is defined.v2 (1.42 KB, patch)
2009-11-10 20:08 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review

Description Javier Jardón (IRC: jjardon) 2009-11-09 23:30:30 UTC
Patch following
Comment 1 Javier Jardón (IRC: jjardon) 2009-11-09 23:31:57 UTC
Created attachment 147343 [details] [review]
Use gdk_input_select_events() if XINPUT_NONE is defined
Comment 2 Benjamin Otte (Company) 2009-11-10 07:52:13 UTC
The patch has a buglet: You need to keep the GList define at the top of the file, otherwise you'll get a warning about defining variables in the code when you compile with XINPUT_NONE defined. Otherwise it looks fine.

Also cc'ing Carlos, as I know he has a clue about input handling and can confirm that if'ing out the code won't do bad things.
Comment 3 Carlos Garnacho 2009-11-10 13:53:21 UTC
Hmm, IMHO this is a too marginal performance improvement, gdk/x11/gdkinput-none.c actually defines _gdk_input_select_events() as a NOOP, and in the XINPUT_NONE case the devices list would just contain the core device, so that function wouldn't be even called, just the for loop for 1 element would happen.
Comment 4 Benjamin Otte (Company) 2009-11-10 17:50:40 UTC
Bad Javier, he didn't mention that this is a build fix - _gdk_input_select_events() is defined coditionally in gdkinputprivate.h, so compiling with -Wall throws a warning about using a non-existing function.
Comment 5 Javier Jardón (IRC: jjardon) 2009-11-10 20:08:04 UTC
Created attachment 147411 [details] [review]
Use gdk_input_select_events() if XINPUT_NONE is defined.v2
Comment 6 Carlos Garnacho 2009-11-11 09:00:09 UTC
Oh, then it's definitely fine :), being a NOOP, I don't think there will be any problems at all, the patch in comment #5 looks fine.
Comment 7 Javier Jardón (IRC: jjardon) 2009-11-11 16:44:00 UTC
Comment on attachment 147411 [details] [review]
Use gdk_input_select_events() if XINPUT_NONE is defined.v2

Great, committed to master :)

commit ecc3065f760616ecdd5a64bfebc98bf2885d5e10