зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1772432 - Remove nsWidgetInitData::mMouseTransparent. r=stransky
Instead, have the menu popup frame call SetWindowMouseTransparent (since it needs to anyways to deal with dynamic changes). Differential Revision: https://phabricator.services.mozilla.com/D148211
This commit is contained in:
Родитель
b44d1c0376
Коммит
2bd192dbd0
|
@ -333,8 +333,6 @@ nsresult nsMenuPopupFrame::CreateWidgetForView(nsView* aView) {
|
|||
nsGkAtoms::drag, eIgnoreCase)) {
|
||||
widgetData.mIsDragPopup = true;
|
||||
}
|
||||
|
||||
widgetData.mMouseTransparent = IsMouseTransparent();
|
||||
}
|
||||
|
||||
nsAutoString title;
|
||||
|
@ -395,6 +393,7 @@ nsresult nsMenuPopupFrame::CreateWidgetForView(nsView* aView) {
|
|||
|
||||
nsIWidget* widget = aView->GetWidget();
|
||||
widget->SetTransparencyMode(mode);
|
||||
widget->SetWindowMouseTransparent(IsMouseTransparent());
|
||||
widget->SetWindowShadowStyle(GetShadowStyle());
|
||||
widget->SetWindowOpacity(StyleUIReset()->mWindowOpacity);
|
||||
widget->SetWindowTransform(ComputeWidgetTransform());
|
||||
|
|
|
@ -348,7 +348,6 @@ nsresult nsCocoaWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (mWindowType == eWindowType_popup) {
|
||||
SetWindowMouseTransparent(aInitData->mMouseTransparent);
|
||||
// now we can convert widgetRect to device pixels for the window we created,
|
||||
// as the child view expects a rect expressed in the dev pix of its parent
|
||||
LayoutDeviceIntRect devRect = RoundedToInt(newBounds * GetDesktopToDeviceScale());
|
||||
|
|
|
@ -5511,7 +5511,6 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
|||
// and can be changed so we use WaylandPopupIsPermanent() to get
|
||||
// recent popup config (Bug 1728952).
|
||||
mNoAutoHide = aInitData && aInitData->mNoAutoHide;
|
||||
mMouseTransparent = aInitData && aInitData->mMouseTransparent;
|
||||
|
||||
// Popups that are not noautohide are only temporary. The are used
|
||||
// for menus and the like and disappear when another window is used.
|
||||
|
|
|
@ -105,9 +105,6 @@ struct nsWidgetInitData {
|
|||
bool mIsAnimationSuppressed = false;
|
||||
// true if the window should support an alpha channel, if available.
|
||||
bool mSupportTranslucency = false;
|
||||
// true if the window should be transparent to mouse events. Currently this is
|
||||
// only valid for eWindowType_popup widgets
|
||||
bool mMouseTransparent = false;
|
||||
bool mHasRemoteContent = false;
|
||||
bool mAlwaysOnTop = false;
|
||||
// Is PictureInPicture window
|
||||
|
|
|
@ -971,12 +971,6 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
|||
ShouldUseOffMainThreadCompositing()) {
|
||||
extendedStyle |= WS_EX_COMPOSITED;
|
||||
}
|
||||
|
||||
if (aInitData->mMouseTransparent) {
|
||||
// This flag makes the window transparent to mouse events
|
||||
mMouseTransparent = true;
|
||||
extendedStyle |= WS_EX_TRANSPARENT;
|
||||
}
|
||||
} else if (mWindowType == eWindowType_invisible) {
|
||||
// Make sure CreateWindowEx succeeds at creating a toplevel window
|
||||
style &= ~0x40000000; // WS_CHILDWINDOW
|
||||
|
|
Загрузка…
Ссылка в новой задаче