| OLD | NEW |
| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 // Likewise, the X server needs to know this window's pid so it knows which | 406 // Likewise, the X server needs to know this window's pid so it knows which |
| 407 // program to kill if the window hangs. | 407 // program to kill if the window hangs. |
| 408 pid_t pid = getpid(); | 408 pid_t pid = getpid(); |
| 409 XChangeProperty(xdisplay_, | 409 XChangeProperty(xdisplay_, |
| 410 xwindow_, | 410 xwindow_, |
| 411 atom_cache_.GetAtom("_NET_WM_PID"), | 411 atom_cache_.GetAtom("_NET_WM_PID"), |
| 412 XA_CARDINAL, | 412 XA_CARDINAL, |
| 413 32, | 413 32, |
| 414 PropModeReplace, | 414 PropModeReplace, |
| 415 reinterpret_cast<unsigned char*>(&pid), 1); | 415 reinterpret_cast<unsigned char*>(&pid), 1); |
| 416 |
| 417 XRRSelectInput(xdisplay_, x_root_window_, |
| 418 RRScreenChangeNotifyMask | RROutputChangeNotifyMask); |
| 416 Env::GetInstance()->AddObserver(this); | 419 Env::GetInstance()->AddObserver(this); |
| 417 } | 420 } |
| 418 | 421 |
| 419 RootWindowHostX11::~RootWindowHostX11() { | 422 RootWindowHostX11::~RootWindowHostX11() { |
| 420 Env::GetInstance()->RemoveObserver(this); | 423 Env::GetInstance()->RemoveObserver(this); |
| 421 base::MessagePumpAuraX11::Current()->RemoveDispatcherForRootWindow(this); | 424 base::MessagePumpAuraX11::Current()->RemoveDispatcherForRootWindow(this); |
| 422 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(xwindow_); | 425 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(xwindow_); |
| 423 | 426 |
| 424 UnConfineCursor(); | 427 UnConfineCursor(); |
| 425 | 428 |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 } | 1100 } |
| 1098 | 1101 |
| 1099 namespace test { | 1102 namespace test { |
| 1100 | 1103 |
| 1101 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 1104 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
| 1102 default_override_redirect = override_redirect; | 1105 default_override_redirect = override_redirect; |
| 1103 } | 1106 } |
| 1104 | 1107 |
| 1105 } // namespace test | 1108 } // namespace test |
| 1106 } // namespace aura | 1109 } // namespace aura |
| OLD | NEW |