| 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   446  |   446  | 
|   447   // In some situations, views tries to make a zero sized window, and that |   447   // In some situations, views tries to make a zero sized window, and that | 
|   448   // makes us crash. Make sure we have valid sizes. |   448   // makes us crash. Make sure we have valid sizes. | 
|   449   Widget::InitParams sanitized_params = params; |   449   Widget::InitParams sanitized_params = params; | 
|   450   if (sanitized_params.bounds.width() == 0) |   450   if (sanitized_params.bounds.width() == 0) | 
|   451     sanitized_params.bounds.set_width(100); |   451     sanitized_params.bounds.set_width(100); | 
|   452   if (sanitized_params.bounds.height() == 0) |   452   if (sanitized_params.bounds.height() == 0) | 
|   453     sanitized_params.bounds.set_height(100); |   453     sanitized_params.bounds.set_height(100); | 
|   454  |   454  | 
|   455   InitX11Window(sanitized_params); |   455   InitX11Window(sanitized_params); | 
 |   456   InitHost(); | 
 |   457   window()->Show(); | 
|   456 } |   458 } | 
|   457  |   459  | 
|   458 void DesktopWindowTreeHostX11::OnNativeWidgetCreated( |   460 void DesktopWindowTreeHostX11::OnNativeWidgetCreated( | 
|   459     const Widget::InitParams& params) { |   461     const Widget::InitParams& params) { | 
|   460   window()->SetProperty(kViewsWindowForRootWindow, content_window_); |   462   window()->SetProperty(kViewsWindowForRootWindow, content_window_); | 
|   461   window()->SetProperty(kHostForRootWindow, this); |   463   window()->SetProperty(kHostForRootWindow, this); | 
|   462  |   464  | 
|   463   // Ensure that the X11DesktopHandler exists so that it tracks create/destroy |   465   // Ensure that the X11DesktopHandler exists so that it tracks create/destroy | 
|   464   // notify events. |   466   // notify events. | 
|   465   X11DesktopHandler::get(); |   467   X11DesktopHandler::get(); | 
| (...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2342  |  2344  | 
|  2343 // static |  2345 // static | 
|  2344 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |  2346 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 
|  2345     internal::NativeWidgetDelegate* native_widget_delegate, |  2347     internal::NativeWidgetDelegate* native_widget_delegate, | 
|  2346     DesktopNativeWidgetAura* desktop_native_widget_aura) { |  2348     DesktopNativeWidgetAura* desktop_native_widget_aura) { | 
|  2347   return new DesktopWindowTreeHostX11(native_widget_delegate, |  2349   return new DesktopWindowTreeHostX11(native_widget_delegate, | 
|  2348                                       desktop_native_widget_aura); |  2350                                       desktop_native_widget_aura); | 
|  2349 } |  2351 } | 
|  2350  |  2352  | 
|  2351 }  // namespace views |  2353 }  // namespace views | 
| OLD | NEW |