diff options
author | saintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-30 00:59:21 +0000 |
---|---|---|
committer | saintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-30 00:59:21 +0000 |
commit | 5fb1ce61756b7407dfe95dbaa76151ed5a02ae78 (patch) | |
tree | e7c401834783dd24c4947fd2fe8444af12afc8c4 /ui | |
parent | b62d443dfd1a549986e538624bad34c3a7fe0788 (diff) | |
download | chromium_src-5fb1ce61756b7407dfe95dbaa76151ed5a02ae78.zip chromium_src-5fb1ce61756b7407dfe95dbaa76151ed5a02ae78.tar.gz chromium_src-5fb1ce61756b7407dfe95dbaa76151ed5a02ae78.tar.bz2 |
Set X window title for Aura root windows
Set X window title for Aura root window.
This is part of a workaround for a gtalk issue in screensharing the desktop on
some ChromeOS devices.
BUG=120229
TEST='xwininfo -root -tree' on ChromeOS, ensure window title is aura_root_0
TEST=Run Aura on Linux, notice the window title is aura_root_0
Review URL: https://chromiumcodereview.appspot.com/9911022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/aura/root_window_host_linux.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc index 1e698fd..9455e0f 100644 --- a/ui/aura/root_window_host_linux.cc +++ b/ui/aura/root_window_host_linux.cc @@ -12,6 +12,7 @@ #include "base/message_pump_x.h" #include "base/stl_util.h" +#include "base/stringprintf.h" #include "ui/aura/cursor.h" #include "ui/aura/dispatcher_linux.h" #include "ui/aura/env.h" @@ -320,6 +321,13 @@ RootWindowHostLinux::RootWindowHostLinux(const gfx::Rect& bounds) &black, &black, 0, 0); if (RootWindow::hide_host_cursor()) XDefineCursor(xdisplay_, x_root_window_, invisible_cursor_); + + // crbug.com/120229 - set the window title so gtalk can find the primary root + // window to broadcast. + // TODO(jhorwich) Remove this once Chrome supports window-based broadcasting. + static int root_window_number = 0; + std::string name = StringPrintf("aura_root_%d", root_window_number++); + XStoreName(xdisplay_, xwindow_, name.c_str()); } RootWindowHostLinux::~RootWindowHostLinux() { |