From b0a73f04b7c99d648c6563d35a0b8e23d6a40851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 3 Mar 2021 17:35:26 +0100 Subject: [PATCH] main: Move rect related macro to util-private.h No reason that it should be in main-private.h, lets place it in util-private.h. This also mean we can remove main-private.h. Part-of: --- src/backends/meta-monitor-manager.c | 1 - src/backends/meta-viewport-info.c | 1 - src/core/main-private.h | 6 ------ src/core/stack.c | 1 - src/core/util-private.h | 6 ++++++ src/ui/frames.h | 1 - 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c index a75da9329..6fa4abed9 100644 --- a/src/backends/meta-monitor-manager.c +++ b/src/backends/meta-monitor-manager.c @@ -56,7 +56,6 @@ #include "backends/meta-virtual-monitor.h" #include "backends/x11/meta-monitor-manager-xrandr.h" #include "clutter/clutter.h" -#include "core/main-private.h" #include "core/util-private.h" #include "meta/main.h" #include "meta/meta-x11-errors.h" diff --git a/src/backends/meta-viewport-info.c b/src/backends/meta-viewport-info.c index db7a564c8..1adef8759 100644 --- a/src/backends/meta-viewport-info.c +++ b/src/backends/meta-viewport-info.c @@ -23,7 +23,6 @@ #include "config.h" #include "backends/meta-viewport-info.h" -#include "core/main-private.h" #include "core/boxes-private.h" typedef struct _ViewInfo ViewInfo; diff --git a/src/core/main-private.h b/src/core/main-private.h index 54d81d93e..1ed094d50 100644 --- a/src/core/main-private.h +++ b/src/core/main-private.h @@ -37,12 +37,6 @@ typedef enum _MetaX11DisplayPolicy META_X11_DISPLAY_POLICY_DISABLED, } MetaX11DisplayPolicy; -#define META_POINT_IN_RECT(xcoord, ycoord, rect) \ - ((xcoord) >= (rect).x && \ - (xcoord) < ((rect).x + (rect).width) && \ - (ycoord) >= (rect).y && \ - (ycoord) < ((rect).y + (rect).height)) - #define META_GRAB_OP_GET_BASE_TYPE(op) (op & 0x00FF) META_EXPORT_TEST diff --git a/src/core/stack.c b/src/core/stack.c index e1e73867d..62b8954e8 100644 --- a/src/core/stack.c +++ b/src/core/stack.c @@ -32,7 +32,6 @@ #include "backends/meta-logical-monitor.h" #include "cogl/cogl.h" #include "core/frame.h" -#include "core/main-private.h" #include "core/meta-workspace-manager-private.h" #include "core/window-private.h" #include "meta/group.h" diff --git a/src/core/util-private.h b/src/core/util-private.h index 53e2cfab5..010de5831 100644 --- a/src/core/util-private.h +++ b/src/core/util-private.h @@ -45,4 +45,10 @@ char * meta_generate_random_id (GRand *rand, void meta_init_debug_utils (void); +#define META_POINT_IN_RECT(xcoord, ycoord, rect) \ + ((xcoord) >= (rect).x && \ + (xcoord) < ((rect).x + (rect).width) && \ + (ycoord) >= (rect).y && \ + (ycoord) < ((rect).y + (rect).height)) + #endif diff --git a/src/ui/frames.h b/src/ui/frames.h index 73dee1737..d81be1c72 100644 --- a/src/ui/frames.h +++ b/src/ui/frames.h @@ -25,7 +25,6 @@ #include #include -#include "core/main-private.h" #include "meta/common.h" #include "meta/types.h" #include "ui/theme-private.h"