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

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

Issue 764373002: desktop_window_tree_host_x11.cc: do not return immediately from DesktopWindowTreeHostX11::OnWMState… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment fix Created 6 years 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 | 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 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 } 1218 }
1219 1219
1220 // Do not request a 0x0 window size. It causes an XError. 1220 // Do not request a 0x0 window size. It causes an XError.
1221 gfx::Size size = requested_size; 1221 gfx::Size size = requested_size;
1222 size.SetToMax(gfx::Size(1,1)); 1222 size.SetToMax(gfx::Size(1,1));
1223 return size; 1223 return size;
1224 } 1224 }
1225 1225
1226 void DesktopWindowTreeHostX11::OnWMStateUpdated() { 1226 void DesktopWindowTreeHostX11::OnWMStateUpdated() {
1227 std::vector< ::Atom> atom_list; 1227 std::vector< ::Atom> atom_list;
1228 if (!ui::GetAtomArrayProperty(xwindow_, "_NET_WM_STATE", &atom_list)) 1228 // Ignore the return value of ui::GetAtomArrayProperty(). Fluxbox removes the
1229 return; 1229 // _NET_WM_STATE property when no _NET_WM_STATE atoms are set.
1230 ui::GetAtomArrayProperty(xwindow_, "_NET_WM_STATE", &atom_list);
1230 1231
1231 bool was_minimized = IsMinimized(); 1232 bool was_minimized = IsMinimized();
1232 1233
1233 window_properties_.clear(); 1234 window_properties_.clear();
1234 std::copy(atom_list.begin(), atom_list.end(), 1235 std::copy(atom_list.begin(), atom_list.end(),
1235 inserter(window_properties_, window_properties_.begin())); 1236 inserter(window_properties_, window_properties_.begin()));
1236 1237
1237 // Propagate the window minimization information to the content window, so 1238 // Propagate the window minimization information to the content window, so
1238 // the render side can update its visibility properly. OnWMStateUpdated() is 1239 // the render side can update its visibility properly. OnWMStateUpdated() is
1239 // called by PropertyNofify event from DispatchEvent() when the browser is 1240 // called by PropertyNofify event from DispatchEvent() when the browser is
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 if (linux_ui) { 1928 if (linux_ui) {
1928 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 1929 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
1929 if (native_theme) 1930 if (native_theme)
1930 return native_theme; 1931 return native_theme;
1931 } 1932 }
1932 1933
1933 return ui::NativeTheme::instance(); 1934 return ui::NativeTheme::instance();
1934 } 1935 }
1935 1936
1936 } // namespace views 1937 } // 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