mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
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
@ -615,8 +615,6 @@ void nsWindow::Destroy() {
|
||||
|
||||
DestroyLayerManager();
|
||||
|
||||
mSurfaceProvider.CleanupResources();
|
||||
|
||||
g_signal_handlers_disconnect_by_data(gtk_settings_get_default(), this);
|
||||
|
||||
if (mIMContext) {
|
||||
@ -4123,6 +4121,16 @@ void nsWindow::OnUnmap() {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user