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

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

Issue 23093020: Set the WM_CLASS property of X11 windows in Linux Aura build. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Respond to reviews. Created 7 years, 3 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_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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 // SetWMSpecState) has no effect here since the window has not yet been 864 // SetWMSpecState) has no effect here since the window has not yet been
865 // mapped. So we manually change the state. 865 // mapped. So we manually change the state.
866 XChangeProperty (xdisplay_, 866 XChangeProperty (xdisplay_,
867 xwindow_, 867 xwindow_,
868 atom_cache_.GetAtom("_NET_WM_STATE"), 868 atom_cache_.GetAtom("_NET_WM_STATE"),
869 XA_ATOM, 869 XA_ATOM,
870 32, 870 32,
871 PropModeAppend, 871 PropModeAppend,
872 reinterpret_cast<unsigned char*>(&atom), 1); 872 reinterpret_cast<unsigned char*>(&atom), 1);
873 } 873 }
874
875 if (!params.wm_class_name.empty() || !params.wm_class_class.empty()) {
876 ui::SetWindowClassHint(
877 xdisplay_, xwindow_, params.wm_class_name, params.wm_class_class);
878 }
874 } 879 }
875 880
876 // TODO(erg): This method should basically be everything I need form 881 // TODO(erg): This method should basically be everything I need form
877 // RootWindowHostX11::RootWindowHostX11(). 882 // RootWindowHostX11::RootWindowHostX11().
878 aura::RootWindow* DesktopRootWindowHostX11::InitRootWindow( 883 aura::RootWindow* DesktopRootWindowHostX11::InitRootWindow(
879 const Widget::InitParams& params) { 884 const Widget::InitParams& params) {
880 bounds_ = params.bounds; 885 bounds_ = params.bounds;
881 886
882 aura::RootWindow::CreateParams rw_params(bounds_); 887 aura::RootWindow::CreateParams rw_params(bounds_);
883 rw_params.host = this; 888 rw_params.host = this;
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 if (linux_ui) { 1348 if (linux_ui) {
1344 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); 1349 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme();
1345 if (native_theme) 1350 if (native_theme)
1346 return native_theme; 1351 return native_theme;
1347 } 1352 }
1348 1353
1349 return ui::NativeTheme::instance(); 1354 return ui::NativeTheme::instance();
1350 } 1355 }
1351 1356
1352 } // namespace views 1357 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698