| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/wm_ipc.h" | 5 #include "chrome/browser/chromeos/wm_ipc.h" |
| 6 | 6 |
| 7 #include <gdk/gdkx.h> | 7 #include <gdk/gdkx.h> |
| 8 extern "C" { | 8 extern "C" { |
| 9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 } | 10 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 std::vector<int> values; | 159 std::vector<int> values; |
| 160 values.push_back(static_cast<int>(logged_in)); | 160 values.push_back(static_cast<int>(logged_in)); |
| 161 SetIntProperty(gdk_x11_get_default_root_xwindow(), | 161 SetIntProperty(gdk_x11_get_default_root_xwindow(), |
| 162 type_to_atom_[ATOM_CHROME_LOGGED_IN], | 162 type_to_atom_[ATOM_CHROME_LOGGED_IN], |
| 163 values); | 163 values); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void WmIpc::NotifyAboutSignout() { | 166 void WmIpc::NotifyAboutSignout() { |
| 167 Message msg(chromeos::WM_IPC_MESSAGE_WM_NOTIFY_SIGNING_OUT); | 167 Message msg(chromeos::WM_IPC_MESSAGE_WM_NOTIFY_SIGNING_OUT); |
| 168 SendMessage(msg); | 168 SendMessage(msg); |
| 169 XFlush(ui::GetXDisplay()); |
| 169 } | 170 } |
| 170 | 171 |
| 171 WmIpc::WmIpc() { | 172 WmIpc::WmIpc() { |
| 172 scoped_array<char*> names(new char*[kNumAtoms]); | 173 scoped_array<char*> names(new char*[kNumAtoms]); |
| 173 scoped_array<Atom> atoms(new Atom[kNumAtoms]); | 174 scoped_array<Atom> atoms(new Atom[kNumAtoms]); |
| 174 | 175 |
| 175 for (int i = 0; i < kNumAtoms; ++i) { | 176 for (int i = 0; i < kNumAtoms; ++i) { |
| 176 // Need to const_cast because XInternAtoms() wants a char**. | 177 // Need to const_cast because XInternAtoms() wants a char**. |
| 177 names[i] = const_cast<char*>(kAtomInfos[i].name); | 178 names[i] = const_cast<char*>(kAtomInfos[i].name); |
| 178 } | 179 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 205 // Let the window manager know which version of the IPC messages we support. | 206 // Let the window manager know which version of the IPC messages we support. |
| 206 Message msg(chromeos::WM_IPC_MESSAGE_WM_NOTIFY_IPC_VERSION); | 207 Message msg(chromeos::WM_IPC_MESSAGE_WM_NOTIFY_IPC_VERSION); |
| 207 // TODO: The version number is the latest listed in wm_ipc.h -- | 208 // TODO: The version number is the latest listed in wm_ipc.h -- |
| 208 // ideally, once this header is shared between Chrome and the Chrome OS window | 209 // ideally, once this header is shared between Chrome and the Chrome OS window |
| 209 // manager, we'll just define the version statically in the header. | 210 // manager, we'll just define the version statically in the header. |
| 210 msg.set_param(0, 1); | 211 msg.set_param(0, 1); |
| 211 SendMessage(msg); | 212 SendMessage(msg); |
| 212 } | 213 } |
| 213 | 214 |
| 214 } // namespace chromeos | 215 } // namespace chromeos |
| OLD | NEW |