| 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 // 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 |
| (...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 atom_properties.end(), | 1244 atom_properties.end(), |
| 1245 fullscreen_atom) != | 1245 fullscreen_atom) != |
| 1246 atom_properties.end(); | 1246 atom_properties.end(); |
| 1247 } | 1247 } |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 gfx::Rect window_rect; | 1250 gfx::Rect window_rect; |
| 1251 if (!ui::GetOuterWindowBounds(window, &window_rect)) | 1251 if (!ui::GetOuterWindowBounds(window, &window_rect)) |
| 1252 return false; | 1252 return false; |
| 1253 | 1253 |
| 1254 // We can't use gfx::Screen here because we don't have an aura::Window. So | 1254 // We can't use display::Screen here because we don't have an aura::Window. So |
| 1255 // instead just look at the size of the default display. | 1255 // instead just look at the size of the default display. |
| 1256 // | 1256 // |
| 1257 // TODO(erg): Actually doing this correctly would require pulling out xrandr, | 1257 // TODO(erg): Actually doing this correctly would require pulling out xrandr, |
| 1258 // which we don't even do in the desktop screen yet. | 1258 // which we don't even do in the desktop screen yet. |
| 1259 ::XDisplay* display = gfx::GetXDisplay(); | 1259 ::XDisplay* display = gfx::GetXDisplay(); |
| 1260 ::Screen* screen = DefaultScreenOfDisplay(display); | 1260 ::Screen* screen = DefaultScreenOfDisplay(display); |
| 1261 int width = WidthOfScreen(screen); | 1261 int width = WidthOfScreen(screen); |
| 1262 int height = HeightOfScreen(screen); | 1262 int height = HeightOfScreen(screen); |
| 1263 return window_rect.size() == gfx::Size(width, height); | 1263 return window_rect.size() == gfx::Size(width, height); |
| 1264 } | 1264 } |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 if (depth) | 1469 if (depth) |
| 1470 *depth = s_depth; | 1470 *depth = s_depth; |
| 1471 } | 1471 } |
| 1472 #endif | 1472 #endif |
| 1473 | 1473 |
| 1474 // ---------------------------------------------------------------------------- | 1474 // ---------------------------------------------------------------------------- |
| 1475 // End of x11_util_internal.h | 1475 // End of x11_util_internal.h |
| 1476 | 1476 |
| 1477 | 1477 |
| 1478 } // namespace ui | 1478 } // namespace ui |
| OLD | NEW |