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

Side by Side Diff: ui/aura/root_window_host_x11.cc

Issue 17099003: Use primary display as hangout/gtalk broadcast window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/aura/root_window_host_x11.h" 5 #include "ui/aura/root_window_host_x11.h"
6 6
7 #include <strings.h> 7 #include <strings.h>
8 #include <X11/cursorfont.h> 8 #include <X11/cursorfont.h>
9 #include <X11/extensions/Xfixes.h> 9 #include <X11/extensions/Xfixes.h>
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 // Likewise, the X server needs to know this window's pid so it knows which 407 // Likewise, the X server needs to know this window's pid so it knows which
408 // program to kill if the window hangs. 408 // program to kill if the window hangs.
409 pid_t pid = getpid(); 409 pid_t pid = getpid();
410 XChangeProperty(xdisplay_, 410 XChangeProperty(xdisplay_,
411 xwindow_, 411 xwindow_,
412 atom_cache_.GetAtom("_NET_WM_PID"), 412 atom_cache_.GetAtom("_NET_WM_PID"),
413 XA_CARDINAL, 413 XA_CARDINAL,
414 32, 414 32,
415 PropModeReplace, 415 PropModeReplace,
416 reinterpret_cast<unsigned char*>(&pid), 1); 416 reinterpret_cast<unsigned char*>(&pid), 1);
417
418 // crbug.com/120229 - set the window title so gtalk can find the primary root
419 // window to broadcast.
420 // TODO(jhorwich) Remove this once Chrome supports window-based broadcasting.
421 static int root_window_number = 0;
422 std::string name = base::StringPrintf("aura_root_%d", root_window_number++);
423 XStoreName(xdisplay_, xwindow_, name.c_str());
424 XRRSelectInput(xdisplay_, x_root_window_,
425 RRScreenChangeNotifyMask | RROutputChangeNotifyMask);
426 Env::GetInstance()->AddObserver(this); 417 Env::GetInstance()->AddObserver(this);
427 } 418 }
428 419
429 RootWindowHostX11::~RootWindowHostX11() { 420 RootWindowHostX11::~RootWindowHostX11() {
430 Env::GetInstance()->RemoveObserver(this); 421 Env::GetInstance()->RemoveObserver(this);
431 base::MessagePumpAuraX11::Current()->RemoveDispatcherForRootWindow(this); 422 base::MessagePumpAuraX11::Current()->RemoveDispatcherForRootWindow(this);
432 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(xwindow_); 423 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(xwindow_);
433 424
434 UnConfineCursor(); 425 UnConfineCursor();
435 426
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 } 1096 }
1106 1097
1107 namespace test { 1098 namespace test {
1108 1099
1109 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { 1100 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) {
1110 default_override_redirect = override_redirect; 1101 default_override_redirect = override_redirect;
1111 } 1102 }
1112 1103
1113 } // namespace test 1104 } // namespace test
1114 } // namespace aura 1105 } // namespace aura
OLDNEW
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698