| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 case ui::SHOW_STATE_MINIMIZED: | 565 case ui::SHOW_STATE_MINIMIZED: |
| 566 Minimize(); | 566 Minimize(); |
| 567 break; | 567 break; |
| 568 case ui::SHOW_STATE_FULLSCREEN: | 568 case ui::SHOW_STATE_FULLSCREEN: |
| 569 SetFullscreen(true); | 569 SetFullscreen(true); |
| 570 break; | 570 break; |
| 571 default: | 571 default: |
| 572 break; | 572 break; |
| 573 } | 573 } |
| 574 | 574 |
| 575 // Makes the window activated by default if the state is not INACTIVE or | |
| 576 // MINIMIZED. | |
| 577 if (show_state != ui::SHOW_STATE_INACTIVE && | |
| 578 show_state != ui::SHOW_STATE_MINIMIZED) { | |
| 579 Activate(); | |
| 580 } | |
| 581 | |
| 582 native_widget_delegate_->AsWidget()->SetInitialFocus(show_state); | 575 native_widget_delegate_->AsWidget()->SetInitialFocus(show_state); |
| 583 } | 576 } |
| 584 | 577 |
| 585 void DesktopWindowTreeHostX11::ShowMaximizedWithBounds( | 578 void DesktopWindowTreeHostX11::ShowMaximizedWithBounds( |
| 586 const gfx::Rect& restored_bounds) { | 579 const gfx::Rect& restored_bounds) { |
| 587 ShowWindowWithState(ui::SHOW_STATE_MAXIMIZED); | 580 ShowWindowWithState(ui::SHOW_STATE_MAXIMIZED); |
| 588 // Enforce |restored_bounds_in_pixels_| since calling Maximize() could have | 581 // Enforce |restored_bounds_in_pixels_| since calling Maximize() could have |
| 589 // reset it. | 582 // reset it. |
| 590 restored_bounds_in_pixels_ = ToPixelRect(restored_bounds); | 583 restored_bounds_in_pixels_ = ToPixelRect(restored_bounds); |
| 591 } | 584 } |
| (...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2315 if (linux_ui) { | 2308 if (linux_ui) { |
| 2316 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2309 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 2317 if (native_theme) | 2310 if (native_theme) |
| 2318 return native_theme; | 2311 return native_theme; |
| 2319 } | 2312 } |
| 2320 | 2313 |
| 2321 return ui::NativeThemeAura::instance(); | 2314 return ui::NativeThemeAura::instance(); |
| 2322 } | 2315 } |
| 2323 | 2316 |
| 2324 } // namespace views | 2317 } // namespace views |
| OLD | NEW |