Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Issue 7050030: Fixing the issue of GDK discarding unsupported XInput events. (Closed)

Created:
9 years, 7 months ago by Yufeng Shen (Slow to review)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Fixing the issue of GDK discarding unsupported XInput events. Current implementation of message_pump_glib_x uses both X event queue and GDK's g_main_context_iteration to read event messages. If the first X event in the X event queue can be dispatched directly, it will be extracted and dispatched. If the first X event in the X event queue can't be dispatched directly, g_main_context_iteration will be called to translate X events into GDK evnets. If the first X event can't be dispatched directly and is followed by X events that can be dispatched directly in the event queue, those events that can be dispatched directly will also go through GDK and may get lost if GDK does not recognize them (e.g. XInput2 events). To fix this, a GDK event filter is setup to intercept all the X events before they are translated into GDK events. In the filter if the X events are found to be wanted, they will get dispatched directly instead of translated into GDK events. BUG= TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86610

Patch Set 1 #

Total comments: 10

Patch Set 2 : Addressing some comments #

Total comments: 8

Patch Set 3 : addressing some comments #

Patch Set 4 : addressing some comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -40 lines) Patch
M base/message_pump_glib_x.h View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M base/message_pump_glib_x.cc View 1 2 5 chunks +62 lines, -40 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Yufeng Shen (Slow to review)
9 years, 7 months ago (2011-05-20 00:27:06 UTC) #1
sadrul
Aha, so using the GDK filter function does fix the menu-cancellation bug?
9 years, 7 months ago (2011-05-20 00:32:36 UTC) #2
sadrul
Some nits. Please add evan@ when you address them. http://codereview.chromium.org/7050030/diff/1/base/message_pump_glib_x.cc File base/message_pump_glib_x.cc (right): http://codereview.chromium.org/7050030/diff/1/base/message_pump_glib_x.cc#newcode36 base/message_pump_glib_x.cc:36: ...
9 years, 7 months ago (2011-05-24 15:34:18 UTC) #3
Yufeng Shen (Slow to review)
http://codereview.chromium.org/7050030/diff/1/base/message_pump_glib_x.cc File base/message_pump_glib_x.cc (right): http://codereview.chromium.org/7050030/diff/1/base/message_pump_glib_x.cc#newcode36 base/message_pump_glib_x.cc:36: gdk_window_add_filter(NULL, GdkEventFilter, this); On 2011/05/24 15:34:18, sadrul wrote: > ...
9 years, 7 months ago (2011-05-24 18:30:50 UTC) #4
sadrul
http://codereview.chromium.org/7050030/diff/6001/base/message_pump_glib_x.cc File base/message_pump_glib_x.cc (right): http://codereview.chromium.org/7050030/diff/6001/base/message_pump_glib_x.cc#newcode143 base/message_pump_glib_x.cc:143: pump->Quit(); ProcessXEvent already calls Quit when appropriate. So this ...
9 years, 7 months ago (2011-05-24 18:59:32 UTC) #5
Evan Martin
Am I here for OWNERS approval? LGTM in that case; otherwise, let me know and ...
9 years, 7 months ago (2011-05-24 19:12:00 UTC) #6
Yufeng Shen (Slow to review)
http://codereview.chromium.org/7050030/diff/6001/base/message_pump_glib_x.cc File base/message_pump_glib_x.cc (right): http://codereview.chromium.org/7050030/diff/6001/base/message_pump_glib_x.cc#newcode143 base/message_pump_glib_x.cc:143: pump->Quit(); On 2011/05/24 18:59:33, sadrul wrote: > ProcessXEvent already ...
9 years, 7 months ago (2011-05-24 19:19:26 UTC) #7
sadrul
LGTM from me. @Evan: If you can take a look too, that'd be great. Thanks!
9 years, 7 months ago (2011-05-24 19:58:16 UTC) #8
Evan Martin
LGTM++
9 years, 7 months ago (2011-05-24 20:38:32 UTC) #9
rjkroege
in the interests of completeness: LGTM
9 years, 7 months ago (2011-05-24 21:06:41 UTC) #10
commit-bot: I haz the power
Try job failure for 7050030-7004 on linux: http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux&number=28373
9 years, 7 months ago (2011-05-24 21:40:57 UTC) #11
commit-bot: I haz the power
9 years, 7 months ago (2011-05-24 23:57:36 UTC) #12

Powered by Google App Engine
This is Rietveld 408576698