summaryrefslogtreecommitdiffstats
path: root/widget/gtk/MozContainer.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /widget/gtk/MozContainer.cpp
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/gtk/MozContainer.cpp')
-rw-r--r--widget/gtk/MozContainer.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/widget/gtk/MozContainer.cpp b/widget/gtk/MozContainer.cpp
index 775ae0488f..446dc97a66 100644
--- a/widget/gtk/MozContainer.cpp
+++ b/widget/gtk/MozContainer.cpp
@@ -87,19 +87,18 @@ void moz_container_class_init(MozContainerClass* klass) {
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass); */
GtkWidgetClass* widget_class = GTK_WIDGET_CLASS(klass);
+ widget_class->map = moz_container_map;
widget_class->realize = moz_container_realize;
widget_class->unrealize = moz_container_unrealize;
widget_class->destroy = moz_container_destroy;
#ifdef MOZ_WAYLAND
if (mozilla::widget::GdkIsWaylandDisplay()) {
- widget_class->map = moz_container_wayland_map;
widget_class->size_allocate = moz_container_wayland_size_allocate;
widget_class->map_event = moz_container_wayland_map_event;
widget_class->unmap = moz_container_wayland_unmap;
} else {
#endif
- widget_class->map = moz_container_map;
widget_class->size_allocate = moz_container_size_allocate;
widget_class->unmap = moz_container_unmap;
#ifdef MOZ_WAYLAND
@@ -130,6 +129,10 @@ void moz_container_map(GtkWidget* widget) {
if (gtk_widget_get_has_window(widget)) {
gdk_window_show(gtk_widget_get_window(widget));
}
+
+ // Enable rendering to nsWindow/MozContainer
+ nsWindow* window = moz_container_get_nsWindow(MOZ_CONTAINER(widget));
+ window->OnMap();
}
void moz_container_unmap(GtkWidget* widget) {
@@ -138,9 +141,9 @@ void moz_container_unmap(GtkWidget* widget) {
LOGCONTAINER(("moz_container_unmap() [%p]",
(void*)moz_container_get_nsWindow(MOZ_CONTAINER(widget))));
- // Disable rendering to MozContainer before we unmap it.
+ // Disable rendering to nsWindow/MozContainer before we really unmap it.
nsWindow* window = moz_container_get_nsWindow(MOZ_CONTAINER(widget));
- window->DisableRendering();
+ window->OnUnmap();
gtk_widget_set_mapped(widget, FALSE);