Chromium Code Reviews| Index: ui/aura/window_tree_host_x11.cc |
| diff --git a/ui/aura/window_tree_host_x11.cc b/ui/aura/window_tree_host_x11.cc |
| index 37efdf4b65b98773ed5e6c2d276d375c6a7f76bc..a9a23d441163d9e057d9f189e2152e949fb5feb7 100644 |
| --- a/ui/aura/window_tree_host_x11.cc |
| +++ b/ui/aura/window_tree_host_x11.cc |
| @@ -157,9 +157,14 @@ WindowTreeHostX11::WindowTreeHostX11(const gfx::Rect& bounds) |
| protocols[1] = atom_cache_.GetAtom("_NET_WM_PING"); |
| XSetWMProtocols(xdisplay_, xwindow_, protocols, 2); |
| + XClassHint* class_hint = XAllocClassHint(); |
| + class_hint->res_name = const_cast<char*>("chromiumos"); |
| + class_hint->res_class = const_cast<char*>("ChromiumOS"); |
| // We need a WM_CLIENT_MACHINE and WM_LOCALE_NAME value so we integrate with |
| // the desktop environment. |
| - XSetWMProperties(xdisplay_, xwindow_, NULL, NULL, NULL, 0, NULL, NULL, NULL); |
| + XSetWMProperties(xdisplay_, xwindow_, NULL, NULL, NULL, 0, NULL, NULL, |
| + class_hint); |
| + XFree(class_hint); |
|
sadrul
2016/11/16 00:29:44
Can you use ui::SetWindowClassHint() instead?
Muyuan
2016/11/16 00:51:43
Done.
|
| // Likewise, the X server needs to know this window's pid so it knows which |
| // program to kill if the window hangs. |