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 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 // Also disable custom frames for (at-least-partially-)EWMH-supporting tiling | 1025 // Also disable custom frames for (at-least-partially-)EWMH-supporting tiling |
1026 // window managers. | 1026 // window managers. |
1027 ui::WindowManagerName wm = GuessWindowManager(); | 1027 ui::WindowManagerName wm = GuessWindowManager(); |
1028 if (wm == WM_AWESOME || | 1028 if (wm == WM_AWESOME || |
1029 wm == WM_I3 || | 1029 wm == WM_I3 || |
1030 wm == WM_ION3 || | 1030 wm == WM_ION3 || |
1031 wm == WM_MATCHBOX || | 1031 wm == WM_MATCHBOX || |
1032 wm == WM_NOTION || | 1032 wm == WM_NOTION || |
1033 wm == WM_QTILE || | 1033 wm == WM_QTILE || |
1034 wm == WM_RATPOISON || | 1034 wm == WM_RATPOISON || |
1035 wm == WM_STUMPWM) | 1035 wm == WM_STUMPWM || |
| 1036 wm == WM_WMII) |
1036 return false; | 1037 return false; |
1037 | 1038 |
1038 // Handle a few more window managers that don't get along well with custom | 1039 // Handle a few more window managers that don't get along well with custom |
1039 // frames. | 1040 // frames. |
1040 if (wm == WM_ICE_WM || | 1041 if (wm == WM_ICE_WM || |
1041 wm == WM_KWIN) | 1042 wm == WM_KWIN) |
1042 return false; | 1043 return false; |
1043 | 1044 |
1044 // For everything else, use custom frames. | 1045 // For everything else, use custom frames. |
1045 return true; | 1046 return true; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 if (name == "notion") | 1253 if (name == "notion") |
1253 return WM_NOTION; | 1254 return WM_NOTION; |
1254 if (name == "Openbox") | 1255 if (name == "Openbox") |
1255 return WM_OPENBOX; | 1256 return WM_OPENBOX; |
1256 if (name == "qtile") | 1257 if (name == "qtile") |
1257 return WM_QTILE; | 1258 return WM_QTILE; |
1258 if (name == "ratpoison") | 1259 if (name == "ratpoison") |
1259 return WM_RATPOISON; | 1260 return WM_RATPOISON; |
1260 if (name == "stumpwm") | 1261 if (name == "stumpwm") |
1261 return WM_STUMPWM; | 1262 return WM_STUMPWM; |
| 1263 if (name == "wmii") |
| 1264 return WM_WMII; |
1262 if (name == "Xfwm4") | 1265 if (name == "Xfwm4") |
1263 return WM_XFWM4; | 1266 return WM_XFWM4; |
1264 } | 1267 } |
1265 return WM_UNKNOWN; | 1268 return WM_UNKNOWN; |
1266 } | 1269 } |
1267 | 1270 |
1268 std::string GuessWindowManagerName() { | 1271 std::string GuessWindowManagerName() { |
1269 std::string name; | 1272 std::string name; |
1270 if (GetWindowManagerName(&name)) | 1273 if (GetWindowManagerName(&name)) |
1271 return name; | 1274 return name; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1469 << "request_code " << static_cast<int>(error_event.request_code) << ", " | 1472 << "request_code " << static_cast<int>(error_event.request_code) << ", " |
1470 << "minor_code " << static_cast<int>(error_event.minor_code) | 1473 << "minor_code " << static_cast<int>(error_event.minor_code) |
1471 << " (" << request_str << ")"; | 1474 << " (" << request_str << ")"; |
1472 } | 1475 } |
1473 | 1476 |
1474 // ---------------------------------------------------------------------------- | 1477 // ---------------------------------------------------------------------------- |
1475 // End of x11_util_internal.h | 1478 // End of x11_util_internal.h |
1476 | 1479 |
1477 | 1480 |
1478 } // namespace ui | 1481 } // namespace ui |
OLD | NEW |