| Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
| diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
| index c6fc3d741df0f5d11ad26d27bbfb428768bbcb81..adae5b4538c7a2e6bdf9989d6e17cbcfcbd67101 100644
|
| --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
| +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
| @@ -1752,8 +1752,21 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
| previous_bounds_in_pixels_ = bounds_in_pixels_;
|
| bounds_in_pixels_ = bounds_in_pixels;
|
|
|
| - if (origin_changed)
|
| + if (origin_changed) {
|
| OnHostMoved(bounds_in_pixels_.origin());
|
| + // Allows to trigger visibilityChange events while swithcing between
|
| + // workspaces.
|
| + ::Screen* screen = DefaultScreenOfDisplay(xdisplay_);
|
| + int screen_width = WidthOfScreen(screen);
|
| + int screen_height = HeightOfScreen(screen);
|
| +
|
| + if (translated_x_in_pixels < 0 || translated_x_in_pixels > screen_width
|
| + || translated_y_in_pixels < 0 ||
|
| + translated_y_in_pixels > screen_height)
|
| + content_window_->SetPageVisibility(false);
|
| + else
|
| + content_window_->SetPageVisibility(true);
|
| + }
|
|
|
| if (size_changed) {
|
| delayed_resize_task_.Reset(base::Bind(
|
|
|