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 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 | 1605 |
1606 XMapWindow(xdisplay_, xwindow_); | 1606 XMapWindow(xdisplay_, xwindow_); |
1607 | 1607 |
1608 // We now block until our window is mapped. Some X11 APIs will crash and | 1608 // We now block until our window is mapped. Some X11 APIs will crash and |
1609 // burn if passed |xwindow_| before the window is mapped, and XMapWindow is | 1609 // burn if passed |xwindow_| before the window is mapped, and XMapWindow is |
1610 // asynchronous. | 1610 // asynchronous. |
1611 if (ui::X11EventSource::GetInstance()) | 1611 if (ui::X11EventSource::GetInstance()) |
1612 ui::X11EventSource::GetInstance()->BlockUntilWindowMapped(xwindow_); | 1612 ui::X11EventSource::GetInstance()->BlockUntilWindowMapped(xwindow_); |
1613 window_mapped_ = true; | 1613 window_mapped_ = true; |
1614 | 1614 |
| 1615 UpdateMinAndMaxSize(); |
| 1616 |
1615 // Some WMs only respect maximize hints after the window has been mapped. | 1617 // Some WMs only respect maximize hints after the window has been mapped. |
1616 // Check whether we need to re-do a maximization. | 1618 // Check whether we need to re-do a maximization. |
1617 if (should_maximize_after_map_) { | 1619 if (should_maximize_after_map_) { |
1618 Maximize(); | 1620 Maximize(); |
1619 should_maximize_after_map_ = false; | 1621 should_maximize_after_map_ = false; |
1620 } | 1622 } |
1621 } | 1623 } |
1622 | 1624 |
1623 void DesktopWindowTreeHostX11::SetWindowTransparency() { | 1625 void DesktopWindowTreeHostX11::SetWindowTransparency() { |
1624 compositor()->SetHostHasTransparentBackground(use_argb_visual_); | 1626 compositor()->SetHostHasTransparentBackground(use_argb_visual_); |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1985 if (linux_ui) { | 1987 if (linux_ui) { |
1986 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 1988 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
1987 if (native_theme) | 1989 if (native_theme) |
1988 return native_theme; | 1990 return native_theme; |
1989 } | 1991 } |
1990 | 1992 |
1991 return ui::NativeTheme::instance(); | 1993 return ui::NativeTheme::instance(); |
1992 } | 1994 } |
1993 | 1995 |
1994 } // namespace views | 1996 } // namespace views |
OLD | NEW |