[mutter] Rename MetaMoveResizeFlags items to fit with the theme



commit c782078e00214fbd67065173c6248ae160d0817e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Dec 15 13:28:47 2014 -0800

    Rename MetaMoveResizeFlags items to fit with the theme
    
    Use a proper prefix, even if more wordy, instead of META_IS.

 src/core/constraints.c       |    8 ++++----
 src/core/window-private.h    |   10 +++++-----
 src/core/window.c            |   24 ++++++++++++------------
 src/wayland/window-wayland.c |   10 +++++-----
 src/x11/window-x11.c         |   16 ++++++++--------
 5 files changed, 34 insertions(+), 34 deletions(-)
---
diff --git a/src/core/constraints.c b/src/core/constraints.c
index 12d2583..2b1f074 100644
--- a/src/core/constraints.c
+++ b/src/core/constraints.c
@@ -328,17 +328,17 @@ setup_constraint_info (ConstraintInfo      *info,
   info->orig    = *orig;
   info->current = *new;
 
-  if (flags & META_IS_MOVE_ACTION && flags & META_IS_RESIZE_ACTION)
+  if (flags & META_MOVE_RESIZE_MOVE_ACTION && flags & META_MOVE_RESIZE_RESIZE_ACTION)
     info->action_type = ACTION_MOVE_AND_RESIZE;
-  else if (flags & META_IS_RESIZE_ACTION)
+  else if (flags & META_MOVE_RESIZE_RESIZE_ACTION)
     info->action_type = ACTION_RESIZE;
-  else if (flags & META_IS_MOVE_ACTION)
+  else if (flags & META_MOVE_RESIZE_MOVE_ACTION)
     info->action_type = ACTION_MOVE;
   else
     g_error ("BAD, BAD developer!  No treat for you!  (Fix your calls to "
              "meta_window_move_resize_internal()).\n");
 
-  info->is_user_action = (flags & META_IS_USER_ACTION);
+  info->is_user_action = (flags & META_MOVE_RESIZE_USER_ACTION);
 
   info->resize_gravity = resize_gravity;
 
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 713acd3..4e623f7 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -72,11 +72,11 @@ typedef enum {
 
 typedef enum
 {
-  META_IS_CONFIGURE_REQUEST = 1 << 0,
-  META_IS_USER_ACTION       = 1 << 1,
-  META_IS_MOVE_ACTION       = 1 << 2,
-  META_IS_RESIZE_ACTION     = 1 << 3,
-  META_IS_WAYLAND_RESIZE    = 1 << 4,
+  META_MOVE_RESIZE_CONFIGURE_REQUEST = 1 << 0,
+  META_MOVE_RESIZE_USER_ACTION       = 1 << 1,
+  META_MOVE_RESIZE_MOVE_ACTION       = 1 << 2,
+  META_MOVE_RESIZE_RESIZE_ACTION     = 1 << 3,
+  META_MOVE_RESIZE_WAYLAND_RESIZE    = 1 << 4,
 } MetaMoveResizeFlags;
 
 typedef enum
diff --git a/src/core/window.c b/src/core/window.c
index 7cf8153..83dd516 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3044,7 +3044,7 @@ meta_window_unmaximize_internal (MetaWindow        *window,
       meta_window_client_rect_to_frame_rect (window, &target_rect, &target_rect);
 
       meta_window_move_resize_internal (window,
-                                        META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION,
+                                        META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION,
                                         gravity,
                                         target_rect);
 
@@ -3614,19 +3614,19 @@ meta_window_move_resize_internal (MetaWindow          *window,
   /* The action has to be a move, a resize or the wayland client
    * acking our choice of size.
    */
-  g_assert (flags & (META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION | META_IS_WAYLAND_RESIZE));
+  g_assert (flags & (META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION | 
META_MOVE_RESIZE_WAYLAND_RESIZE));
 
   did_placement = !window->placed && window->calc_placement;
 
   /* We don't need it in the idle queue anymore. */
   meta_window_unqueue (window, META_QUEUE_MOVE_RESIZE);
 
-  if ((flags & META_IS_RESIZE_ACTION) && (flags & META_IS_MOVE_ACTION))
+  if ((flags & META_MOVE_RESIZE_RESIZE_ACTION) && (flags & META_MOVE_RESIZE_MOVE_ACTION))
     {
       /* We're both moving and resizing. Just use the passed in rect. */
       unconstrained_rect = frame_rect;
     }
-  else if ((flags & META_IS_RESIZE_ACTION))
+  else if ((flags & META_MOVE_RESIZE_RESIZE_ACTION))
     {
       /* If this is only a resize, then ignore the position given in
        * the parameters and instead calculate the new position from
@@ -3637,7 +3637,7 @@ meta_window_move_resize_internal (MetaWindow          *window,
                                           frame_rect.width,
                                           frame_rect.height);
     }
-  else if ((flags & META_IS_MOVE_ACTION))
+  else if ((flags & META_MOVE_RESIZE_MOVE_ACTION))
     {
       /* If this is only a move, then ignore the passed in size and
        * just use the existing size of the window. */
@@ -3646,7 +3646,7 @@ meta_window_move_resize_internal (MetaWindow          *window,
       unconstrained_rect.width = window->rect.width;
       unconstrained_rect.height = window->rect.height;
     }
-  else if ((flags & META_IS_WAYLAND_RESIZE))
+  else if ((flags & META_MOVE_RESIZE_WAYLAND_RESIZE))
     {
       /* This is a Wayland buffer acking our size. The new rect is
        * just the existing one we have. Ignore the passed-in rect
@@ -3657,7 +3657,7 @@ meta_window_move_resize_internal (MetaWindow          *window,
     g_assert_not_reached ();
 
   constrained_rect = unconstrained_rect;
-  if (flags & (META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION))
+  if (flags & (META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION))
     {
       MetaRectangle old_rect;
       meta_window_get_frame_rect (window, &old_rect);
@@ -3700,10 +3700,10 @@ meta_window_move_resize_internal (MetaWindow          *window,
 
   old_output_winsys_id = window->monitor->winsys_id;
 
-  meta_window_update_monitor (window, flags & META_IS_USER_ACTION);
+  meta_window_update_monitor (window, flags & META_MOVE_RESIZE_USER_ACTION);
 
   if (old_output_winsys_id != window->monitor->winsys_id &&
-      flags & META_IS_MOVE_ACTION && flags & META_IS_USER_ACTION)
+      flags & META_MOVE_RESIZE_MOVE_ACTION && flags & META_MOVE_RESIZE_USER_ACTION)
     window->preferred_output_winsys_id = window->monitor->winsys_id;
 
   if ((result & META_MOVE_RESIZE_RESULT_FRAME_SHAPE_CHANGED) && window->frame_bounds)
@@ -3741,7 +3741,7 @@ meta_window_move_frame (MetaWindow *window,
 
   g_return_if_fail (!window->override_redirect);
 
-  flags = (user_op ? META_IS_USER_ACTION : 0) | META_IS_MOVE_ACTION;
+  flags = (user_op ? META_MOVE_RESIZE_USER_ACTION : 0) | META_MOVE_RESIZE_MOVE_ACTION;
   meta_window_move_resize_internal (window, flags, NorthWestGravity, rect);
 }
 
@@ -3791,7 +3791,7 @@ meta_window_move_resize_frame (MetaWindow  *window,
 
   g_return_if_fail (!window->override_redirect);
 
-  flags = (user_op ? META_IS_USER_ACTION : 0) | META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION;
+  flags = (user_op ? META_MOVE_RESIZE_USER_ACTION : 0) | META_MOVE_RESIZE_MOVE_ACTION | 
META_MOVE_RESIZE_RESIZE_ACTION;
 
   meta_window_move_resize_internal (window, flags, NorthWestGravity, rect);
 }
@@ -3843,7 +3843,7 @@ meta_window_resize_frame_with_gravity (MetaWindow *window,
   rect.width = w;
   rect.height = h;
 
-  flags = (user_op ? META_IS_USER_ACTION : 0) | META_IS_RESIZE_ACTION;
+  flags = (user_op ? META_MOVE_RESIZE_USER_ACTION : 0) | META_MOVE_RESIZE_RESIZE_ACTION;
   meta_window_move_resize_internal (window, flags, gravity, rect);
 }
 
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index 2673db3..d37ff85 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -168,7 +168,7 @@ meta_window_wayland_move_resize_internal (MetaWindow                *window,
    * it can be for maximized or fullscreen.
    */
 
-  if (flags & META_IS_WAYLAND_RESIZE)
+  if (flags & META_MOVE_RESIZE_WAYLAND_RESIZE)
     {
       /* This is a call to wl_surface_commit(), ignore the constrained_rect and
        * update the real client size to match the buffer size.
@@ -397,7 +397,7 @@ meta_window_wayland_move_resize (MetaWindow        *window,
   window->custom_frame_extents.left = new_geom.x;
   window->custom_frame_extents.top = new_geom.y;
 
-  flags = META_IS_WAYLAND_RESIZE;
+  flags = META_MOVE_RESIZE_WAYLAND_RESIZE;
 
   /* x/y are ignored when we're doing interactive resizing */
   if (!meta_grab_op_is_resizing (window->display->grab_op))
@@ -407,7 +407,7 @@ meta_window_wayland_move_resize (MetaWindow        *window,
           rect.x = wl_window->pending_move_x;
           rect.y = wl_window->pending_move_y;
           wl_window->has_pending_move = FALSE;
-          flags |= META_IS_MOVE_ACTION;
+          flags |= META_MOVE_RESIZE_MOVE_ACTION;
         }
       else
         {
@@ -419,7 +419,7 @@ meta_window_wayland_move_resize (MetaWindow        *window,
         {
           rect.x += dx;
           rect.y += dy;
-          flags |= META_IS_MOVE_ACTION;
+          flags |= META_MOVE_RESIZE_MOVE_ACTION;
         }
     }
 
@@ -429,7 +429,7 @@ meta_window_wayland_move_resize (MetaWindow        *window,
   rect.height = new_geom.height;
 
   if (rect.width != window->rect.width || rect.height != window->rect.height)
-    flags |= META_IS_RESIZE_ACTION;
+    flags |= META_MOVE_RESIZE_RESIZE_ACTION;
 
   gravity = meta_resize_gravity_from_grab_op (window->display->grab_op);
   meta_window_move_resize_internal (window, flags, gravity, rect);
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 0d6d142..321360e 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -491,7 +491,7 @@ meta_window_apply_session_info (MetaWindow *window,
       window->size_hints.win_gravity = info->gravity;
       gravity = window->size_hints.win_gravity;
 
-      flags = META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION;
+      flags = META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION;
 
       adjust_for_gravity (window, FALSE, gravity, &rect);
       meta_window_client_rect_to_frame_rect (window, &rect, &rect);
@@ -560,7 +560,7 @@ meta_window_x11_manage (MetaWindow *window)
       rect.width = window->size_hints.width;
       rect.height = window->size_hints.height;
 
-      flags = META_IS_CONFIGURE_REQUEST | META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION;
+      flags = META_MOVE_RESIZE_CONFIGURE_REQUEST | META_MOVE_RESIZE_MOVE_ACTION | 
META_MOVE_RESIZE_RESIZE_ACTION;
 
       adjust_for_gravity (window, TRUE, gravity, &rect);
       meta_window_client_rect_to_frame_rect (window, &rect, &rect);
@@ -1056,7 +1056,7 @@ meta_window_x11_move_resize_internal (MetaWindow                *window,
 
   gboolean is_configure_request;
 
-  is_configure_request = (flags & META_IS_CONFIGURE_REQUEST) != 0;
+  is_configure_request = (flags & META_MOVE_RESIZE_CONFIGURE_REQUEST) != 0;
 
   meta_frame_calc_borders (window->frame, &borders);
 
@@ -1971,16 +1971,16 @@ meta_window_move_resize_request (MetaWindow *window,
    * windows offscreen when users don't want it if not constrained
    * (e.g. hitting a dropdown triangle in a fileselector to show more
    * options, which makes the window bigger).  Thus we do not set
-   * META_IS_USER_ACTION in flags to the
+   * META_MOVE_RESIZE_USER_ACTION in flags to the
    * meta_window_move_resize_internal() call.
    */
-  flags = META_IS_CONFIGURE_REQUEST;
+  flags = META_MOVE_RESIZE_CONFIGURE_REQUEST;
   if (value_mask & (CWX | CWY))
-    flags |= META_IS_MOVE_ACTION;
+    flags |= META_MOVE_RESIZE_MOVE_ACTION;
   if (value_mask & (CWWidth | CWHeight))
-    flags |= META_IS_RESIZE_ACTION;
+    flags |= META_MOVE_RESIZE_RESIZE_ACTION;
 
-  if (flags & (META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION))
+  if (flags & (META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION))
     {
       MetaRectangle rect, monitor_rect;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]