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

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

Issue 2838753002: x11: Use opaque window for dnd without composite. (Closed)
Patch Set: Created 3 years, 8 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') | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | 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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 return WM_OTHER; 1178 return WM_OTHER;
1179 } 1179 }
1180 1180
1181 std::string GuessWindowManagerName() { 1181 std::string GuessWindowManagerName() {
1182 std::string name; 1182 std::string name;
1183 if (GetWindowManagerName(&name)) 1183 if (GetWindowManagerName(&name))
1184 return name; 1184 return name;
1185 return "Unknown"; 1185 return "Unknown";
1186 } 1186 }
1187 1187
1188 bool IsCompositingManagerPresent() {
1189 static bool is_compositing_manager_present =
1190 XGetSelectionOwner(gfx::GetXDisplay(), GetAtom("_NET_WM_CM_S0")) != None;
1191 return is_compositing_manager_present;
1192 }
1193
1188 void SetDefaultX11ErrorHandlers() { 1194 void SetDefaultX11ErrorHandlers() {
1189 SetX11ErrorHandlers(NULL, NULL); 1195 SetX11ErrorHandlers(NULL, NULL);
1190 } 1196 }
1191 1197
1192 bool IsX11WindowFullScreen(XID window) { 1198 bool IsX11WindowFullScreen(XID window) {
1193 // If _NET_WM_STATE_FULLSCREEN is in _NET_SUPPORTED, use the presence or 1199 // If _NET_WM_STATE_FULLSCREEN is in _NET_SUPPORTED, use the presence or
1194 // absence of _NET_WM_STATE_FULLSCREEN in _NET_WM_STATE to determine 1200 // absence of _NET_WM_STATE_FULLSCREEN in _NET_WM_STATE to determine
1195 // whether we're fullscreen. 1201 // whether we're fullscreen.
1196 XAtom fullscreen_atom = GetAtom("_NET_WM_STATE_FULLSCREEN"); 1202 XAtom fullscreen_atom = GetAtom("_NET_WM_STATE_FULLSCREEN");
1197 if (WmSupportsHint(fullscreen_atom)) { 1203 if (WmSupportsHint(fullscreen_atom)) {
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 return colormap_; 1483 return colormap_;
1478 } 1484 }
1479 1485
1480 #endif 1486 #endif
1481 1487
1482 // ---------------------------------------------------------------------------- 1488 // ----------------------------------------------------------------------------
1483 // End of x11_util_internal.h 1489 // End of x11_util_internal.h
1484 1490
1485 1491
1486 } // namespace ui 1492 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/x11_util.h ('k') | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698