Commit ac80ab72 authored by Darren Shen's avatar Darren Shen Committed by Chromium LUCI CQ

vk: Speculative fix for keyboard crash.

Chrome seems to crash when adding a new monitor with the virtual
keyboard enabled. The stack trace suggests the keyboard window is null.
Check for when the keyboard window is null as a speculative fix.

Bug: 1157150
Change-Id: I6475dde46bed1a9c8f5246ace76790e836a312e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2585262Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836842}
parent de0b805e
...@@ -965,7 +965,9 @@ void KeyboardUIController::ReportLingeringState() { ...@@ -965,7 +965,9 @@ void KeyboardUIController::ReportLingeringState() {
} }
gfx::Rect KeyboardUIController::GetWorkspaceOccludedBoundsInScreen() const { gfx::Rect KeyboardUIController::GetWorkspaceOccludedBoundsInScreen() const {
if (!ui_) // TODO(crbug.com/1157150): Investigate why the keyboard window may become
// null when adding a new monitor.
if (!ui_ || !GetKeyboardWindow())
return gfx::Rect(); return gfx::Rect();
const gfx::Rect visual_bounds_in_window(visual_bounds_in_root_.size()); const gfx::Rect visual_bounds_in_window(visual_bounds_in_root_.size());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment