| 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 1316b8b2d0eb80567429451e029ab661e111ce14..3219a52268b8d09a9ea92c974312523eb898fdd5 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
|
| @@ -1751,8 +1751,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 visibilityChange events to be triggered while switching
|
| + // 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)
|
| + OnHostSetWindowVisibility(false);
|
| + else
|
| + OnHostSetWindowVisibility(true);
|
| + }
|
|
|
| if (size_changed) {
|
| delayed_resize_task_.Reset(base::Bind(
|
|
|