Fix tooltip can not show outside window
This commit is contained in:
parent
6ca7767f09
commit
c205ab0944
1 changed files with 7 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
||||||
#include "browser/views/views_delegate.h"
|
#include "browser/views/views_delegate.h"
|
||||||
|
|
||||||
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
|
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
|
||||||
|
#include "ui/views/widget/native_widget_aura.h"
|
||||||
|
|
||||||
#if defined(OS_LINUX)
|
#if defined(OS_LINUX)
|
||||||
#include "ui/views/linux_ui/linux_ui.h"
|
#include "ui/views/linux_ui/linux_ui.h"
|
||||||
|
@ -89,10 +90,13 @@ void ViewsDelegate::OnBeforeWidgetInit(
|
||||||
if (params->native_widget)
|
if (params->native_widget)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// The native_widget is required when using aura.
|
if (params->parent &&
|
||||||
if (params->type == views::Widget::InitParams::TYPE_MENU ||
|
params->type != views::Widget::InitParams::TYPE_MENU &&
|
||||||
(params->parent == NULL && params->context == NULL && !params->child))
|
params->type != views::Widget::InitParams::TYPE_TOOLTIP) {
|
||||||
|
params->native_widget = new views::NativeWidgetAura(delegate);
|
||||||
|
} else {
|
||||||
params->native_widget = new views::DesktopNativeWidgetAura(delegate);
|
params->native_widget = new views::DesktopNativeWidgetAura(delegate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue