| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 "window_manager/wm_ipc.h" | 5 #include "window_manager/wm_ipc.h" |
| 6 | 6 |
| 7 #include <cstring> | 7 #include <cstring> |
| 8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
| 9 extern "C" { | 9 extern "C" { |
| 10 #include <X11/Xatom.h> // for XA_CARDINAL | 10 #include <X11/Xatom.h> // for XA_CARDINAL |
| 11 } | 11 } |
| 12 | 12 |
| 13 #include "chromeos/obsolete_logging.h" | 13 #include "chromeos/obsolete_logging.h" |
| 14 | 14 |
| 15 #include "window_manager/atom_cache.h" | 15 #include "window_manager/atom_cache.h" |
| 16 #include "window_manager/util.h" | 16 #include "window_manager/util.h" |
| 17 #include "window_manager/x_connection.h" | 17 #include "window_manager/x_connection.h" |
| 18 | 18 |
| 19 namespace chromeos { | 19 namespace window_manager { |
| 20 | 20 |
| 21 WmIpc::WmIpc(XConnection* xconn, AtomCache* cache) | 21 WmIpc::WmIpc(XConnection* xconn, AtomCache* cache) |
| 22 : xconn_(xconn), | 22 : xconn_(xconn), |
| 23 atom_cache_(cache), | 23 atom_cache_(cache), |
| 24 wm_window_(xconn_->GetSelectionOwner(atom_cache_->GetXAtom(ATOM_WM_S0))) { | 24 wm_window_(xconn_->GetSelectionOwner(atom_cache_->GetXAtom(ATOM_WM_S0))) { |
| 25 VLOG(1) << "Window manager window is " << XidStr(wm_window_); | 25 VLOG(1) << "Window manager window is " << XidStr(wm_window_); |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool WmIpc::GetWindowType(XWindow xid, | 28 bool WmIpc::GetWindowType(XWindow xid, |
| 29 WindowType* type, | 29 WindowType* type, |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // the first one for our message type. | 124 // the first one for our message type. |
| 125 CHECK_LE(msg.max_params(), 4); | 125 CHECK_LE(msg.max_params(), 4); |
| 126 for (int i = 0; i < msg.max_params(); ++i) { | 126 for (int i = 0; i < msg.max_params(); ++i) { |
| 127 e.xclient.data.l[i+1] = msg.param(i); | 127 e.xclient.data.l[i+1] = msg.param(i); |
| 128 } | 128 } |
| 129 | 129 |
| 130 return xconn_->SendEvent(xid, &e, 0); // empty event mask | 130 return xconn_->SendEvent(xid, &e, 0); // empty event mask |
| 131 } | 131 } |
| 132 | 132 |
| 133 } | 133 } |
| OLD | NEW |