[mutter] wayland/xdg-shell: Scope variable better
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/xdg-shell: Scope variable better
- Date: Mon, 9 Dec 2019 09:19:03 +0000 (UTC)
commit aef865afc4cc1be8e5378c802792ab1ec9cea4f6
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Oct 22 16:04:27 2018 +0200
wayland/xdg-shell: Scope variable better
A window geometry rectangle was declared in the wrong scope. Both
xdg-shell and legacy xdg-shell had the same issue.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/907
src/wayland/meta-wayland-legacy-xdg-shell.c | 3 ++-
src/wayland/meta-wayland-xdg-shell.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-legacy-xdg-shell.c b/src/wayland/meta-wayland-legacy-xdg-shell.c
index 0311a264a..d9f68b3d1 100644
--- a/src/wayland/meta-wayland-legacy-xdg-shell.c
+++ b/src/wayland/meta-wayland-legacy-xdg-shell.c
@@ -662,7 +662,6 @@ meta_wayland_zxdg_toplevel_v6_commit (MetaWaylandSurfaceRole *surface_role,
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (surface_role);
MetaWindow *window;
- MetaRectangle window_geometry;
MetaRectangle old_geometry;
gboolean geometry_changed;
@@ -696,6 +695,8 @@ meta_wayland_zxdg_toplevel_v6_commit (MetaWaylandSurfaceRole *surface_role,
if (geometry_changed || meta_window_wayland_needs_move_resize (window))
{
+ MetaRectangle window_geometry;
+
window_geometry =
meta_wayland_zxdg_surface_v6_get_window_geometry (xdg_surface);
meta_window_wayland_move_resize (window,
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
index da983127c..672659f50 100644
--- a/src/wayland/meta-wayland-xdg-shell.c
+++ b/src/wayland/meta-wayland-xdg-shell.c
@@ -685,7 +685,6 @@ meta_wayland_xdg_toplevel_commit (MetaWaylandSurfaceRole *surface_role,
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (surface_role);
MetaWindow *window;
- MetaRectangle window_geometry;
MetaRectangle old_geometry;
gboolean geometry_changed;
@@ -726,6 +725,8 @@ meta_wayland_xdg_toplevel_commit (MetaWaylandSurfaceRole *surface_role,
if (geometry_changed || meta_window_wayland_needs_move_resize (window))
{
+ MetaRectangle window_geometry;
+
window_geometry = meta_wayland_xdg_surface_get_window_geometry (xdg_surface);
meta_window_wayland_move_resize (window,
&xdg_surface_priv->acked_configure_serial,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]