Implement Activate instead of CanFocus
This commit is contained in:
parent
bda8af8dd3
commit
db79f4f450
3 changed files with 10 additions and 9 deletions
|
@ -205,7 +205,7 @@ NativeWindowViews::NativeWindowViews(
|
||||||
if (parent)
|
if (parent)
|
||||||
params.parent = parent->GetNativeWindow();
|
params.parent = parent->GetNativeWindow();
|
||||||
|
|
||||||
params.native_widget = new AtomDeskopNativeWidgetAura(window_.get(), this);
|
params.native_widget = new AtomDesktopNativeWidgetAura(window_.get(), this);
|
||||||
atom_desktop_window_tree_host_win_ = new AtomDesktopWindowTreeHostWin(
|
atom_desktop_window_tree_host_win_ = new AtomDesktopWindowTreeHostWin(
|
||||||
this,
|
this,
|
||||||
window_.get(),
|
window_.get(),
|
||||||
|
|
|
@ -6,15 +6,16 @@
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
AtomDeskopNativeWidgetAura::AtomDeskopNativeWidgetAura(
|
AtomDesktopNativeWidgetAura::AtomDesktopNativeWidgetAura(
|
||||||
views::internal::NativeWidgetDelegate* delegate,
|
views::internal::NativeWidgetDelegate* delegate,
|
||||||
NativeWindowViews* window)
|
NativeWindowViews* window)
|
||||||
: views::DesktopNativeWidgetAura(delegate),
|
: views::DesktopNativeWidgetAura(delegate),
|
||||||
window_(window) {
|
window_(window) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AtomDeskopNativeWidgetAura::CanFocus() {
|
void AtomDesktopNativeWidgetAura::Activate() {
|
||||||
return window_->IsVisible();
|
if (window_->IsVisible())
|
||||||
|
views::DesktopNativeWidgetAura::Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
|
@ -10,18 +10,18 @@
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
class AtomDeskopNativeWidgetAura : public views::DesktopNativeWidgetAura {
|
class AtomDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura {
|
||||||
public:
|
public:
|
||||||
AtomDeskopNativeWidgetAura(views::internal::NativeWidgetDelegate* delegate,
|
AtomDesktopNativeWidgetAura(views::internal::NativeWidgetDelegate* delegate,
|
||||||
NativeWindowViews* window);
|
NativeWindowViews* window);
|
||||||
|
|
||||||
// aura::WindowDelegate
|
// internal::NativeWidgetPrivate:
|
||||||
bool CanFocus() override;
|
void Activate() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NativeWindowViews* window_;
|
NativeWindowViews* window_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(AtomDeskopNativeWidgetAura);
|
DISALLOW_COPY_AND_ASSIGN(AtomDesktopNativeWidgetAura);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue