summaryrefslogtreecommitdiff
path: root/chromium/ui/views/widget/widget_utils.cc
blob: 94539dafdd03ee8e51f160d8af0d03ff59f59184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/views/widget/widget_utils.h"

#include "ui/views/widget/widget.h"

#if defined(USE_AURA)
#include "ui/aura/window.h"
#endif

namespace views {

gfx::NativeWindow GetRootWindow(const Widget* widget) {
  gfx::NativeWindow window = widget->GetNativeWindow();
#if defined(USE_AURA)
  window = window->GetRootWindow();
#endif
  return window;
}

}  // namespace views