forked from mirrors/gecko-dev
Bug 1882021 [Linux/X11] Clean up XWindow from GtkCompositorWidget and disable rendering if nsWindow is unmapped r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D203104
This commit is contained in:
parent
2960b1b38e
commit
506151ac79
1 changed files with 10 additions and 2 deletions
|
|
@ -615,8 +615,6 @@ void nsWindow::Destroy() {
|
||||||
|
|
||||||
DestroyLayerManager();
|
DestroyLayerManager();
|
||||||
|
|
||||||
mSurfaceProvider.CleanupResources();
|
|
||||||
|
|
||||||
g_signal_handlers_disconnect_by_data(gtk_settings_get_default(), this);
|
g_signal_handlers_disconnect_by_data(gtk_settings_get_default(), this);
|
||||||
|
|
||||||
if (mIMContext) {
|
if (mIMContext) {
|
||||||
|
|
@ -4123,6 +4121,16 @@ void nsWindow::OnUnmap() {
|
||||||
mSourceDragContext = nullptr;
|
mSourceDragContext = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We don't have valid XWindow any more,
|
||||||
|
// so clear stored ones at GtkCompositorWidget() for OMTC rendering
|
||||||
|
// and mSurfaceProvider for legacy rendering.
|
||||||
|
if (GdkIsX11Display()) {
|
||||||
|
mSurfaceProvider.CleanupResources();
|
||||||
|
if (mCompositorWidgetDelegate) {
|
||||||
|
mCompositorWidgetDelegate->DisableRendering();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsWindow::OnSizeAllocate(GtkAllocation* aAllocation) {
|
void nsWindow::OnSizeAllocate(GtkAllocation* aAllocation) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue