Commit 0896c15f authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Replace DCHECKs with WARNINGs for X11 focus/active state

These errors should only occur when the X server is buggy, which we can't do do
much about. Continuing running seems to be harmless (tested in an X11 forwarding
environment), so just remove the DCHECKs.

BUG=1029486,701023
R=sky

Change-Id: I751991f8a2c222679ecb690349beaafff8e2ba49
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947188Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#731805}
parent 6c9388f9
......@@ -470,7 +470,7 @@ void ConvertVideoFrameToRGBPixelsTask(const VideoFrame* video_frame,
int height = video_frame->visible_rect().height();
base::CheckedNumeric<size_t> chunks = height / rows_per_chunk;
DCHECK_EQ(height % rows_per_chunk, 0UL);
DCHECK_LE(height % rows_per_chunk, 1UL);
size_t chunk_start = (chunks * task_index / n_tasks).ValueOrDie();
size_t chunk_end = (chunks * (task_index + 1) / n_tasks).ValueOrDie();
......
......@@ -554,17 +554,7 @@ bool XWindow::IsActive() const {
// a window is topmost iff it has focus, just use the focus state to determine
// if a window is active. Note that Activate() and Deactivate() change the
// stacking order in addition to changing the focus state.
bool is_active =
(has_window_focus_ || has_pointer_focus_) && !ignore_keyboard_input_;
// is_active => window_mapped_in_server_
// !window_mapped_in_server_ => !is_active
DCHECK(!is_active || window_mapped_in_server_);
// |has_window_focus_| and |has_pointer_focus_| are mutually exclusive.
DCHECK(!has_window_focus_ || !has_pointer_focus_);
return is_active;
return (has_window_focus_ || has_pointer_focus_) && !ignore_keyboard_input_;
}
void XWindow::SetSize(const gfx::Size& size_in_pixels) {
XResizeWindow(xdisplay_, xwindow_, size_in_pixels.width(),
......
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