1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
diff -up firefox-74.0/widget/gtk/mozcontainer.cpp.mozilla-1609538 firefox-74.0/widget/gtk/mozcontainer.cpp
--- firefox-74.0/widget/gtk/mozcontainer.cpp.mozilla-1609538 2020-03-02 23:04:56.000000000 +0100
+++ firefox-74.0/widget/gtk/mozcontainer.cpp 2020-03-04 12:26:05.561668537 +0100
@@ -164,13 +164,15 @@ void moz_container_move(MozContainer* co
// wl_subsurface_set_position is actually property of parent surface
// which is effective when parent surface is commited.
- wl_surface* parent_surface =
- moz_gtk_widget_get_wl_surface(GTK_WIDGET(container));
- if (parent_surface) {
- wl_subsurface_set_position(container->subsurface, container->subsurface_dx,
- container->subsurface_dy);
- wl_surface_commit(parent_surface);
- container->surface_position_needs_update = false;
+ wl_subsurface_set_position(container->subsurface, container->subsurface_dx,
+ container->subsurface_dy);
+ container->surface_position_needs_update = false;
+
+ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container));
+ if (window) {
+ GdkRectangle rect = (GdkRectangle){.width = gdk_window_get_width(window),
+ .height = gdk_window_get_height(window)};
+ gdk_window_invalidate_rect(window, &rect, false);
}
}
@@ -575,11 +577,15 @@ static void moz_container_set_opaque_reg
gtk_widget_get_allocation(GTK_WIDGET(container), &allocation);
// Set region to mozcontainer which does not have any offset
- wl_region* region =
- CreateOpaqueRegionWayland(0, 0, allocation.width, allocation.height,
- container->opaque_region_subtract_corners);
- wl_surface_set_opaque_region(container->surface, region);
- wl_region_destroy(region);
+ if (container->opaque_region_subtract_corners) {
+ wl_region* region =
+ CreateOpaqueRegionWayland(0, 0, allocation.width, allocation.height,
+ container->opaque_region_subtract_corners);
+ wl_surface_set_opaque_region(container->surface, region);
+ wl_region_destroy(region);
+ } else {
+ wl_surface_set_opaque_region(container->surface, nullptr);
+ }
}
struct wl_surface* moz_container_get_wl_surface(MozContainer* container) {
diff -up firefox-74.0/widget/gtk/nsWindow.cpp.mozilla-1609538 firefox-74.0/widget/gtk/nsWindow.cpp
--- firefox-74.0/widget/gtk/nsWindow.cpp.mozilla-1609538 2020-03-04 12:23:34.365414768 +0100
+++ firefox-74.0/widget/gtk/nsWindow.cpp 2020-03-04 12:23:34.368414793 +0100
@@ -4866,10 +4866,14 @@ void nsWindow::UpdateTopLevelOpaqueRegio
return;
}
- wl_region* region =
- CreateOpaqueRegionWayland(x, y, width, height, aSubtractCorners);
- wl_surface_set_opaque_region(surface, region);
- wl_region_destroy(region);
+ if (!aSubtractCorners) {
+ wl_region* region =
+ CreateOpaqueRegionWayland(x, y, width, height, aSubtractCorners);
+ wl_surface_set_opaque_region(surface, region);
+ wl_region_destroy(region);
+ } else {
+ wl_surface_set_opaque_region(surface, nullptr);
+ }
GdkWindow* window = gtk_widget_get_window(mShell);
if (window) {
|