Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 1135693006: Fix X11DesktopHandler::ActivateWindow on Unity for known user gestures Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698