Include CanFocus on Windows and map to state
This commit is contained in:
parent
0ac3969c6a
commit
be79417a03
6 changed files with 63 additions and 5 deletions
20
atom/browser/ui/win/atom_desktop_native_widget_aura.cc
Normal file
20
atom/browser/ui/win/atom_desktop_native_widget_aura.cc
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright (c) 2017 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "atom/browser/ui/win/atom_desktop_native_widget_aura.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
AtomDeskopNativeWidgetAura::AtomDeskopNativeWidgetAura(
|
||||
views::internal::NativeWidgetDelegate* delegate,
|
||||
NativeWindowViews* window)
|
||||
: views::DesktopNativeWidgetAura(delegate),
|
||||
window_(window) {
|
||||
}
|
||||
|
||||
bool AtomDeskopNativeWidgetAura::CanFocus() {
|
||||
return window_->CanFocus();
|
||||
}
|
||||
|
||||
} // namespace atom
|
29
atom/browser/ui/win/atom_desktop_native_widget_aura.h
Normal file
29
atom/browser/ui/win/atom_desktop_native_widget_aura.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Copyright (c) 2017 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ATOM_BROWSER_UI_WIN_ATOM_DESKTOP_NATIVE_WIDGET_AURA_H_
|
||||
#define ATOM_BROWSER_UI_WIN_ATOM_DESKTOP_NATIVE_WIDGET_AURA_H_
|
||||
|
||||
#include "atom/browser/native_window_views.h"
|
||||
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
class AtomDeskopNativeWidgetAura : public views::DesktopNativeWidgetAura {
|
||||
public:
|
||||
AtomDeskopNativeWidgetAura(views::internal::NativeWidgetDelegate* delegate,
|
||||
NativeWindowViews* window);
|
||||
|
||||
// aura::WindowDelegate
|
||||
bool CanFocus() override;
|
||||
|
||||
private:
|
||||
NativeWindowViews* window_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomDeskopNativeWidgetAura);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
|
||||
#endif // ATOM_BROWSER_UI_WIN_ATOM_DESKTOP_NATIVE_WIDGET_AURA_H_
|
Loading…
Add table
Add a link
Reference in a new issue