diff options
author | Jonas Ã…dahl <jadahl@gmail.com> | 2022-09-27 16:54:29 +0200 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-10-10 18:16:51 +0000 |
commit | 5be8c5074659b3501821f285c21e91f4e2b7b126 (patch) | |
tree | b9593cacec7d3bc43e804fc47c653c8a60c4e3c9 /src | |
parent | c6b4b33570cbe18514c3b87c3708541f69b31508 (diff) | |
download | mutter-5be8c5074659b3501821f285c21e91f4e2b7b126.tar.gz |
window-actor: Rename confusing variable name
A "window rect" in most places refers to the rectangle the window
corresponds to when it comes to window management. MetaWindow::rect also
refers to this window management related rectangle. However in the
geometry sync functions, it instead called what was to be the rectangle
the actor should have as "window rect", which is arguably a bit
confusing. Fix this by renaming it "actor_rect" so that it becomes clear
that it's the rectangle the actor should get on the stage.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2338>
Diffstat (limited to 'src')
-rw-r--r-- | src/compositor/meta-window-actor.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 650fe12ef..b39bfc632 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -843,17 +843,17 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self, { MetaWindowActorPrivate *priv = meta_window_actor_get_instance_private (self); - MetaRectangle window_rect; + MetaRectangle actor_rect; ClutterActor *actor = CLUTTER_ACTOR (self); MetaWindowActorChanges changes = 0; - meta_window_get_buffer_rect (priv->window, &window_rect); + meta_window_get_buffer_rect (priv->window, &actor_rect); /* When running as a Wayland compositor we catch size changes when new * buffers are attached */ if (META_IS_SURFACE_ACTOR_X11 (priv->surface)) meta_surface_actor_x11_set_size (META_SURFACE_ACTOR_X11 (priv->surface), - window_rect.width, window_rect.height); + actor_rect.width, actor_rect.height); /* Normally we want freezing a window to also freeze its position; this allows * windows to atomically move and resize together, either under app control, @@ -878,10 +878,10 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self, old_width = box.x2 - box.x1; old_height = box.y2 - box.y1; - if (old_x != window_rect.x || old_y != window_rect.y) + if (old_x != actor_rect.x || old_y != actor_rect.y) changes |= META_WINDOW_ACTOR_CHANGE_POSITION; - if (old_width != window_rect.width || old_height != window_rect.height) + if (old_width != actor_rect.width || old_height != actor_rect.height) changes |= META_WINDOW_ACTOR_CHANGE_SIZE; } else @@ -890,10 +890,10 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self, } if (changes & META_WINDOW_ACTOR_CHANGE_POSITION) - clutter_actor_set_position (actor, window_rect.x, window_rect.y); + clutter_actor_set_position (actor, actor_rect.x, actor_rect.y); if (changes & META_WINDOW_ACTOR_CHANGE_SIZE) - clutter_actor_set_size (actor, window_rect.width, window_rect.height); + clutter_actor_set_size (actor, actor_rect.width, actor_rect.height); return changes; } |