Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: ui/base/x/x11_util.cc

Issue 585553003: linux: Detect additional window managers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wrap case lines Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/x/x11_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 return false; 1184 return false;
1185 } 1185 }
1186 1186
1187 return true; 1187 return true;
1188 } 1188 }
1189 1189
1190 WindowManagerName GuessWindowManager() { 1190 WindowManagerName GuessWindowManager() {
1191 std::string name; 1191 std::string name;
1192 if (GetWindowManagerName(&name)) { 1192 if (GetWindowManagerName(&name)) {
1193 // These names are taken from the WMs' source code. 1193 // These names are taken from the WMs' source code.
1194 if (name == "awesome")
1195 return WM_AWESOME;
1194 if (name == "Blackbox") 1196 if (name == "Blackbox")
1195 return WM_BLACKBOX; 1197 return WM_BLACKBOX;
1196 if (name == "chromeos-wm")
1197 return WM_CHROME_OS;
1198 if (name == "Compiz" || name == "compiz") 1198 if (name == "Compiz" || name == "compiz")
1199 return WM_COMPIZ; 1199 return WM_COMPIZ;
1200 if (name == "e16") 1200 if (name == "e16" || name == "Enlightenment")
1201 return WM_ENLIGHTENMENT; 1201 return WM_ENLIGHTENMENT;
1202 if (name == "i3")
1203 return WM_I3;
1202 if (StartsWithASCII(name, "IceWM", true)) 1204 if (StartsWithASCII(name, "IceWM", true))
1203 return WM_ICE_WM; 1205 return WM_ICE_WM;
1206 if (name == "ion3")
1207 return WM_ION3;
1204 if (name == "KWin") 1208 if (name == "KWin")
1205 return WM_KWIN; 1209 return WM_KWIN;
1210 if (name == "matchbox")
1211 return WM_MATCHBOX;
1206 if (name == "Metacity") 1212 if (name == "Metacity")
1207 return WM_METACITY; 1213 return WM_METACITY;
1208 if (name == "Mutter (Muffin)") 1214 if (name == "Mutter (Muffin)")
1209 return WM_MUFFIN; 1215 return WM_MUFFIN;
1210 if (name == "GNOME Shell") 1216 if (name == "GNOME Shell")
1211 return WM_MUTTER; // GNOME Shell uses Mutter 1217 return WM_MUTTER; // GNOME Shell uses Mutter
1212 if (name == "Mutter") 1218 if (name == "Mutter")
1213 return WM_MUTTER; 1219 return WM_MUTTER;
1220 if (name == "notion")
1221 return WM_NOTION;
1214 if (name == "Openbox") 1222 if (name == "Openbox")
1215 return WM_OPENBOX; 1223 return WM_OPENBOX;
1224 if (name == "qtile")
1225 return WM_QTILE;
1226 if (name == "ratpoison")
1227 return WM_RATPOISON;
1228 if (name == "stumpwm")
1229 return WM_STUMPWM;
1216 if (name == "Xfwm4") 1230 if (name == "Xfwm4")
1217 return WM_XFWM4; 1231 return WM_XFWM4;
1218 } 1232 }
1219 return WM_UNKNOWN; 1233 return WM_UNKNOWN;
1220 } 1234 }
1221 1235
1222 std::string GuessWindowManagerName() { 1236 std::string GuessWindowManagerName() {
1223 std::string name; 1237 std::string name;
1224 if (GetWindowManagerName(&name)) 1238 if (GetWindowManagerName(&name))
1225 return name; 1239 return name;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 << "request_code " << static_cast<int>(error_event.request_code) << ", " 1434 << "request_code " << static_cast<int>(error_event.request_code) << ", "
1421 << "minor_code " << static_cast<int>(error_event.minor_code) 1435 << "minor_code " << static_cast<int>(error_event.minor_code)
1422 << " (" << request_str << ")"; 1436 << " (" << request_str << ")";
1423 } 1437 }
1424 1438
1425 // ---------------------------------------------------------------------------- 1439 // ----------------------------------------------------------------------------
1426 // End of x11_util_internal.h 1440 // End of x11_util_internal.h
1427 1441
1428 1442
1429 } // namespace ui 1443 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/x11_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698