| 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 #ifndef REMOTING_HOST_LINUX_X11_UTIL_H_ | 5 #ifndef REMOTING_HOST_LINUX_X11_UTIL_H_ |
| 6 #define REMOTING_HOST_LINUX_X11_UTIL_H_ | 6 #define REMOTING_HOST_LINUX_X11_UTIL_H_ |
| 7 | 7 |
| 8 // Xlib.h defines XErrorEvent as an anonymous struct, so we can't forward- | 8 // Xlib.h defines XErrorEvent as an anonymous struct, so we can't forward- |
| 9 // declare it in this header. Since Xlib.h is not generally something you | 9 // declare it in this header. Since Xlib.h is not generally something you |
| 10 // should #include into arbitrary code, please refrain from #including this | 10 // should #include into arbitrary code, please refrain from #including this |
| 11 // header in another header. | 11 // header in another header. |
| 12 #include <X11/Xlib.h> | 12 #include <X11/Xlib.h> |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/macros.h" |
| 15 | 16 |
| 16 namespace remoting { | 17 namespace remoting { |
| 17 | 18 |
| 18 // Temporarily install an alternative handler for X errors. The default handler | 19 // Temporarily install an alternative handler for X errors. The default handler |
| 19 // exits the process, which is not what we want. | 20 // exits the process, which is not what we want. |
| 20 // | 21 // |
| 21 // Note that X error handlers are global, which means that this class is not | 22 // Note that X error handlers are global, which means that this class is not |
| 22 // thread safe. | 23 // thread safe. |
| 23 class ScopedXErrorHandler { | 24 class ScopedXErrorHandler { |
| 24 public: | 25 public: |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 | 62 |
| 62 // Make a connection to the X Server impervious to X Server grabs. Returns | 63 // Make a connection to the X Server impervious to X Server grabs. Returns |
| 63 // true if successful or false if the required XTEST extension is not present. | 64 // true if successful or false if the required XTEST extension is not present. |
| 64 bool IgnoreXServerGrabs(Display* display, bool ignore); | 65 bool IgnoreXServerGrabs(Display* display, bool ignore); |
| 65 | 66 |
| 66 } // namespace remoting | 67 } // namespace remoting |
| 67 | 68 |
| 68 #endif // REMOTING_HOST_LINUX_X11_UTIL_H_ | 69 #endif // REMOTING_HOST_LINUX_X11_UTIL_H_ |
| OLD | NEW |