| 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 // Replace the frame and layout the contents. Even though we don't have a | 698 // Replace the frame and layout the contents. Even though we don't have a |
| 699 // swapable glass frame like on Windows, we still replace the frame because | 699 // swapable glass frame like on Windows, we still replace the frame because |
| 700 // the button assets don't update otherwise. | 700 // the button assets don't update otherwise. |
| 701 native_widget_delegate_->AsWidget()->non_client_view()->UpdateFrame(); | 701 native_widget_delegate_->AsWidget()->non_client_view()->UpdateFrame(); |
| 702 } | 702 } |
| 703 | 703 |
| 704 void DesktopWindowTreeHostX11::SetFullscreen(bool fullscreen) { | 704 void DesktopWindowTreeHostX11::SetFullscreen(bool fullscreen) { |
| 705 if (is_fullscreen_ == fullscreen) | 705 if (is_fullscreen_ == fullscreen) |
| 706 return; | 706 return; |
| 707 is_fullscreen_ = fullscreen; | 707 is_fullscreen_ = fullscreen; |
| 708 if (is_fullscreen_) |
| 709 delayed_resize_task_.Cancel(); |
| 708 | 710 |
| 709 // Work around a bug where if we try to unfullscreen, metacity immediately | 711 // Work around a bug where if we try to unfullscreen, metacity immediately |
| 710 // fullscreens us again. This is a little flickery and not necessary if | 712 // fullscreens us again. This is a little flickery and not necessary if |
| 711 // there's a gnome-panel, but it's not easy to detect whether there's a | 713 // there's a gnome-panel, but it's not easy to detect whether there's a |
| 712 // panel or not. | 714 // panel or not. |
| 713 bool unmaximize_and_remaximize = !fullscreen && IsMaximized() && | 715 bool unmaximize_and_remaximize = !fullscreen && IsMaximized() && |
| 714 ui::GuessWindowManager() == ui::WM_METACITY; | 716 ui::GuessWindowManager() == ui::WM_METACITY; |
| 715 | 717 |
| 716 if (unmaximize_and_remaximize) | 718 if (unmaximize_and_remaximize) |
| 717 Restore(); | 719 Restore(); |
| (...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1914 if (linux_ui) { | 1916 if (linux_ui) { |
| 1915 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 1917 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 1916 if (native_theme) | 1918 if (native_theme) |
| 1917 return native_theme; | 1919 return native_theme; |
| 1918 } | 1920 } |
| 1919 | 1921 |
| 1920 return ui::NativeTheme::instance(); | 1922 return ui::NativeTheme::instance(); |
| 1921 } | 1923 } |
| 1922 | 1924 |
| 1923 } // namespace views | 1925 } // namespace views |
| OLD | NEW |