OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file defines utility functions for X11 (Linux only). This code has been | 5 // This file defines utility functions for X11 (Linux only). This code has been |
6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support | 6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support |
7 // remains woefully incomplete. | 7 // remains woefully incomplete. |
8 | 8 |
9 #include "ui/base/x/x11_util.h" | 9 #include "ui/base/x/x11_util.h" |
10 | 10 |
11 #include <gdk/gdk.h> | 11 #include <gdk/gdk.h> |
12 #include <gdk/gdkx.h> | 12 #include <gdk/gdkx.h> |
13 #include <gtk/gtk.h> | 13 #include <gtk/gtk.h> |
14 | 14 |
15 #include <sys/ipc.h> | 15 #include <sys/ipc.h> |
16 #include <sys/shm.h> | 16 #include <sys/shm.h> |
17 | 17 |
18 #include <list> | 18 #include <list> |
19 #include <vector> | 19 #include <vector> |
20 | 20 |
21 #include "base/command_line.h" | 21 #include "base/command_line.h" |
22 #include "base/logging.h" | 22 #include "base/logging.h" |
23 #include "base/stringprintf.h" | 23 #include "base/stringprintf.h" |
24 #include "base/string_number_conversions.h" | 24 #include "base/string_number_conversions.h" |
25 #include "base/threading/thread.h" | 25 #include "base/threading/thread.h" |
26 #include "gfx/rect.h" | |
27 #include "gfx/size.h" | |
28 #include "ui/base/x/x11_util_internal.h" | 26 #include "ui/base/x/x11_util_internal.h" |
| 27 #include "ui/gfx/rect.h" |
| 28 #include "ui/gfx/size.h" |
29 | 29 |
30 namespace ui { | 30 namespace ui { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 // Used to cache the XRenderPictFormat for a visual/display pair. | 34 // Used to cache the XRenderPictFormat for a visual/display pair. |
35 struct CachedPictFormat { | 35 struct CachedPictFormat { |
36 bool equals(Display* display, Visual* visual) const { | 36 bool equals(Display* display, Visual* visual) const { |
37 return display == this->display && visual == this->visual; | 37 return display == this->display && visual == this->visual; |
38 } | 38 } |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 "X Error detected: serial %lu, error_code %u (%s), " | 862 "X Error detected: serial %lu, error_code %u (%s), " |
863 "request_code %u minor_code %u (%s)", | 863 "request_code %u minor_code %u (%s)", |
864 error_event->serial, error_event->error_code, error_str, | 864 error_event->serial, error_event->error_code, error_str, |
865 error_event->request_code, error_event->minor_code, request_str); | 865 error_event->request_code, error_event->minor_code, request_str); |
866 } | 866 } |
867 // ---------------------------------------------------------------------------- | 867 // ---------------------------------------------------------------------------- |
868 // End of x11_util_internal.h | 868 // End of x11_util_internal.h |
869 | 869 |
870 | 870 |
871 } // namespace ui | 871 } // namespace ui |
OLD | NEW |