From 8c980f464787f069b3d7fe338fac5b2dd69967c0 Mon Sep 17 00:00:00 2001 From: Hongbo Min Date: Thu, 18 Jul 2013 17:04:45 +0800 Subject: [PATCH 1/2] Use XmbSetWMProperties to set window title for i18n issue BUG=https://github.com/otcshare/crosswalk/issues/189 --- ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc index 48b3e61f3d966..6f63e37ba378f 100644 --- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc +++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc @@ -591,7 +591,8 @@ void DesktopRootWindowHostX11::SetAlwaysOnTop(bool always_on_top) { } void DesktopRootWindowHostX11::SetWindowTitle(const string16& title) { - XStoreName(xdisplay_, xwindow_, UTF16ToUTF8(title).c_str()); + XmbSetWMProperties(xdisplay_, xwindow_, UTF16ToUTF8(title).c_str(), NULL, + NULL, 0, NULL, NULL, NULL); } void DesktopRootWindowHostX11::ClearNativeFocus() { From b38d5f9b731a6305cb469c5fda95139fb0f6cd17 Mon Sep 17 00:00:00 2001 From: Hongbo Min Date: Thu, 18 Jul 2013 17:21:57 +0800 Subject: [PATCH 2/2] Also need to set aura::Window title Since each DesktopNativeWidgetAura uses a sole aura::Window as its backed, once the title of native widget gets updated, the title of aura::Window should also be updated in addition to updating the XWindow created by DesktopRootWindowHostX11. BUG=https://github.com/otcshare/crosswalk/issues/191 TEST=xwalk_browsertest --gtest_filter=XWalkRuntimeTest.GetWindowTitle --- ui/views/widget/desktop_aura/desktop_native_widget_aura.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc index 440a614b08fbd..e0c7d7d1a06a2 100644 --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc @@ -376,6 +376,7 @@ void DesktopNativeWidgetAura::GetWindowPlacement( } void DesktopNativeWidgetAura::SetWindowTitle(const string16& title) { + window_->set_title(title); desktop_root_window_host_->SetWindowTitle(title); }