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

Issue 1324913002: Fix out of order key events in Chrome on Linux. (Closed)

Created:
5 years, 3 months ago by dtapuska
Modified:
4 years, 4 months ago
CC:
chromium-reviews, jdduke+watch_chromium.org, tdresser+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix out of order key events in Chrome on Linux. The ibus-gtk layer was using XPutBackEvent which pushes an event to the top of the X event queue. The problem with this is that if the gtk event loop processes more than one event before the X event loop executes the message pump will see the events in reverse order. Fix this by processing the mapped X11 event immediately. Since the gtk event loop and the X11 event loop are on the same thread this makes sense as the events stay in the proper order. BUG=524084 Committed: https://crrev.com/a8bae713f4d0a4598443f1279d2fd595cbae8d18 Cr-Commit-Position: refs/heads/master@{#412607}

Patch Set 1 #

Patch Set 2 : Fix component build #

Total comments: 1

Patch Set 3 : Rebase #

Total comments: 2

Patch Set 4 : Fix nits #

Total comments: 2

Patch Set 5 : Fix spelling error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -1 line) Patch
M chrome/browser/ui/libgtk2ui/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/ui/libgtk2ui/libgtk2ui.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/events/platform/x11/x11_event_source.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M ui/events/platform/x11/x11_event_source.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 30 (10 generated)
dtapuska
This is a second attempt at the re-ordering issue. The first attempt (via XSendEvent) caused ...
5 years, 3 months ago (2015-09-01 16:36:28 UTC) #2
Elliot Glaysher
(fyi, I'm waiting for comments from the others and will owners stamp afterwards.)
5 years, 3 months ago (2015-09-02 17:16:34 UTC) #3
sadrul
https://codereview.chromium.org/1324913002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc File chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc (right): https://codereview.chromium.org/1324913002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc#newcode79 chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc:79: XPutBackEvent(x_event.xkey.display, &x_event); Can we send this key-event directly to ...
5 years, 3 months ago (2015-09-02 17:18:52 UTC) #4
dtapuska
On 2015/09/02 17:18:52, sadrul wrote: > https://codereview.chromium.org/1324913002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc > File chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc (right): > > https://codereview.chromium.org/1324913002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc#newcode79 > ...
5 years, 3 months ago (2015-09-14 19:12:21 UTC) #5
Shu Chen
On 2015/09/14 19:12:21, dtapuska wrote: > On 2015/09/02 17:18:52, sadrul wrote: > > > https://codereview.chromium.org/1324913002/diff/20001/chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc ...
5 years, 3 months ago (2015-09-15 05:17:49 UTC) #6
dtapuska
On 2015/09/15 05:17:49, Shu Chen wrote: > On 2015/09/14 19:12:21, dtapuska wrote: > > On ...
5 years, 3 months ago (2015-09-15 14:01:01 UTC) #7
sadrul
On 2015/09/15 05:17:49, Shu Chen wrote: > On 2015/09/14 19:12:21, dtapuska wrote: > > On ...
5 years, 3 months ago (2015-09-15 16:52:00 UTC) #8
Shu Chen
On 2015/09/15 14:01:01, dtapuska wrote: > On 2015/09/15 05:17:49, Shu Chen wrote: > > On ...
5 years, 3 months ago (2015-09-15 16:53:09 UTC) #9
Shu Chen
On 2015/09/15 16:52:00, sadrul wrote: > On 2015/09/15 05:17:49, Shu Chen wrote: > > On ...
5 years, 3 months ago (2015-09-15 17:50:44 UTC) #10
dtapuska
On 2015/09/15 17:50:44, Shu Chen (OOO Jul 31 - Aug 8) wrote: > On 2015/09/15 ...
4 years, 4 months ago (2016-08-15 15:16:01 UTC) #14
Yuki
LGTM. My thought is that ibus-gtk eventually moves a key event from X event loop ...
4 years, 4 months ago (2016-08-16 09:26:11 UTC) #17
Yuki
I'm sorry that I had missed this review 11 months ago.
4 years, 4 months ago (2016-08-16 09:29:10 UTC) #18
dtapuska
shuchen@ are you good with this given yuki's comments? https://codereview.chromium.org/1324913002/diff/40001/ui/events/platform/x11/x11_event_source.h File ui/events/platform/x11/x11_event_source.h (right): https://codereview.chromium.org/1324913002/diff/40001/ui/events/platform/x11/x11_event_source.h#newcode70 ui/events/platform/x11/x11_event_source.h:70: ...
4 years, 4 months ago (2016-08-16 14:48:29 UTC) #19
Shu Chen
lgtm from IME perspective.
4 years, 4 months ago (2016-08-17 01:00:11 UTC) #20
sadrul
ui/events lgtm https://codereview.chromium.org/1324913002/diff/60001/ui/events/platform/x11/x11_event_source.h File ui/events/platform/x11/x11_event_source.h (right): https://codereview.chromium.org/1324913002/diff/60001/ui/events/platform/x11/x11_event_source.h#newcode54 ui/events/platform/x11/x11_event_source.h:54: // Dispatches a given event immediately. This ...
4 years, 4 months ago (2016-08-17 01:03:10 UTC) #21
dtapuska
erg@ can you stamp this now that the others have signed off on it? https://codereview.chromium.org/1324913002/diff/60001/ui/events/platform/x11/x11_event_source.h ...
4 years, 4 months ago (2016-08-17 18:06:35 UTC) #22
Elliot Glaysher
lgtm
4 years, 4 months ago (2016-08-17 18:18:45 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1324913002/80001
4 years, 4 months ago (2016-08-17 18:22:36 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-17 19:17:38 UTC) #28
commit-bot: I haz the power
4 years, 4 months ago (2016-08-17 19:19:16 UTC) #30
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/a8bae713f4d0a4598443f1279d2fd595cbae8d18
Cr-Commit-Position: refs/heads/master@{#412607}

Powered by Google App Engine
This is Rietveld 408576698