[mutter] meta: Add META namespace to macros



commit a8155a04713704034d0f26ff1ac4b8446ddbb68f
Author: Robert Mader <robert mader posteo de>
Date:   Wed Oct 2 20:23:41 2019 +0200

    meta: Add META namespace to macros
    
    To silence warnings during GIR generation.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/822

 src/backends/meta-monitor-manager.c |  2 +-
 src/core/display.c                  |  4 ++--
 src/core/stack.c                    |  2 +-
 src/meta/common.h                   |  4 ++--
 src/ui/frames.c                     | 12 ++++++------
 5 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index 41036ca2a..01c7c7a65 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -2493,7 +2493,7 @@ meta_monitor_manager_get_logical_monitor_at (MetaMonitorManager *manager,
     {
       MetaLogicalMonitor *logical_monitor = l->data;
 
-      if (POINT_IN_RECT (x, y, logical_monitor->rect))
+      if (META_POINT_IN_RECT (x, y, logical_monitor->rect))
         return logical_monitor;
     }
 
diff --git a/src/core/display.c b/src/core/display.c
index 82c9cd108..c2a48492c 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1071,7 +1071,7 @@ meta_get_display (void)
 static inline gboolean
 grab_op_is_window (MetaGrabOp op)
 {
-  return GRAB_OP_GET_BASE_TYPE (op) == META_GRAB_OP_WINDOW_BASE;
+  return META_GRAB_OP_GET_BASE_TYPE (op) == META_GRAB_OP_WINDOW_BASE;
 }
 
 gboolean
@@ -1674,7 +1674,7 @@ get_first_freefloating_window (MetaWindow *window)
 static MetaEventRoute
 get_event_route_from_grab_op (MetaGrabOp op)
 {
-  switch (GRAB_OP_GET_BASE_TYPE (op))
+  switch (META_GRAB_OP_GET_BASE_TYPE (op))
     {
     case META_GRAB_OP_NONE:
       /* begin_grab_op shouldn't be called with META_GRAB_OP_NONE. */
diff --git a/src/core/stack.c b/src/core/stack.c
index 7d144ee7d..1a05de264 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -1146,7 +1146,7 @@ window_contains_point (MetaWindow *window,
 
   meta_window_get_frame_rect (window, &rect);
 
-  return POINT_IN_RECT (root_x, root_y, rect);
+  return META_POINT_IN_RECT (root_x, root_y, rect);
 }
 
 static gboolean
diff --git a/src/meta/common.h b/src/meta/common.h
index 670097bff..294dfe25d 100644
--- a/src/meta/common.h
+++ b/src/meta/common.h
@@ -147,7 +147,7 @@ enum
   _WGO_N = META_GRAB_OP_WINDOW_DIR_NORTH,
 };
 
-#define GRAB_OP_GET_BASE_TYPE(op) (op & 0x00FF)
+#define META_GRAB_OP_GET_BASE_TYPE(op) (op & 0x00FF)
 
 typedef enum
 {
@@ -507,7 +507,7 @@ void meta_frame_borders_clear (MetaFrameBorders *self);
 
 /************************************************************/
 
-#define POINT_IN_RECT(xcoord, ycoord, rect) \
+#define META_POINT_IN_RECT(xcoord, ycoord, rect) \
  ((xcoord) >= (rect).x &&                   \
   (xcoord) <  ((rect).x + (rect).width) &&  \
   (ycoord) >= (rect).y &&                   \
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 33dfaa071..ecb38a9f7 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -1733,18 +1733,18 @@ get_control (MetaUIFrame *frame, int root_x, int root_y)
   y = root_y - win_y;
 
   meta_window_get_client_area_rect (frame->meta_window, &client);
-  if (POINT_IN_RECT (x, y, client))
+  if (META_POINT_IN_RECT (x, y, client))
     return META_FRAME_CONTROL_CLIENT_AREA;
 
   meta_ui_frame_calc_geometry (frame, &fgeom);
 
-  if (POINT_IN_RECT (x, y, fgeom.close_rect.clickable))
+  if (META_POINT_IN_RECT (x, y, fgeom.close_rect.clickable))
     return META_FRAME_CONTROL_DELETE;
 
-  if (POINT_IN_RECT (x, y, fgeom.min_rect.clickable))
+  if (META_POINT_IN_RECT (x, y, fgeom.min_rect.clickable))
     return META_FRAME_CONTROL_MINIMIZE;
 
-  if (POINT_IN_RECT (x, y, fgeom.menu_rect.clickable))
+  if (META_POINT_IN_RECT (x, y, fgeom.menu_rect.clickable))
     return META_FRAME_CONTROL_MENU;
 
   flags = meta_frame_get_flags (frame->meta_window->frame);
@@ -1757,7 +1757,7 @@ get_control (MetaUIFrame *frame, int root_x, int root_y)
   if (flags & META_FRAME_TILED_LEFT || flags & META_FRAME_TILED_RIGHT)
     has_vert = has_horiz = FALSE;
 
-  if (POINT_IN_RECT (x, y, fgeom.title_rect))
+  if (META_POINT_IN_RECT (x, y, fgeom.title_rect))
     {
       if (has_vert && y <= TOP_RESIZE_HEIGHT && has_north_resize)
         return META_FRAME_CONTROL_RESIZE_N;
@@ -1765,7 +1765,7 @@ get_control (MetaUIFrame *frame, int root_x, int root_y)
         return META_FRAME_CONTROL_TITLE;
     }
 
-  if (POINT_IN_RECT (x, y, fgeom.max_rect.clickable))
+  if (META_POINT_IN_RECT (x, y, fgeom.max_rect.clickable))
     {
       if (flags & META_FRAME_MAXIMIZED)
         return META_FRAME_CONTROL_UNMAXIMIZE;


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