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

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

Issue 137533006: Call XSetInputFocus after XRaiseWindow when activating. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_root_window_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_root_window_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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 460
461 void DesktopWindowTreeHostX11::SetShape(gfx::NativeRegion native_region) { 461 void DesktopWindowTreeHostX11::SetShape(gfx::NativeRegion native_region) {
462 if (custom_window_shape_) 462 if (custom_window_shape_)
463 XDestroyRegion(custom_window_shape_); 463 XDestroyRegion(custom_window_shape_);
464 custom_window_shape_ = gfx::CreateRegionFromSkRegion(*native_region); 464 custom_window_shape_ = gfx::CreateRegionFromSkRegion(*native_region);
465 ResetWindowRegion(); 465 ResetWindowRegion();
466 delete native_region; 466 delete native_region;
467 } 467 }
468 468
469 void DesktopWindowTreeHostX11::Activate() { 469 void DesktopWindowTreeHostX11::Activate() {
470 if (!window_mapped_)
471 return;
472
470 X11DesktopHandler::get()->ActivateWindow(xwindow_); 473 X11DesktopHandler::get()->ActivateWindow(xwindow_);
471 native_widget_delegate_->AsWidget()->SetInitialFocus(); 474 native_widget_delegate_->AsWidget()->SetInitialFocus();
472 } 475 }
473 476
474 void DesktopWindowTreeHostX11::Deactivate() { 477 void DesktopWindowTreeHostX11::Deactivate() {
475 // Deactivating a window means activating nothing. 478 // Deactivating a window means activating nothing.
476 x11_capture_.reset(); 479 x11_capture_.reset();
477 X11DesktopHandler::get()->ActivateWindow(None); 480 X11DesktopHandler::get()->ActivateWindow(None);
478 } 481 }
479 482
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 if (linux_ui) { 1549 if (linux_ui) {
1547 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); 1550 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme();
1548 if (native_theme) 1551 if (native_theme)
1549 return native_theme; 1552 return native_theme;
1550 } 1553 }
1551 1554
1552 return ui::NativeTheme::instance(); 1555 return ui::NativeTheme::instance();
1553 } 1556 }
1554 1557
1555 } // namespace views 1558 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698