GNOME Bugzilla – Bug 601337
Only use gdk_input_select_events() if XINPUT_NONE is defined
Last modified: 2009-11-11 16:44:29 UTC
Patch following
Created attachment 147343 [details] [review] Use gdk_input_select_events() if XINPUT_NONE is defined
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.
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.
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.
Created attachment 147411 [details] [review] Use gdk_input_select_events() if XINPUT_NONE is defined.v2
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 on attachment 147411 [details] [review] Use gdk_input_select_events() if XINPUT_NONE is defined.v2 Great, committed to master :) commit ecc3065f760616ecdd5a64bfebc98bf2885d5e10