]> khamidou — GitHub mirrors - electron.git/commitdiff
linux: Use app's name for WM_CLASS
authorCheng Zhao <zcbenz@gmail.com>
Mon, 24 Nov 2014 07:27:36 +0000 (15:27 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 24 Nov 2014 07:51:26 +0000 (15:51 +0800)
atom/browser/native_window_views.cc

index 7136efccbd6fb2a6ea26c3ce85958ac24b6cb760..f9dcd3a4c8f43a97d5e6255baad97a118a1c1338 100644 (file)
@@ -35,6 +35,7 @@
 #include "atom/browser/ui/x/x_window_utils.h"
 #include "base/environment.h"
 #include "base/nix/xdg_util.h"
+#include "base/strings/string_util.h"
 #include "chrome/browser/ui/libgtk2ui/unity_service.h"
 #include "dbus/bus.h"
 #include "dbus/object_proxy.h"
@@ -177,11 +178,12 @@ NativeWindowViews::NativeWindowViews(content::WebContents* web_contents,
   params.remove_standard_frame = !has_frame_;
 
 #if defined(USE_X11)
+  std::string name = Browser::Get()->GetName();
   // Set WM_WINDOW_ROLE.
-  params.wm_role_name = "atom-shell app";
+  params.wm_role_name = "browser-window";
   // Set WM_CLASS.
-  params.wm_class_name = "atom";
-  params.wm_class_class = "Atom";
+  params.wm_class_name = base::StringToLowerASCII(name);
+  params.wm_class_class = name;
 #endif
 
   window_->Init(params);