Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1497534 - Check Gtk backdrop state flag to make Firefox toplevel …
Browse files Browse the repository at this point in the history
…window look inactive, r=jhorak

Differential Revision: https://phabricator.services.mozilla.com/D10558
  • Loading branch information
stransky committed Nov 2, 2018
1 parent c656b8b commit 972d618
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion widget/gtk/nsWindow.cpp
Expand Up @@ -7480,5 +7480,10 @@ nsWindow::GetTopLevelWindowActiveState(nsIFrame *aFrame)
}
}

return (gFocusWindow == window);
GtkWidget* widget = window->GetGtkWidget();
if (widget) {
return !(gtk_widget_get_state_flags(widget) & GTK_STATE_FLAG_BACKDROP);
}

return false;
}
1 change: 1 addition & 0 deletions widget/gtk/nsWindow.h
Expand Up @@ -287,6 +287,7 @@ class nsWindow final : public nsBaseWidget
// descendant windows
GtkWidget* GetMozContainerWidget();
GdkWindow* GetGdkWindow() { return mGdkWindow; }
GtkWidget* GetGtkWidget() { return mShell; }
bool IsDestroyed() { return mIsDestroyed; }

void DispatchDragEvent(mozilla::EventMessage aMsg,
Expand Down

0 comments on commit 972d618

Please sign in to comment.