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

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

Issue 2230183002: ui: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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/window_tracker_template.h ('k') | ui/chromeos/ime/candidate_window_view.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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 XWindowAttributes win_attributes; 550 XWindowAttributes win_attributes;
551 if (!XGetWindowAttributes(gfx::GetXDisplay(), window, &win_attributes)) 551 if (!XGetWindowAttributes(gfx::GetXDisplay(), window, &win_attributes))
552 return false; 552 return false;
553 if (win_attributes.map_state != IsViewable) 553 if (win_attributes.map_state != IsViewable)
554 return false; 554 return false;
555 555
556 // Minimized windows are not visible. 556 // Minimized windows are not visible.
557 std::vector<XAtom> wm_states; 557 std::vector<XAtom> wm_states;
558 if (GetAtomArrayProperty(window, "_NET_WM_STATE", &wm_states)) { 558 if (GetAtomArrayProperty(window, "_NET_WM_STATE", &wm_states)) {
559 XAtom hidden_atom = GetAtom("_NET_WM_STATE_HIDDEN"); 559 XAtom hidden_atom = GetAtom("_NET_WM_STATE_HIDDEN");
560 if (ContainsValue(wm_states, hidden_atom)) 560 if (base::ContainsValue(wm_states, hidden_atom))
561 return false; 561 return false;
562 } 562 }
563 563
564 // Some compositing window managers (notably kwin) do not actually unmap 564 // Some compositing window managers (notably kwin) do not actually unmap
565 // windows on desktop switch, so we also must check the current desktop. 565 // windows on desktop switch, so we also must check the current desktop.
566 int window_desktop, current_desktop; 566 int window_desktop, current_desktop;
567 return (!GetWindowDesktop(window, &window_desktop) || 567 return (!GetWindowDesktop(window, &window_desktop) ||
568 !GetCurrentDesktop(&current_desktop) || 568 !GetCurrentDesktop(&current_desktop) ||
569 window_desktop == kAllDesktops || 569 window_desktop == kAllDesktops ||
570 window_desktop == current_desktop); 570 window_desktop == current_desktop);
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 if (depth) 1462 if (depth)
1463 *depth = s_depth; 1463 *depth = s_depth;
1464 } 1464 }
1465 #endif 1465 #endif
1466 1466
1467 // ---------------------------------------------------------------------------- 1467 // ----------------------------------------------------------------------------
1468 // End of x11_util_internal.h 1468 // End of x11_util_internal.h
1469 1469
1470 1470
1471 } // namespace ui 1471 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/window_tracker_template.h ('k') | ui/chromeos/ime/candidate_window_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698