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 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1671 ToPixelRect(gfx::Rect(native_widget_delegate_->GetMinimumSize())).size(); | 1671 ToPixelRect(gfx::Rect(native_widget_delegate_->GetMinimumSize())).size(); |
1672 gfx::Size maximum_in_pixels = | 1672 gfx::Size maximum_in_pixels = |
1673 ToPixelRect(gfx::Rect(native_widget_delegate_->GetMaximumSize())).size(); | 1673 ToPixelRect(gfx::Rect(native_widget_delegate_->GetMaximumSize())).size(); |
1674 if (min_size_in_pixels_ == minimum_in_pixels && | 1674 if (min_size_in_pixels_ == minimum_in_pixels && |
1675 max_size_in_pixels_ == maximum_in_pixels) | 1675 max_size_in_pixels_ == maximum_in_pixels) |
1676 return; | 1676 return; |
1677 | 1677 |
1678 min_size_in_pixels_ = minimum_in_pixels; | 1678 min_size_in_pixels_ = minimum_in_pixels; |
1679 max_size_in_pixels_ = maximum_in_pixels; | 1679 max_size_in_pixels_ = maximum_in_pixels; |
1680 | 1680 |
1681 XSizeHints hints; | 1681 XSizeHints hints; |
Nico
2017/03/11 00:40:44
= {} here to zero out all the fields doesn't work?
Tom (Use chromium acct)
2017/03/11 00:45:35
That would work too, but it's unnecessary because
| |
1682 hints.flags = 0; | |
1682 long supplied_return; | 1683 long supplied_return; |
1683 XGetWMNormalHints(xdisplay_, xwindow_, &hints, &supplied_return); | 1684 XGetWMNormalHints(xdisplay_, xwindow_, &hints, &supplied_return); |
1684 | 1685 |
1685 if (minimum_in_pixels.IsEmpty()) { | 1686 if (minimum_in_pixels.IsEmpty()) { |
1686 hints.flags &= ~PMinSize; | 1687 hints.flags &= ~PMinSize; |
1687 } else { | 1688 } else { |
1688 hints.flags |= PMinSize; | 1689 hints.flags |= PMinSize; |
1689 hints.min_width = min_size_in_pixels_.width(); | 1690 hints.min_width = min_size_in_pixels_.width(); |
1690 hints.min_height = min_size_in_pixels_.height(); | 1691 hints.min_height = min_size_in_pixels_.height(); |
1691 } | 1692 } |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2353 | 2354 |
2354 // static | 2355 // static |
2355 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 2356 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
2356 internal::NativeWidgetDelegate* native_widget_delegate, | 2357 internal::NativeWidgetDelegate* native_widget_delegate, |
2357 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 2358 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
2358 return new DesktopWindowTreeHostX11(native_widget_delegate, | 2359 return new DesktopWindowTreeHostX11(native_widget_delegate, |
2359 desktop_native_widget_aura); | 2360 desktop_native_widget_aura); |
2360 } | 2361 } |
2361 | 2362 |
2362 } // namespace views | 2363 } // namespace views |
OLD | NEW |