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

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

Issue 278823004: Make DesktopWindowTreeHostX11::use_native_frame_ more robust (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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_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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 return use_native_frame_; 606 return use_native_frame_;
607 } 607 }
608 608
609 bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { 609 bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const {
610 return false; 610 return false;
611 } 611 }
612 612
613 void DesktopWindowTreeHostX11::FrameTypeChanged() { 613 void DesktopWindowTreeHostX11::FrameTypeChanged() {
614 Widget::FrameType new_type = 614 Widget::FrameType new_type =
615 native_widget_delegate_->AsWidget()->frame_type(); 615 native_widget_delegate_->AsWidget()->frame_type();
616 if (new_type == Widget::FRAME_TYPE_DEFAULT) {
617 // The default is determined by Widget::InitParams::remove_standard_frame
618 // and does not change.
619 return;
620 }
621
616 SetUseNativeFrame(new_type == Widget::FRAME_TYPE_FORCE_NATIVE); 622 SetUseNativeFrame(new_type == Widget::FRAME_TYPE_FORCE_NATIVE);
617 // Replace the frame and layout the contents. Even though we don't have a 623 // Replace the frame and layout the contents. Even though we don't have a
618 // swapable glass frame like on Windows, we still replace the frame because 624 // swapable glass frame like on Windows, we still replace the frame because
619 // the button assets don't update otherwise. 625 // the button assets don't update otherwise.
620 native_widget_delegate_->AsWidget()->non_client_view()->UpdateFrame(); 626 native_widget_delegate_->AsWidget()->non_client_view()->UpdateFrame();
621 } 627 }
622 628
623 void DesktopWindowTreeHostX11::SetFullscreen(bool fullscreen) { 629 void DesktopWindowTreeHostX11::SetFullscreen(bool fullscreen) {
624 if (is_fullscreen_ == fullscreen) 630 if (is_fullscreen_ == fullscreen)
625 return; 631 return;
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 if (linux_ui) { 1679 if (linux_ui) {
1674 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 1680 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
1675 if (native_theme) 1681 if (native_theme)
1676 return native_theme; 1682 return native_theme;
1677 } 1683 }
1678 1684
1679 return ui::NativeTheme::instance(); 1685 return ui::NativeTheme::instance();
1680 } 1686 }
1681 1687
1682 } // namespace views 1688 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698