mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 707092 - Add a null check and return proper constants on failure from GetTopLevelWindowActiveState, r=bbondy.
This commit is contained in:
parent
79aaa35fb5
commit
1044252614
@ -89,9 +89,11 @@ static PRInt32 GetTopLevelWindowActiveState(nsIFrame *aFrame)
|
||||
// until it finds a real window.
|
||||
nsIWidget* widget = aFrame->GetNearestWidget();
|
||||
nsWindow * window = static_cast<nsWindow*>(widget);
|
||||
if (!window)
|
||||
return mozilla::widget::themeconst::FS_INACTIVE;
|
||||
if (widget && !window->IsTopLevelWidget() &&
|
||||
!(window = window->GetParentWindow(false)))
|
||||
return false;
|
||||
return mozilla::widget::themeconst::FS_INACTIVE;
|
||||
|
||||
if (window->GetWindowHandle() == ::GetActiveWindow())
|
||||
return mozilla::widget::themeconst::FS_ACTIVE;
|
||||
|
Loading…
Reference in New Issue
Block a user