| 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 custom_window_shape_ = true; | 516 custom_window_shape_ = true; |
| 517 delete native_region; | 517 delete native_region; |
| 518 } | 518 } |
| 519 ResetWindowRegion(); | 519 ResetWindowRegion(); |
| 520 } | 520 } |
| 521 | 521 |
| 522 void DesktopWindowTreeHostX11::Activate() { | 522 void DesktopWindowTreeHostX11::Activate() { |
| 523 if (!window_mapped_) | 523 if (!window_mapped_) |
| 524 return; | 524 return; |
| 525 | 525 |
| 526 X11DesktopHandler::get()->ActivateWindow(xwindow_); | 526 X11DesktopHandler::get()->ActivateWindow(xwindow_, |
| 527 false /* for_user_gesture */); |
| 528 } |
| 529 |
| 530 void DesktopWindowTreeHostX11::ActivateForUserGesture() { |
| 531 if (!window_mapped_) |
| 532 return; |
| 533 |
| 534 X11DesktopHandler::get()->ActivateWindow(xwindow_, |
| 535 true /* for_user_gesture */); |
| 527 } | 536 } |
| 528 | 537 |
| 529 void DesktopWindowTreeHostX11::Deactivate() { | 538 void DesktopWindowTreeHostX11::Deactivate() { |
| 530 if (!IsActive()) | 539 if (!IsActive()) |
| 531 return; | 540 return; |
| 532 | 541 |
| 533 ReleaseCapture(); | 542 ReleaseCapture(); |
| 534 X11DesktopHandler::get()->DeactivateWindow(xwindow_); | 543 X11DesktopHandler::get()->DeactivateWindow(xwindow_); |
| 535 } | 544 } |
| 536 | 545 |
| (...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1997 if (linux_ui) { | 2006 if (linux_ui) { |
| 1998 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2007 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 1999 if (native_theme) | 2008 if (native_theme) |
| 2000 return native_theme; | 2009 return native_theme; |
| 2001 } | 2010 } |
| 2002 | 2011 |
| 2003 return ui::NativeTheme::instance(); | 2012 return ui::NativeTheme::instance(); |
| 2004 } | 2013 } |
| 2005 | 2014 |
| 2006 } // namespace views | 2015 } // namespace views |
| OLD | NEW |