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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1833>
This commit is contained in:
Jonas Ådahl 2021-03-03 17:35:26 +01:00 committed by Marge Bot
parent c6329807c2
commit b0a73f04b7
6 changed files with 6 additions and 10 deletions

View File

@ -56,7 +56,6 @@
#include "backends/meta-virtual-monitor.h" #include "backends/meta-virtual-monitor.h"
#include "backends/x11/meta-monitor-manager-xrandr.h" #include "backends/x11/meta-monitor-manager-xrandr.h"
#include "clutter/clutter.h" #include "clutter/clutter.h"
#include "core/main-private.h"
#include "core/util-private.h" #include "core/util-private.h"
#include "meta/main.h" #include "meta/main.h"
#include "meta/meta-x11-errors.h" #include "meta/meta-x11-errors.h"

View File

@ -23,7 +23,6 @@
#include "config.h" #include "config.h"
#include "backends/meta-viewport-info.h" #include "backends/meta-viewport-info.h"
#include "core/main-private.h"
#include "core/boxes-private.h" #include "core/boxes-private.h"
typedef struct _ViewInfo ViewInfo; typedef struct _ViewInfo ViewInfo;

View File

@ -37,12 +37,6 @@ typedef enum _MetaX11DisplayPolicy
META_X11_DISPLAY_POLICY_DISABLED, META_X11_DISPLAY_POLICY_DISABLED,
} MetaX11DisplayPolicy; } 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) #define META_GRAB_OP_GET_BASE_TYPE(op) (op & 0x00FF)
META_EXPORT_TEST META_EXPORT_TEST

View File

@ -32,7 +32,6 @@
#include "backends/meta-logical-monitor.h" #include "backends/meta-logical-monitor.h"
#include "cogl/cogl.h" #include "cogl/cogl.h"
#include "core/frame.h" #include "core/frame.h"
#include "core/main-private.h"
#include "core/meta-workspace-manager-private.h" #include "core/meta-workspace-manager-private.h"
#include "core/window-private.h" #include "core/window-private.h"
#include "meta/group.h" #include "meta/group.h"

View File

@ -45,4 +45,10 @@ char * meta_generate_random_id (GRand *rand,
void meta_init_debug_utils (void); 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 #endif

View File

@ -25,7 +25,6 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include "core/main-private.h"
#include "meta/common.h" #include "meta/common.h"
#include "meta/types.h" #include "meta/types.h"
#include "ui/theme-private.h" #include "ui/theme-private.h"