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/real_x_connection.h" | 5 #include "window_manager/real_x_connection.h" |
6 | 6 |
7 extern "C" { | 7 extern "C" { |
8 #include <X11/extensions/randr.h> | 8 #include <X11/extensions/randr.h> |
9 #include <X11/extensions/shape.h> | 9 #include <X11/extensions/shape.h> |
10 #include <X11/extensions/Xcomposite.h> | 10 #include <X11/extensions/Xcomposite.h> |
11 #include <X11/extensions/Xrandr.h> | 11 #include <X11/extensions/Xrandr.h> |
12 #include <X11/Xatom.h> | 12 #include <X11/Xatom.h> |
13 #include <X11/Xutil.h> | 13 #include <X11/Xutil.h> |
14 #include <X11/XKBlib.h> | 14 #include <X11/XKBlib.h> |
15 } | 15 } |
16 | 16 |
17 #include "chromeos/obsolete_logging.h" | 17 #include "chromeos/obsolete_logging.h" |
18 | 18 |
19 #include "window_manager/util.h" | 19 #include "window_manager/util.h" |
20 | 20 |
21 namespace chromeos { | 21 namespace window_manager { |
22 | 22 |
23 using std::string; | 23 using std::string; |
24 using std::vector; | 24 using std::vector; |
25 using std::hex; | 25 using std::hex; |
26 | 26 |
27 // Maximum number of integer values to allow in a property. | 27 // Maximum number of integer values to allow in a property. |
28 static const size_t kMaxIntPropertySize = 1024; | 28 static const size_t kMaxIntPropertySize = 1024; |
29 | 29 |
30 static int (*old_error_handler)(Display*, XErrorEvent*) = NULL; | 30 static int (*old_error_handler)(Display*, XErrorEvent*) = NULL; |
31 | 31 |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 int RealXConnection::GetLastErrorCode() { | 984 int RealXConnection::GetLastErrorCode() { |
985 return last_trapped_error_code; | 985 return last_trapped_error_code; |
986 } | 986 } |
987 | 987 |
988 string RealXConnection::GetErrorText(int error_code) { | 988 string RealXConnection::GetErrorText(int error_code) { |
989 char str[1024]; | 989 char str[1024]; |
990 XGetErrorText(display_, error_code, str, sizeof(str)); | 990 XGetErrorText(display_, error_code, str, sizeof(str)); |
991 return string(str); | 991 return string(str); |
992 } | 992 } |
993 | 993 |
994 } // namespace chromeos | 994 } // namespace window_manager |
OLD | NEW |