Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
| 6 | 6 |
| 7 #include <X11/extensions/shape.h> | 7 #include <X11/extensions/shape.h> |
| 8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
| 9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
| 10 #include <X11/Xregion.h> | 10 #include <X11/Xregion.h> |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 561 } | 561 } |
| 562 | 562 |
| 563 aura::WindowTreeHost* DesktopWindowTreeHostX11::AsWindowTreeHost() { | 563 aura::WindowTreeHost* DesktopWindowTreeHostX11::AsWindowTreeHost() { |
| 564 return this; | 564 return this; |
| 565 } | 565 } |
| 566 | 566 |
| 567 void DesktopWindowTreeHostX11::ShowWindowWithState( | 567 void DesktopWindowTreeHostX11::ShowWindowWithState( |
| 568 ui::WindowShowState show_state) { | 568 ui::WindowShowState show_state) { |
| 569 if (compositor()) | 569 if (compositor()) |
| 570 compositor()->SetVisible(true); | 570 compositor()->SetVisible(true); |
| 571 if (!IsVisible()) | 571 if (!IsVisible() || !window_mapped_in_server_) |
|
msw
2017/05/18 18:37:44
I hope Elliot understands this aspect of the CL, I
alshabalin
2017/05/23 06:48:18
The problem was: during minimization some WMs (e.g
| |
| 572 MapWindow(show_state); | 572 MapWindow(show_state); |
| 573 | 573 |
| 574 switch (show_state) { | 574 switch (show_state) { |
| 575 case ui::SHOW_STATE_MAXIMIZED: | 575 case ui::SHOW_STATE_MAXIMIZED: |
| 576 Maximize(); | 576 Maximize(); |
| 577 break; | 577 break; |
| 578 case ui::SHOW_STATE_MINIMIZED: | 578 case ui::SHOW_STATE_MINIMIZED: |
| 579 Minimize(); | 579 Minimize(); |
| 580 break; | 580 break; |
| 581 case ui::SHOW_STATE_FULLSCREEN: | 581 case ui::SHOW_STATE_FULLSCREEN: |
| (...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2356 | 2356 |
| 2357 // static | 2357 // static |
| 2358 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 2358 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 2359 internal::NativeWidgetDelegate* native_widget_delegate, | 2359 internal::NativeWidgetDelegate* native_widget_delegate, |
| 2360 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 2360 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 2361 return new DesktopWindowTreeHostX11(native_widget_delegate, | 2361 return new DesktopWindowTreeHostX11(native_widget_delegate, |
| 2362 desktop_native_widget_aura); | 2362 desktop_native_widget_aura); |
| 2363 } | 2363 } |
| 2364 | 2364 |
| 2365 } // namespace views | 2365 } // namespace views |
| OLD | NEW |