mutter: Completely replace MetaRectangle with MtkRectangle
There are still various helpers that might be worth to move to mtk as well Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3128>
This commit is contained in:
parent
aec8e50df8
commit
3d693e8309
@ -173,7 +173,7 @@ meta_cursor_renderer_after_paint (ClutterStage *stage,
|
||||
if (priv->displayed_cursor && priv->needs_overlay)
|
||||
{
|
||||
graphene_rect_t rect;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
graphene_rect_t view_rect;
|
||||
|
||||
rect = meta_cursor_renderer_calculate_rect (renderer,
|
||||
|
@ -617,7 +617,7 @@ typedef enum
|
||||
} LineAdjacency;
|
||||
|
||||
static LineAdjacency
|
||||
get_barrier_adjacency (MetaRectangle *rect,
|
||||
get_barrier_adjacency (MtkRectangle *rect,
|
||||
int x1,
|
||||
int y1,
|
||||
int x2,
|
||||
@ -719,7 +719,7 @@ check_barrier (MetaInputCaptureSession *session,
|
||||
for (l = logical_monitors; l; l = l->next)
|
||||
{
|
||||
MetaLogicalMonitor *logical_monitor = l->data;
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
|
||||
layout = meta_logical_monitor_get_layout (logical_monitor);
|
||||
switch (get_barrier_adjacency (&layout, x1, y1, x2, y2, error))
|
||||
@ -877,7 +877,7 @@ handle_get_zones (MetaDBusInputCaptureSession *object,
|
||||
for (l = logical_monitors; l; l = l->next)
|
||||
{
|
||||
MetaLogicalMonitor *logical_monitor = l->data;
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
|
||||
layout = meta_logical_monitor_get_layout (logical_monitor);
|
||||
g_variant_builder_add (&zones_builder, "(uuii)",
|
||||
|
@ -912,7 +912,7 @@ handle_get_device_mapping (MetaDBusInputMapping *skeleton,
|
||||
|
||||
if (logical_monitor)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
rect = meta_logical_monitor_get_layout (logical_monitor);
|
||||
g_dbus_method_invocation_return_value (invocation,
|
||||
|
@ -132,7 +132,7 @@ derive_monitor_transform (MetaMonitor *monitor)
|
||||
MetaLogicalMonitor *
|
||||
meta_logical_monitor_new_derived (MetaMonitorManager *monitor_manager,
|
||||
MetaMonitor *monitor,
|
||||
MetaRectangle *layout,
|
||||
MtkRectangle *layout,
|
||||
float scale,
|
||||
int monitor_number)
|
||||
{
|
||||
@ -214,7 +214,7 @@ meta_logical_monitor_get_transform (MetaLogicalMonitor *logical_monitor)
|
||||
return logical_monitor->transform;
|
||||
}
|
||||
|
||||
MetaRectangle
|
||||
MtkRectangle
|
||||
meta_logical_monitor_get_layout (MetaLogicalMonitor *logical_monitor)
|
||||
{
|
||||
return logical_monitor->rect;
|
||||
|
@ -34,7 +34,7 @@ struct _MetaLogicalMonitor
|
||||
GObject parent;
|
||||
|
||||
int number;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
gboolean is_primary;
|
||||
gboolean is_presentation; /* XXX: not yet used */
|
||||
gboolean in_fullscreen;
|
||||
@ -71,7 +71,7 @@ MetaLogicalMonitor * meta_logical_monitor_new (MetaMonitorManager *monitor
|
||||
|
||||
MetaLogicalMonitor * meta_logical_monitor_new_derived (MetaMonitorManager *monitor_manager,
|
||||
MetaMonitor *monitor,
|
||||
MetaRectangle *layout,
|
||||
MtkRectangle *layout,
|
||||
float scale,
|
||||
int monitor_number);
|
||||
|
||||
@ -88,7 +88,7 @@ float meta_logical_monitor_get_scale (MetaLogicalMonitor *logical_monitor);
|
||||
MetaMonitorTransform meta_logical_monitor_get_transform (MetaLogicalMonitor *logical_monitor);
|
||||
|
||||
META_EXPORT_TEST
|
||||
MetaRectangle meta_logical_monitor_get_layout (MetaLogicalMonitor *logical_monitor);
|
||||
MtkRectangle meta_logical_monitor_get_layout (MetaLogicalMonitor *logical_monitor);
|
||||
|
||||
META_EXPORT_TEST
|
||||
GList * meta_logical_monitor_get_monitors (MetaLogicalMonitor *logical_monitor);
|
||||
|
@ -773,7 +773,7 @@ create_preferred_logical_monitor_config (MetaMonitorManager *monitor_ma
|
||||
|
||||
logical_monitor_config = g_new0 (MetaLogicalMonitorConfig, 1);
|
||||
*logical_monitor_config = (MetaLogicalMonitorConfig) {
|
||||
.layout = (MetaRectangle) {
|
||||
.layout = (MtkRectangle) {
|
||||
.x = x,
|
||||
.y = y,
|
||||
.width = width,
|
||||
@ -898,7 +898,7 @@ verify_suggested_monitors_config (GList *logical_monitor_configs)
|
||||
for (l = logical_monitor_configs; l; l = l->next)
|
||||
{
|
||||
MetaLogicalMonitorConfig *logical_monitor_config = l->data;
|
||||
MetaRectangle *rect = &logical_monitor_config->layout;
|
||||
MtkRectangle *rect = &logical_monitor_config->layout;
|
||||
|
||||
if (meta_rectangle_overlaps_with_region (region, rect))
|
||||
{
|
||||
@ -912,7 +912,7 @@ verify_suggested_monitors_config (GList *logical_monitor_configs)
|
||||
|
||||
for (l = region; region->next && l; l = l->next)
|
||||
{
|
||||
MetaRectangle *rect = l->data;
|
||||
MtkRectangle *rect = l->data;
|
||||
|
||||
if (!meta_rectangle_is_adjacent_to_any_in_region (region, rect))
|
||||
{
|
||||
@ -1351,12 +1351,7 @@ create_for_switch_config_all_mirror (MetaMonitorConfigManager *config_manager)
|
||||
|
||||
logical_monitor_config = g_new0 (MetaLogicalMonitorConfig, 1);
|
||||
*logical_monitor_config = (MetaLogicalMonitorConfig) {
|
||||
.layout = (MetaRectangle) {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.width = width,
|
||||
.height = height
|
||||
},
|
||||
.layout = MTK_RECTANGLE_INIT (0, 0, width, height),
|
||||
.scale = best_scale,
|
||||
.monitor_configs = monitor_configs,
|
||||
.is_primary = TRUE,
|
||||
|
@ -37,7 +37,7 @@ typedef struct _MetaMonitorConfig
|
||||
|
||||
typedef struct _MetaLogicalMonitorConfig
|
||||
{
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
GList *monitor_configs;
|
||||
MetaMonitorTransform transform;
|
||||
float scale;
|
||||
|
@ -67,7 +67,7 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
gboolean enabled;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
float refresh_rate;
|
||||
MetaMonitorTransform transform;
|
||||
|
||||
@ -720,7 +720,7 @@ try_derive_tiled_monitor_config (MetaLegacyMonitorsConfig *config,
|
||||
MetaOutputKey *output_key,
|
||||
MetaOutputConfig *output_config,
|
||||
MetaMonitorConfigStore *config_store,
|
||||
MetaRectangle *out_layout,
|
||||
MtkRectangle *out_layout,
|
||||
GError **error)
|
||||
{
|
||||
MonitorTile top_left_tile = { 0 };
|
||||
@ -752,7 +752,7 @@ try_derive_tiled_monitor_config (MetaLegacyMonitorsConfig *config,
|
||||
{
|
||||
MetaOutputKey *other_output_key = &config->keys[i];
|
||||
MetaOutputConfig *other_output_config = &config->outputs[i];
|
||||
MetaRectangle *rect;
|
||||
MtkRectangle *rect;
|
||||
|
||||
if (strcmp (output_key->vendor, other_output_key->vendor) != 0 ||
|
||||
strcmp (output_key->product, other_output_key->product) != 0 ||
|
||||
@ -871,7 +871,7 @@ try_derive_tiled_monitor_config (MetaLegacyMonitorsConfig *config,
|
||||
if (!monitor_config)
|
||||
return NULL;
|
||||
|
||||
*out_layout = (MetaRectangle) {
|
||||
*out_layout = (MtkRectangle) {
|
||||
.x = min_x,
|
||||
.y = min_y,
|
||||
.width = max_x - min_x,
|
||||
@ -884,7 +884,7 @@ try_derive_tiled_monitor_config (MetaLegacyMonitorsConfig *config,
|
||||
static MetaMonitorConfig *
|
||||
derive_monitor_config (MetaOutputKey *output_key,
|
||||
MetaOutputConfig *output_config,
|
||||
MetaRectangle *out_layout,
|
||||
MtkRectangle *out_layout,
|
||||
GError **error)
|
||||
{
|
||||
int mode_width;
|
||||
@ -916,7 +916,7 @@ derive_monitor_config (MetaOutputKey *output_key,
|
||||
static MetaLogicalMonitorConfig *
|
||||
ensure_logical_monitor (GList **logical_monitor_configs,
|
||||
MetaOutputConfig *output_config,
|
||||
MetaRectangle *layout)
|
||||
MtkRectangle *layout)
|
||||
{
|
||||
MetaLogicalMonitorConfig *new_logical_monitor_config;
|
||||
GList *l;
|
||||
@ -957,7 +957,7 @@ derive_logical_monitor_configs (MetaLegacyMonitorsConfig *config,
|
||||
MetaOutputKey *output_key = &config->keys[i];
|
||||
MetaOutputConfig *output_config = &config->outputs[i];
|
||||
MetaMonitorConfig *monitor_config = NULL;
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
MetaLogicalMonitorConfig *logical_monitor_config;
|
||||
|
||||
if (!output_config->enabled)
|
||||
|
@ -290,10 +290,10 @@ MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_at (MetaMonitorMana
|
||||
float y);
|
||||
|
||||
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_from_rect (MetaMonitorManager *manager,
|
||||
MetaRectangle *rect);
|
||||
MtkRectangle *rect);
|
||||
|
||||
MetaLogicalMonitor *meta_monitor_manager_get_highest_scale_monitor_from_rect (MetaMonitorManager *manager,
|
||||
MetaRectangle *rect);
|
||||
MtkRectangle *rect);
|
||||
|
||||
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_neighbor (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitor *logical_monitor,
|
||||
|
@ -169,7 +169,7 @@ is_main_tiled_monitor_output (MetaOutput *output)
|
||||
static MetaLogicalMonitor *
|
||||
logical_monitor_from_layout (MetaMonitorManager *manager,
|
||||
GList *logical_monitors,
|
||||
MetaRectangle *layout)
|
||||
MtkRectangle *layout)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
@ -318,7 +318,7 @@ derive_calculated_global_scale (MetaMonitorManager *manager)
|
||||
static float
|
||||
derive_scale_from_config (MetaMonitorManager *manager,
|
||||
MetaMonitorsConfig *config,
|
||||
MetaRectangle *layout)
|
||||
MtkRectangle *layout)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
@ -364,7 +364,7 @@ meta_monitor_manager_rebuild_logical_monitors_derived (MetaMonitorManager *manag
|
||||
{
|
||||
MetaMonitor *monitor = l->data;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
|
||||
if (!meta_monitor_is_active (monitor))
|
||||
continue;
|
||||
@ -3349,7 +3349,7 @@ meta_monitor_manager_get_logical_monitor_at (MetaMonitorManager *manager,
|
||||
*/
|
||||
MetaLogicalMonitor *
|
||||
meta_monitor_manager_get_logical_monitor_from_rect (MetaMonitorManager *manager,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
MetaLogicalMonitor *best_logical_monitor;
|
||||
int best_logical_monitor_area;
|
||||
@ -3363,7 +3363,7 @@ meta_monitor_manager_get_logical_monitor_from_rect (MetaMonitorManager *manager,
|
||||
for (l = manager->logical_monitors; l; l = l->next)
|
||||
{
|
||||
MetaLogicalMonitor *logical_monitor = l->data;
|
||||
MetaRectangle intersection;
|
||||
MtkRectangle intersection;
|
||||
int intersection_area;
|
||||
|
||||
if (META_POINT_IN_RECT (center_x, center_y, logical_monitor->rect))
|
||||
@ -3401,7 +3401,7 @@ meta_monitor_manager_get_logical_monitor_from_rect (MetaMonitorManager *manager,
|
||||
*/
|
||||
MetaLogicalMonitor *
|
||||
meta_monitor_manager_get_highest_scale_monitor_from_rect (MetaMonitorManager *manager,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
MetaLogicalMonitor *best_logical_monitor = NULL;
|
||||
GList *l;
|
||||
@ -3410,7 +3410,7 @@ meta_monitor_manager_get_highest_scale_monitor_from_rect (MetaMonitorManager *ma
|
||||
for (l = manager->logical_monitors; l; l = l->next)
|
||||
{
|
||||
MetaLogicalMonitor *logical_monitor = l->data;
|
||||
MetaRectangle intersection;
|
||||
MtkRectangle intersection;
|
||||
float scale;
|
||||
|
||||
if (!mtk_rectangle_intersect (&logical_monitor->rect,
|
||||
|
@ -453,7 +453,7 @@ meta_monitor_get_current_resolution (MetaMonitor *monitor,
|
||||
|
||||
void
|
||||
meta_monitor_derive_layout (MetaMonitor *monitor,
|
||||
MetaRectangle *layout)
|
||||
MtkRectangle *layout)
|
||||
{
|
||||
META_MONITOR_GET_CLASS (monitor)->derive_layout (monitor, layout);
|
||||
}
|
||||
@ -844,7 +844,7 @@ meta_monitor_normal_get_main_output (MetaMonitor *monitor)
|
||||
|
||||
static void
|
||||
meta_monitor_normal_derive_layout (MetaMonitor *monitor,
|
||||
MetaRectangle *layout)
|
||||
MtkRectangle *layout)
|
||||
{
|
||||
MetaOutput *output;
|
||||
MetaCrtc *crtc;
|
||||
@ -1541,7 +1541,7 @@ meta_monitor_tiled_get_main_output (MetaMonitor *monitor)
|
||||
|
||||
static void
|
||||
meta_monitor_tiled_derive_layout (MetaMonitor *monitor,
|
||||
MetaRectangle *layout)
|
||||
MtkRectangle *layout)
|
||||
{
|
||||
MetaMonitorPrivate *monitor_priv =
|
||||
meta_monitor_get_instance_private (monitor);
|
||||
@ -1574,7 +1574,7 @@ meta_monitor_tiled_derive_layout (MetaMonitor *monitor,
|
||||
max_y = MAX (crtc_layout->origin.y + crtc_layout->size.height, max_y);
|
||||
}
|
||||
|
||||
*layout = (MetaRectangle) {
|
||||
*layout = (MtkRectangle) {
|
||||
.x = roundf (min_x),
|
||||
.y = roundf (min_y),
|
||||
.width = roundf (max_x - min_x),
|
||||
|
@ -71,7 +71,7 @@ struct _MetaMonitorClass
|
||||
|
||||
MetaOutput * (* get_main_output) (MetaMonitor *monitor);
|
||||
void (* derive_layout) (MetaMonitor *monitor,
|
||||
MetaRectangle *layout);
|
||||
MtkRectangle *layout);
|
||||
void (* calculate_crtc_pos) (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
@ -136,7 +136,7 @@ void meta_monitor_get_current_resolution (MetaMonitor *monitor,
|
||||
int *height);
|
||||
|
||||
void meta_monitor_derive_layout (MetaMonitor *monitor,
|
||||
MetaRectangle *layout);
|
||||
MtkRectangle *layout);
|
||||
|
||||
META_EXPORT_TEST
|
||||
void meta_monitor_get_physical_dimensions (MetaMonitor *monitor,
|
||||
|
@ -91,7 +91,7 @@ meta_screen_cast_area_stream_src_get_specs (MetaScreenCastStreamSrc *src,
|
||||
{
|
||||
MetaScreenCastStream *stream = meta_screen_cast_stream_src_get_stream (src);
|
||||
MetaScreenCastAreaStream *area_stream = META_SCREEN_CAST_AREA_STREAM (stream);
|
||||
MetaRectangle *area;
|
||||
MtkRectangle *area;
|
||||
float scale;
|
||||
|
||||
area = meta_screen_cast_area_stream_get_area (area_stream);
|
||||
@ -113,7 +113,7 @@ is_cursor_in_stream (MetaScreenCastAreaStreamSrc *area_src)
|
||||
MetaBackend *backend = get_backend (area_src);
|
||||
MetaCursorRenderer *cursor_renderer =
|
||||
meta_backend_get_cursor_renderer (backend);
|
||||
MetaRectangle *area;
|
||||
MtkRectangle *area;
|
||||
graphene_rect_t area_rect;
|
||||
MetaCursorSprite *cursor_sprite;
|
||||
|
||||
@ -275,7 +275,7 @@ stage_painted (MetaStage *stage,
|
||||
MetaScreenCastStream *stream = meta_screen_cast_stream_src_get_stream (src);
|
||||
MetaScreenCastAreaStream *area_stream = META_SCREEN_CAST_AREA_STREAM (stream);
|
||||
const cairo_region_t *redraw_clip;
|
||||
MetaRectangle *area;
|
||||
MtkRectangle *area;
|
||||
|
||||
if (area_src->maybe_record_idle_id)
|
||||
return;
|
||||
@ -308,7 +308,7 @@ add_view_painted_watches (MetaScreenCastAreaStreamSrc *area_src)
|
||||
MetaRenderer *renderer = meta_backend_get_renderer (backend);
|
||||
ClutterStage *stage;
|
||||
MetaStage *meta_stage;
|
||||
MetaRectangle *area;
|
||||
MtkRectangle *area;
|
||||
GList *l;
|
||||
|
||||
stage = get_stage (area_src);
|
||||
@ -318,7 +318,7 @@ add_view_painted_watches (MetaScreenCastAreaStreamSrc *area_src)
|
||||
for (l = meta_renderer_get_views (renderer); l; l = l->next)
|
||||
{
|
||||
MetaRendererView *view = l->data;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
|
||||
clutter_stage_view_get_layout (CLUTTER_STAGE_VIEW (view), &view_layout);
|
||||
if (mtk_rectangle_overlap (area, &view_layout))
|
||||
@ -466,7 +466,7 @@ meta_screen_cast_area_stream_src_record_to_buffer (MetaScreenCastStreamSrc *src
|
||||
MetaScreenCastStream *stream = meta_screen_cast_stream_src_get_stream (src);
|
||||
MetaScreenCastAreaStream *area_stream = META_SCREEN_CAST_AREA_STREAM (stream);
|
||||
ClutterStage *stage;
|
||||
MetaRectangle *area;
|
||||
MtkRectangle *area;
|
||||
float scale;
|
||||
ClutterPaintFlag paint_flags = CLUTTER_PAINT_FLAG_CLEAR;
|
||||
|
||||
@ -507,7 +507,7 @@ meta_screen_cast_area_stream_src_record_to_framebuffer (MetaScreenCastStreamSrc
|
||||
MetaScreenCastAreaStream *area_stream = META_SCREEN_CAST_AREA_STREAM (stream);
|
||||
MetaBackend *backend = get_backend (area_src);
|
||||
ClutterStage *stage;
|
||||
MetaRectangle *area;
|
||||
MtkRectangle *area;
|
||||
float scale;
|
||||
ClutterPaintFlag paint_flags = CLUTTER_PAINT_FLAG_CLEAR;
|
||||
|
||||
@ -561,7 +561,7 @@ meta_screen_cast_area_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc *s
|
||||
MetaCursorTracker *cursor_tracker =
|
||||
meta_backend_get_cursor_tracker (backend);
|
||||
MetaCursorSprite *cursor_sprite;
|
||||
MetaRectangle *area;
|
||||
MtkRectangle *area;
|
||||
float scale;
|
||||
graphene_point_t cursor_position;
|
||||
int x, y;
|
||||
|
@ -28,7 +28,7 @@ struct _MetaScreenCastAreaStream
|
||||
|
||||
ClutterStage *stage;
|
||||
|
||||
MetaRectangle area;
|
||||
MtkRectangle area;
|
||||
float scale;
|
||||
};
|
||||
|
||||
@ -42,7 +42,7 @@ meta_screen_cast_area_stream_get_stage (MetaScreenCastAreaStream *area_stream)
|
||||
return area_stream->stage;
|
||||
}
|
||||
|
||||
MetaRectangle *
|
||||
MtkRectangle *
|
||||
meta_screen_cast_area_stream_get_area (MetaScreenCastAreaStream *area_stream)
|
||||
{
|
||||
return &area_stream->area;
|
||||
@ -56,7 +56,7 @@ meta_screen_cast_area_stream_get_scale (MetaScreenCastAreaStream *area_stream)
|
||||
|
||||
static gboolean
|
||||
calculate_scale (ClutterStage *stage,
|
||||
MetaRectangle *area,
|
||||
MtkRectangle *area,
|
||||
float *out_scale)
|
||||
{
|
||||
GList *l;
|
||||
@ -65,7 +65,7 @@ calculate_scale (ClutterStage *stage,
|
||||
for (l = clutter_stage_peek_stage_views (stage); l; l = l->next)
|
||||
{
|
||||
ClutterStageView *stage_view = l->data;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
|
||||
clutter_stage_view_get_layout (stage_view, &view_layout);
|
||||
if (mtk_rectangle_overlap (area, &view_layout))
|
||||
@ -82,7 +82,7 @@ calculate_scale (ClutterStage *stage,
|
||||
MetaScreenCastAreaStream *
|
||||
meta_screen_cast_area_stream_new (MetaScreenCastSession *session,
|
||||
GDBusConnection *connection,
|
||||
MetaRectangle *area,
|
||||
MtkRectangle *area,
|
||||
ClutterStage *stage,
|
||||
MetaScreenCastCursorMode cursor_mode,
|
||||
MetaScreenCastFlag flags,
|
||||
|
@ -31,7 +31,7 @@ G_DECLARE_FINAL_TYPE (MetaScreenCastAreaStream,
|
||||
|
||||
MetaScreenCastAreaStream * meta_screen_cast_area_stream_new (MetaScreenCastSession *session,
|
||||
GDBusConnection *connection,
|
||||
MetaRectangle *area,
|
||||
MtkRectangle *area,
|
||||
ClutterStage *stage,
|
||||
MetaScreenCastCursorMode cursor_mode,
|
||||
MetaScreenCastFlag flags,
|
||||
@ -39,6 +39,6 @@ MetaScreenCastAreaStream * meta_screen_cast_area_stream_new (MetaScreenCastSessi
|
||||
|
||||
ClutterStage * meta_screen_cast_area_stream_get_stage (MetaScreenCastAreaStream *area_stream);
|
||||
|
||||
MetaRectangle * meta_screen_cast_area_stream_get_area (MetaScreenCastAreaStream *area_stream);
|
||||
MtkRectangle * meta_screen_cast_area_stream_get_area (MetaScreenCastAreaStream *area_stream);
|
||||
|
||||
float meta_screen_cast_area_stream_get_scale (MetaScreenCastAreaStream *area_stream);
|
||||
|
@ -226,7 +226,7 @@ is_cursor_in_stream (MetaScreenCastMonitorStreamSrc *monitor_src)
|
||||
meta_backend_get_cursor_renderer (backend);
|
||||
MetaMonitor *monitor;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
graphene_rect_t logical_monitor_rect;
|
||||
MetaCursorSprite *cursor_sprite;
|
||||
|
||||
@ -364,7 +364,7 @@ add_view_watches (MetaScreenCastMonitorStreamSrc *monitor_src,
|
||||
MetaStage *meta_stage;
|
||||
MetaMonitor *monitor;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
GList *l;
|
||||
|
||||
stage = get_stage (monitor_src);
|
||||
@ -376,7 +376,7 @@ add_view_watches (MetaScreenCastMonitorStreamSrc *monitor_src,
|
||||
for (l = meta_renderer_get_views (renderer); l; l = l->next)
|
||||
{
|
||||
MetaRendererView *view = l->data;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
|
||||
clutter_stage_view_get_layout (CLUTTER_STAGE_VIEW (view), &view_layout);
|
||||
if (mtk_rectangle_overlap (&logical_monitor_layout, &view_layout))
|
||||
@ -590,7 +590,7 @@ meta_screen_cast_monitor_stream_src_record_to_framebuffer (MetaScreenCastStreamS
|
||||
ClutterStage *stage = get_stage (monitor_src);
|
||||
MetaMonitor *monitor;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
float view_scale;
|
||||
ClutterPaintFlag paint_flags = CLUTTER_PAINT_FLAG_CLEAR;
|
||||
|
||||
@ -635,7 +635,7 @@ meta_screen_cast_monitor_stream_record_follow_up (MetaScreenCastStreamSrc *src)
|
||||
ClutterStage *stage = get_stage (monitor_src);
|
||||
MetaMonitor *monitor;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
GList *l;
|
||||
|
||||
g_clear_handle_id (&monitor_src->maybe_record_idle_id, g_source_remove);
|
||||
@ -647,8 +647,8 @@ meta_screen_cast_monitor_stream_record_follow_up (MetaScreenCastStreamSrc *src)
|
||||
for (l = meta_renderer_get_views (renderer); l; l = l->next)
|
||||
{
|
||||
MetaRendererView *view = l->data;
|
||||
MetaRectangle view_layout;
|
||||
MetaRectangle damage;
|
||||
MtkRectangle view_layout;
|
||||
MtkRectangle damage;
|
||||
|
||||
clutter_stage_view_get_layout (CLUTTER_STAGE_VIEW (view), &view_layout);
|
||||
|
||||
@ -679,7 +679,7 @@ meta_screen_cast_monitor_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc
|
||||
MetaCursorSprite *cursor_sprite;
|
||||
MetaMonitor *monitor;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
graphene_rect_t logical_monitor_rect;
|
||||
float view_scale;
|
||||
graphene_point_t cursor_position;
|
||||
|
@ -165,7 +165,7 @@ meta_screen_cast_monitor_stream_set_parameters (MetaScreenCastStream *stream,
|
||||
{
|
||||
MetaScreenCastMonitorStream *monitor_stream =
|
||||
META_SCREEN_CAST_MONITOR_STREAM (stream);
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
const char *output_name;
|
||||
|
||||
logical_monitor_layout =
|
||||
@ -197,7 +197,7 @@ meta_screen_cast_monitor_stream_transform_position (MetaScreenCastStream *stream
|
||||
MetaScreenCastMonitorStream *monitor_stream =
|
||||
META_SCREEN_CAST_MONITOR_STREAM (stream);
|
||||
MetaBackend *backend = meta_monitor_get_backend (monitor_stream->monitor);
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
double scale;
|
||||
|
||||
logical_monitor_layout =
|
||||
|
@ -606,7 +606,7 @@ handle_record_area (MetaDBusScreenCastSession *skeleton,
|
||||
gboolean is_recording;
|
||||
MetaScreenCastFlag flags;
|
||||
g_autoptr (GError) error = NULL;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
MetaScreenCastAreaStream *area_stream;
|
||||
MetaScreenCastStream *stream;
|
||||
char *stream_path;
|
||||
@ -646,7 +646,7 @@ handle_record_area (MetaDBusScreenCastSession *skeleton,
|
||||
if (is_recording)
|
||||
flags |= META_SCREEN_CAST_FLAG_IS_RECORDING;
|
||||
|
||||
rect = (MetaRectangle) {
|
||||
rect = (MtkRectangle) {
|
||||
.x = x,
|
||||
.y = y,
|
||||
.width = width,
|
||||
|
@ -241,7 +241,7 @@ meta_screen_cast_stream_src_get_specs (MetaScreenCastStreamSrc *src,
|
||||
|
||||
static gboolean
|
||||
meta_screen_cast_stream_src_get_videocrop (MetaScreenCastStreamSrc *src,
|
||||
MetaRectangle *crop_rect)
|
||||
MtkRectangle *crop_rect)
|
||||
{
|
||||
MetaScreenCastStreamSrcClass *klass =
|
||||
META_SCREEN_CAST_STREAM_SRC_GET_CLASS (src);
|
||||
@ -746,7 +746,7 @@ meta_screen_cast_stream_src_maybe_record_frame_with_timestamp (MetaScreenCastStr
|
||||
meta_screen_cast_stream_src_get_instance_private (src);
|
||||
MetaScreenCastRecordResult record_result =
|
||||
META_SCREEN_CAST_RECORD_RESULT_RECORDED_NOTHING;
|
||||
MetaRectangle crop_rect;
|
||||
MtkRectangle crop_rect;
|
||||
struct pw_buffer *buffer;
|
||||
struct spa_buffer *spa_buffer;
|
||||
struct spa_meta_header *header;
|
||||
|
@ -75,7 +75,7 @@ struct _MetaScreenCastStreamSrcClass
|
||||
void (* record_follow_up) (MetaScreenCastStreamSrc *src);
|
||||
|
||||
gboolean (* get_videocrop) (MetaScreenCastStreamSrc *src,
|
||||
MetaRectangle *crop_rect);
|
||||
MtkRectangle *crop_rect);
|
||||
void (* set_cursor_metadata) (MetaScreenCastStreamSrc *src,
|
||||
struct spa_meta_cursor *spa_meta_cursor);
|
||||
|
||||
|
@ -360,7 +360,7 @@ meta_screen_cast_virtual_stream_src_record_to_buffer (MetaScreenCastStreamSrc *
|
||||
MetaScreenCastStream *stream;
|
||||
ClutterPaintFlag paint_flags;
|
||||
ClutterStageView *view;
|
||||
MetaRectangle view_rect;
|
||||
MtkRectangle view_rect;
|
||||
float scale;
|
||||
|
||||
stream = meta_screen_cast_stream_src_get_stream (src);
|
||||
@ -419,7 +419,7 @@ meta_screen_cast_virtual_stream_src_record_to_framebuffer (MetaScreenCastStreamS
|
||||
static void
|
||||
meta_screen_cast_virtual_stream_record_follow_up (MetaScreenCastStreamSrc *src)
|
||||
{
|
||||
MetaRectangle damage;
|
||||
MtkRectangle damage;
|
||||
|
||||
clutter_stage_view_get_layout (view_from_src (src), &damage);
|
||||
damage.width = 1;
|
||||
@ -437,7 +437,7 @@ is_cursor_in_stream (MetaScreenCastVirtualStreamSrc *virtual_src)
|
||||
MetaCursorRenderer *cursor_renderer =
|
||||
meta_backend_get_cursor_renderer (backend);
|
||||
ClutterStageView *stage_view = view_from_src (src);
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
graphene_rect_t view_rect;
|
||||
MetaCursorSprite *cursor_sprite;
|
||||
|
||||
@ -478,7 +478,7 @@ meta_screen_cast_virtual_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc
|
||||
meta_backend_get_cursor_tracker (backend);
|
||||
MetaCursorSprite *cursor_sprite;
|
||||
ClutterStageView *stage_view;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
float view_scale;
|
||||
graphene_rect_t view_rect;
|
||||
graphene_point_t cursor_position;
|
||||
|
@ -89,7 +89,7 @@ meta_screen_cast_virtual_stream_transform_position (MetaScreenCastStream *stream
|
||||
MetaScreenCastVirtualStreamSrc *virtual_src =
|
||||
META_SCREEN_CAST_VIRTUAL_STREAM_SRC (src);
|
||||
ClutterStageView *view;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
|
||||
if (!meta_screen_cast_stream_src_is_enabled (src))
|
||||
return FALSE;
|
||||
|
@ -109,7 +109,7 @@ get_stream_height (MetaScreenCastWindowStreamSrc *window_src)
|
||||
static void
|
||||
maybe_draw_cursor_sprite (MetaScreenCastWindowStreamSrc *window_src,
|
||||
uint8_t *data,
|
||||
MetaRectangle *stream_rect)
|
||||
MtkRectangle *stream_rect)
|
||||
{
|
||||
MetaScreenCastStreamSrc *src = META_SCREEN_CAST_STREAM_SRC (window_src);
|
||||
MetaBackend *backend = get_backend (window_src);
|
||||
@ -192,7 +192,7 @@ maybe_draw_cursor_sprite (MetaScreenCastWindowStreamSrc *window_src,
|
||||
static void
|
||||
maybe_blit_cursor_sprite (MetaScreenCastWindowStreamSrc *window_src,
|
||||
CoglFramebuffer *framebuffer,
|
||||
MetaRectangle *stream_rect)
|
||||
MtkRectangle *stream_rect)
|
||||
{
|
||||
MetaBackend *backend = get_backend (window_src);
|
||||
CoglContext *cogl_context =
|
||||
@ -266,10 +266,10 @@ capture_into (MetaScreenCastWindowStreamSrc *window_src,
|
||||
uint8_t *data)
|
||||
{
|
||||
MetaScreenCastStreamSrc *src = META_SCREEN_CAST_STREAM_SRC (window_src);
|
||||
MetaRectangle stream_rect;
|
||||
MtkRectangle stream_rect;
|
||||
MetaScreenCastStream *stream;
|
||||
|
||||
stream_rect = (MetaRectangle) {
|
||||
stream_rect = (MtkRectangle) {
|
||||
.width = width,
|
||||
.height = height,
|
||||
};
|
||||
@ -309,11 +309,11 @@ meta_screen_cast_window_stream_src_get_specs (MetaScreenCastStreamSrc *src,
|
||||
|
||||
static gboolean
|
||||
meta_screen_cast_window_stream_src_get_videocrop (MetaScreenCastStreamSrc *src,
|
||||
MetaRectangle *crop_rect)
|
||||
MtkRectangle *crop_rect)
|
||||
{
|
||||
MetaScreenCastWindowStreamSrc *window_src =
|
||||
META_SCREEN_CAST_WINDOW_STREAM_SRC (src);
|
||||
MetaRectangle stream_rect;
|
||||
MtkRectangle stream_rect;
|
||||
|
||||
meta_screen_cast_window_get_buffer_bounds (window_src->screen_cast_window,
|
||||
crop_rect);
|
||||
@ -511,7 +511,7 @@ meta_screen_cast_window_stream_src_record_to_framebuffer (MetaScreenCastStreamSr
|
||||
MetaScreenCastWindowStreamSrc *window_src =
|
||||
META_SCREEN_CAST_WINDOW_STREAM_SRC (src);
|
||||
MetaScreenCastStream *stream;
|
||||
MetaRectangle stream_rect;
|
||||
MtkRectangle stream_rect;
|
||||
|
||||
stream_rect.x = 0;
|
||||
stream_rect.y = 0;
|
||||
|
@ -29,7 +29,7 @@ meta_screen_cast_window_default_init (MetaScreenCastWindowInterface *iface)
|
||||
|
||||
void
|
||||
meta_screen_cast_window_get_buffer_bounds (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds)
|
||||
MtkRectangle *bounds)
|
||||
{
|
||||
META_SCREEN_CAST_WINDOW_GET_IFACE (screen_cast_window)->get_buffer_bounds (screen_cast_window,
|
||||
bounds);
|
||||
@ -70,7 +70,7 @@ meta_screen_cast_window_transform_cursor_position (MetaScreenCastWindow *screen_
|
||||
|
||||
void
|
||||
meta_screen_cast_window_capture_into (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds,
|
||||
MtkRectangle *bounds,
|
||||
uint8_t *data)
|
||||
{
|
||||
META_SCREEN_CAST_WINDOW_GET_IFACE (screen_cast_window)->capture_into (screen_cast_window,
|
||||
@ -80,7 +80,7 @@ meta_screen_cast_window_capture_into (MetaScreenCastWindow *screen_cast_window,
|
||||
|
||||
gboolean
|
||||
meta_screen_cast_window_blit_to_framebuffer (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds,
|
||||
MtkRectangle *bounds,
|
||||
CoglFramebuffer *framebuffer)
|
||||
{
|
||||
MetaScreenCastWindowInterface *iface =
|
||||
|
@ -35,7 +35,7 @@ struct _MetaScreenCastWindowInterface
|
||||
GTypeInterface parent_iface;
|
||||
|
||||
void (*get_buffer_bounds) (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds);
|
||||
MtkRectangle *bounds);
|
||||
|
||||
void (*transform_relative_position) (MetaScreenCastWindow *screen_cast_window,
|
||||
double x,
|
||||
@ -51,11 +51,11 @@ struct _MetaScreenCastWindowInterface
|
||||
graphene_point_t *out_relative_cursor_position);
|
||||
|
||||
void (*capture_into) (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds,
|
||||
MtkRectangle *bounds,
|
||||
uint8_t *data);
|
||||
|
||||
gboolean (*blit_to_framebuffer) (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds,
|
||||
MtkRectangle *bounds,
|
||||
CoglFramebuffer *framebuffer);
|
||||
|
||||
gboolean (*has_damage) (MetaScreenCastWindow *screen_cast_window);
|
||||
@ -65,7 +65,7 @@ struct _MetaScreenCastWindowInterface
|
||||
};
|
||||
|
||||
void meta_screen_cast_window_get_buffer_bounds (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds);
|
||||
MtkRectangle *bounds);
|
||||
|
||||
void meta_screen_cast_window_transform_relative_position (MetaScreenCastWindow *screen_cast_window,
|
||||
double x,
|
||||
@ -81,11 +81,11 @@ gboolean meta_screen_cast_window_transform_cursor_position (MetaScreenCastWindow
|
||||
graphene_point_t *out_relative_cursor_position);
|
||||
|
||||
void meta_screen_cast_window_capture_into (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds,
|
||||
MtkRectangle *bounds,
|
||||
uint8_t *data);
|
||||
|
||||
gboolean meta_screen_cast_window_blit_to_framebuffer (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds,
|
||||
MtkRectangle *bounds,
|
||||
CoglFramebuffer *framebuffer);
|
||||
|
||||
gboolean meta_screen_cast_window_has_damage (MetaScreenCastWindow *screen_cast_window);
|
||||
|
@ -27,7 +27,7 @@ typedef struct _ViewInfo ViewInfo;
|
||||
|
||||
struct _ViewInfo
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
float scale;
|
||||
};
|
||||
|
||||
|
@ -265,7 +265,7 @@ meta_crtc_kms_assign_primary_plane (MetaCrtcKms *crtc_kms,
|
||||
const MetaCrtcConfig *crtc_config;
|
||||
const MetaCrtcModeInfo *crtc_mode_info;
|
||||
MetaFixed16Rectangle src_rect;
|
||||
MetaRectangle dst_rect;
|
||||
MtkRectangle dst_rect;
|
||||
MetaKmsAssignPlaneFlag flags;
|
||||
MetaKmsCrtc *kms_crtc;
|
||||
MetaKmsDevice *kms_device;
|
||||
@ -281,7 +281,7 @@ meta_crtc_kms_assign_primary_plane (MetaCrtcKms *crtc_kms,
|
||||
.width = meta_fixed_16_from_int (crtc_mode_info->width),
|
||||
.height = meta_fixed_16_from_int (crtc_mode_info->height),
|
||||
};
|
||||
dst_rect = (MetaRectangle) {
|
||||
dst_rect = (MtkRectangle) {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.width = crtc_mode_info->width,
|
||||
|
@ -247,7 +247,7 @@ meta_kms_crtc_read_state (MetaKmsCrtc *crtc,
|
||||
crtc->prop_table.props,
|
||||
META_KMS_CRTC_N_PROPS);
|
||||
|
||||
crtc_state.rect = (MetaRectangle) {
|
||||
crtc_state.rect = (MtkRectangle) {
|
||||
.x = drm_crtc->x,
|
||||
.y = drm_crtc->y,
|
||||
.width = drm_crtc->width,
|
||||
@ -311,7 +311,7 @@ meta_kms_crtc_update_state_in_impl (MetaKmsCrtc *crtc)
|
||||
if (!drm_crtc || !drm_props)
|
||||
{
|
||||
crtc->current_state.is_active = FALSE;
|
||||
crtc->current_state.rect = (MetaRectangle) { };
|
||||
crtc->current_state.rect = (MtkRectangle) { };
|
||||
crtc->current_state.is_drm_mode_valid = FALSE;
|
||||
changes = META_KMS_RESOURCE_CHANGE_FULL;
|
||||
goto out;
|
||||
@ -330,7 +330,7 @@ void
|
||||
meta_kms_crtc_disable_in_impl (MetaKmsCrtc *crtc)
|
||||
{
|
||||
crtc->current_state.is_active = FALSE;
|
||||
crtc->current_state.rect = (MetaRectangle) { 0 };
|
||||
crtc->current_state.rect = (MtkRectangle) { 0 };
|
||||
crtc->current_state.is_drm_mode_valid = FALSE;
|
||||
crtc->current_state.drm_mode = (drmModeModeInfo) { 0 };
|
||||
}
|
||||
@ -369,7 +369,7 @@ meta_kms_crtc_predict_state_in_impl (MetaKmsCrtc *crtc,
|
||||
else
|
||||
{
|
||||
crtc->current_state.is_active = FALSE;
|
||||
crtc->current_state.rect = (MetaRectangle) { 0 };
|
||||
crtc->current_state.rect = (MtkRectangle) { 0 };
|
||||
crtc->current_state.is_drm_mode_valid = FALSE;
|
||||
crtc->current_state.drm_mode = (drmModeModeInfo) { 0 };
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ typedef struct _MetaKmsCrtcState
|
||||
{
|
||||
gboolean is_active;
|
||||
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
gboolean is_drm_mode_valid;
|
||||
drmModeModeInfo drm_mode;
|
||||
|
||||
|
@ -371,7 +371,7 @@ maybe_update_cursor_plane (MetaKmsCursorManagerImpl *cursor_manager_impl,
|
||||
{
|
||||
int width, height;
|
||||
MetaFixed16Rectangle src_rect;
|
||||
MetaRectangle dst_rect;
|
||||
MtkRectangle dst_rect;
|
||||
MetaKmsAssignPlaneFlag assign_plane_flags =
|
||||
META_KMS_ASSIGN_PLANE_FLAG_NONE;
|
||||
MetaKmsPlaneAssignment *plane_assignment;
|
||||
@ -395,7 +395,7 @@ maybe_update_cursor_plane (MetaKmsCursorManagerImpl *cursor_manager_impl,
|
||||
.width = meta_fixed_16_from_int (width),
|
||||
.height = meta_fixed_16_from_int (height),
|
||||
};
|
||||
dst_rect = (MetaRectangle) {
|
||||
dst_rect = (MtkRectangle) {
|
||||
.x = round (cursor_rect.origin.x),
|
||||
.y = round (cursor_rect.origin.y),
|
||||
.width = round (cursor_rect.size.width),
|
||||
|
@ -60,7 +60,7 @@ typedef struct _MetaKmsPlaneAssignment
|
||||
MetaKmsPlane *plane;
|
||||
MetaDrmBuffer *buffer;
|
||||
MetaFixed16Rectangle src_rect;
|
||||
MetaRectangle dst_rect;
|
||||
MtkRectangle dst_rect;
|
||||
MetaKmsAssignPlaneFlag flags;
|
||||
MetaKmsFbDamage *fb_damage;
|
||||
MetaKmsPlaneRotation rotation;
|
||||
|
@ -269,7 +269,7 @@ meta_kms_update_assign_plane (MetaKmsUpdate *update,
|
||||
MetaKmsPlane *plane,
|
||||
MetaDrmBuffer *buffer,
|
||||
MetaFixed16Rectangle src_rect,
|
||||
MetaRectangle dst_rect,
|
||||
MtkRectangle dst_rect,
|
||||
MetaKmsAssignPlaneFlag flags)
|
||||
{
|
||||
MetaKmsPlaneAssignment *plane_assignment;
|
||||
|
@ -162,7 +162,7 @@ MetaKmsPlaneAssignment * meta_kms_update_assign_plane (MetaKmsUpdate *u
|
||||
MetaKmsPlane *plane,
|
||||
MetaDrmBuffer *buffer,
|
||||
MetaFixed16Rectangle src_rect,
|
||||
MetaRectangle dst_rect,
|
||||
MtkRectangle dst_rect,
|
||||
MetaKmsAssignPlaneFlag flags);
|
||||
|
||||
MetaKmsPlaneAssignment * meta_kms_update_unassign_plane (MetaKmsUpdate *update,
|
||||
@ -216,10 +216,10 @@ meta_fixed_16_to_double (MetaFixed16 fixed)
|
||||
return fixed / 65536.0;
|
||||
}
|
||||
|
||||
static inline MetaRectangle
|
||||
static inline MtkRectangle
|
||||
meta_fixed_16_rectangle_to_rectangle (MetaFixed16Rectangle fixed_rect)
|
||||
{
|
||||
return (MetaRectangle) {
|
||||
return (MtkRectangle) {
|
||||
.x = meta_fixed_16_to_int (fixed_rect.x),
|
||||
.y = meta_fixed_16_to_int (fixed_rect.y),
|
||||
.width = meta_fixed_16_to_int (fixed_rect.width),
|
||||
|
@ -1103,7 +1103,7 @@ meta_renderer_native_queue_modes_reset (MetaRendererNative *renderer_native)
|
||||
META_ONSCREEN_NATIVE (framebuffer);
|
||||
MetaCrtc *crtc;
|
||||
MetaKmsCrtc *kms_crtc;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
float view_scale;
|
||||
MetaKmsCrtcLayout crtc_layout;
|
||||
|
||||
@ -1320,7 +1320,7 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
|
||||
float scale;
|
||||
int onscreen_width;
|
||||
int onscreen_height;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
MetaRendererViewNative *view_native;
|
||||
EGLSurface egl_surface;
|
||||
GError *error = NULL;
|
||||
|
@ -48,7 +48,7 @@ struct _MetaCrtcXrandr
|
||||
{
|
||||
MetaCrtc parent;
|
||||
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
MetaMonitorTransform transform;
|
||||
MetaCrtcMode *current_mode;
|
||||
};
|
||||
@ -254,7 +254,7 @@ meta_crtc_xrandr_new (MetaGpuXrandr *gpu_xrandr,
|
||||
panning = XRRGetPanning (xdisplay, resources, crtc_id);
|
||||
if (panning && panning->width > 0 && panning->height > 0)
|
||||
{
|
||||
crtc_xrandr->rect = (MetaRectangle) {
|
||||
crtc_xrandr->rect = (MtkRectangle) {
|
||||
.x = panning->left,
|
||||
.y = panning->top,
|
||||
.width = panning->width,
|
||||
@ -263,7 +263,7 @@ meta_crtc_xrandr_new (MetaGpuXrandr *gpu_xrandr,
|
||||
}
|
||||
else
|
||||
{
|
||||
crtc_xrandr->rect = (MetaRectangle) {
|
||||
crtc_xrandr->rect = (MtkRectangle) {
|
||||
.x = xrandr_crtc->x,
|
||||
.y = xrandr_crtc->y,
|
||||
.width = xrandr_crtc->width,
|
||||
|
@ -105,7 +105,7 @@ meta_renderer_x11_nested_create_view (MetaRenderer *renderer,
|
||||
int width, height;
|
||||
CoglOffscreen *fake_onscreen;
|
||||
CoglOffscreen *offscreen;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
const MetaCrtcModeInfo *mode_info;
|
||||
MetaRendererView *view;
|
||||
|
||||
|
@ -126,8 +126,8 @@ void meta_compositor_switch_workspace (MetaCompositor *compositor,
|
||||
void meta_compositor_size_change_window (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaSizeChange which_change,
|
||||
MetaRectangle *old_frame_rect,
|
||||
MetaRectangle *old_buffer_rect);
|
||||
MtkRectangle *old_frame_rect,
|
||||
MtkRectangle *old_buffer_rect);
|
||||
|
||||
void meta_compositor_sync_window_geometry (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
@ -148,7 +148,7 @@ void meta_compositor_flash_display (MetaCompositor *compositor,
|
||||
|
||||
void meta_compositor_show_tile_preview (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor_number);
|
||||
|
||||
void meta_compositor_hide_tile_preview (MetaCompositor *compositor);
|
||||
|
@ -623,8 +623,8 @@ void
|
||||
meta_compositor_size_change_window (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaSizeChange which_change,
|
||||
MetaRectangle *old_frame_rect,
|
||||
MetaRectangle *old_buffer_rect)
|
||||
MtkRectangle *old_frame_rect,
|
||||
MtkRectangle *old_buffer_rect)
|
||||
{
|
||||
MetaWindowActor *window_actor = meta_window_actor_from_window (window);
|
||||
|
||||
@ -769,8 +769,8 @@ update_top_window_actor (MetaCompositor *compositor)
|
||||
{
|
||||
MetaWindowActor *window_actor = l->data;
|
||||
MetaWindow *window = meta_window_actor_get_meta_window (window_actor);
|
||||
MetaRectangle buffer_rect;
|
||||
MetaRectangle display_rect = { 0 };
|
||||
MtkRectangle buffer_rect;
|
||||
MtkRectangle display_rect = { 0 };
|
||||
|
||||
if (!window->visible_to_compositor)
|
||||
continue;
|
||||
@ -1515,7 +1515,7 @@ meta_compositor_monotonic_to_high_res_xserver_time (MetaCompositor *compositor,
|
||||
void
|
||||
meta_compositor_show_tile_preview (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor_number)
|
||||
{
|
||||
MetaCompositorPrivate *priv =
|
||||
|
@ -168,7 +168,7 @@ static int
|
||||
find_nearest_position (const GArray *edges,
|
||||
int position,
|
||||
int old_position,
|
||||
const MetaRectangle *new_rect,
|
||||
const MtkRectangle *new_rect,
|
||||
gboolean horizontal,
|
||||
gboolean only_forward)
|
||||
{
|
||||
@ -303,8 +303,8 @@ static int
|
||||
apply_edge_resistance (MetaWindow *window,
|
||||
int old_pos,
|
||||
int new_pos,
|
||||
const MetaRectangle *old_rect,
|
||||
const MetaRectangle *new_rect,
|
||||
const MtkRectangle *old_rect,
|
||||
const MtkRectangle *new_rect,
|
||||
GArray *edges,
|
||||
gboolean xdir,
|
||||
gboolean include_windows,
|
||||
@ -418,7 +418,7 @@ apply_edge_resistance (MetaWindow *window,
|
||||
static int
|
||||
apply_edge_snapping (int old_pos,
|
||||
int new_pos,
|
||||
const MetaRectangle *new_rect,
|
||||
const MtkRectangle *new_rect,
|
||||
GArray *edges,
|
||||
gboolean xdir,
|
||||
gboolean keyboard_op)
|
||||
@ -460,12 +460,12 @@ apply_edge_snapping (int old_pos,
|
||||
static gboolean
|
||||
apply_edge_resistance_to_each_side (MetaEdgeResistanceData *edge_data,
|
||||
MetaWindow *window,
|
||||
const MetaRectangle *old_outer,
|
||||
MetaRectangle *new_outer,
|
||||
const MtkRectangle *old_outer,
|
||||
MtkRectangle *new_outer,
|
||||
MetaEdgeResistanceFlags flags,
|
||||
gboolean is_resize)
|
||||
{
|
||||
MetaRectangle modified_rect;
|
||||
MtkRectangle modified_rect;
|
||||
gboolean modified;
|
||||
int new_left, new_right, new_top, new_bottom;
|
||||
gboolean auto_snap, keyboard_op;
|
||||
@ -510,7 +510,7 @@ apply_edge_resistance_to_each_side (MetaEdgeResistanceData *edge_data,
|
||||
}
|
||||
else if (auto_snap && META_WINDOW_TILED_SIDE_BY_SIDE (window))
|
||||
{
|
||||
MetaRectangle workarea;
|
||||
MtkRectangle workarea;
|
||||
guint i;
|
||||
|
||||
const gfloat tile_edges[] =
|
||||
@ -918,8 +918,8 @@ compute_resistance_and_snapping_edges (MetaWindowDrag *window_drag)
|
||||
MetaWindow *cur_window = cur_window_iter->data;
|
||||
if (WINDOW_EDGES_RELEVANT (cur_window, display))
|
||||
{
|
||||
MetaRectangle *new_rect;
|
||||
new_rect = g_new (MetaRectangle, 1);
|
||||
MtkRectangle *new_rect;
|
||||
new_rect = g_new (MtkRectangle, 1);
|
||||
meta_window_get_frame_rect (cur_window, new_rect);
|
||||
obscuring_windows = g_slist_prepend (obscuring_windows, new_rect);
|
||||
window_stacking =
|
||||
@ -943,7 +943,7 @@ compute_resistance_and_snapping_edges (MetaWindowDrag *window_drag)
|
||||
cur_window_iter = stacked_windows;
|
||||
while (cur_window_iter != NULL)
|
||||
{
|
||||
MetaRectangle cur_rect;
|
||||
MtkRectangle cur_rect;
|
||||
MetaWindow *cur_window = cur_window_iter->data;
|
||||
meta_window_get_frame_rect (cur_window, &cur_rect);
|
||||
|
||||
@ -956,8 +956,8 @@ compute_resistance_and_snapping_edges (MetaWindowDrag *window_drag)
|
||||
{
|
||||
GList *new_edges;
|
||||
MetaEdge *new_edge;
|
||||
MetaRectangle display_rect = { 0 };
|
||||
MetaRectangle reduced;
|
||||
MtkRectangle display_rect = { 0 };
|
||||
MtkRectangle reduced;
|
||||
|
||||
meta_display_get_size (display,
|
||||
&display_rect.width, &display_rect.height);
|
||||
@ -1098,7 +1098,7 @@ meta_window_drag_edge_resistance_for_move (MetaWindowDrag *window_drag,
|
||||
MetaEdgeResistanceFlags flags)
|
||||
{
|
||||
MetaEdgeResistanceData *edge_data;
|
||||
MetaRectangle old_outer, proposed_outer, new_outer;
|
||||
MtkRectangle old_outer, proposed_outer, new_outer;
|
||||
gboolean is_resize, is_keyboard_op, snap;
|
||||
MetaWindow *window;
|
||||
|
||||
@ -1130,7 +1130,7 @@ meta_window_drag_edge_resistance_for_move (MetaWindowDrag *window_drag,
|
||||
* just have both edges move according to the stricter of the
|
||||
* resistances. Same thing goes for top & bottom edges.
|
||||
*/
|
||||
MetaRectangle *reference;
|
||||
MtkRectangle *reference;
|
||||
int left_change, right_change, smaller_x_change;
|
||||
int top_change, bottom_change, smaller_y_change;
|
||||
|
||||
@ -1181,7 +1181,7 @@ meta_window_drag_edge_resistance_for_resize (MetaWindowDrag *window_dra
|
||||
MetaEdgeResistanceFlags flags)
|
||||
{
|
||||
MetaEdgeResistanceData *edge_data;
|
||||
MetaRectangle old_outer, new_outer;
|
||||
MtkRectangle old_outer, new_outer;
|
||||
int proposed_outer_width, proposed_outer_height;
|
||||
MetaWindow *window;
|
||||
|
||||
|
@ -456,7 +456,7 @@ setup_pipeline (MetaBackgroundContent *self,
|
||||
|
||||
if (self->changed & CHANGED_GRADIENT_PARAMETERS)
|
||||
{
|
||||
MetaRectangle monitor_geometry;
|
||||
MtkRectangle monitor_geometry;
|
||||
float gradient_height_perc;
|
||||
|
||||
meta_display_get_monitor_geometry (self->display,
|
||||
@ -780,7 +780,7 @@ meta_background_content_get_preferred_size (ClutterContent *content,
|
||||
|
||||
{
|
||||
MetaBackgroundContent *background_content = META_BACKGROUND_CONTENT (content);
|
||||
MetaRectangle monitor_geometry;
|
||||
MtkRectangle monitor_geometry;
|
||||
|
||||
meta_display_get_monitor_geometry (background_content->display,
|
||||
background_content->monitor,
|
||||
@ -806,8 +806,8 @@ static void
|
||||
set_monitor (MetaBackgroundContent *self,
|
||||
int monitor)
|
||||
{
|
||||
MetaRectangle old_monitor_geometry;
|
||||
MetaRectangle new_monitor_geometry;
|
||||
MtkRectangle old_monitor_geometry;
|
||||
MtkRectangle new_monitor_geometry;
|
||||
MetaDisplay *display = self->display;
|
||||
|
||||
if(self->monitor == monitor)
|
||||
|
@ -756,7 +756,7 @@ meta_background_get_texture (MetaBackground *self,
|
||||
CoglPipelineWrapMode *wrap_mode)
|
||||
{
|
||||
MetaBackgroundMonitor *monitor;
|
||||
MetaRectangle geometry;
|
||||
MtkRectangle geometry;
|
||||
MtkRectangle monitor_area;
|
||||
CoglTexture *texture1, *texture2;
|
||||
float monitor_scale;
|
||||
|
@ -81,7 +81,7 @@ find_scanout_candidate (MetaCompositorView *compositor_view,
|
||||
CoglFramebuffer *framebuffer;
|
||||
MetaWindowActor *window_actor;
|
||||
MetaWindow *window;
|
||||
MetaRectangle view_rect;
|
||||
MtkRectangle view_rect;
|
||||
ClutterActorBox actor_box;
|
||||
MetaSurfaceActor *surface_actor;
|
||||
MetaSurfaceActorWayland *surface_actor_wayland;
|
||||
|
@ -70,8 +70,8 @@ find_top_window_actor_on_view (ClutterStageView *stage_view,
|
||||
MetaWindowActor *window_actor = l->data;
|
||||
MetaWindow *window =
|
||||
meta_window_actor_get_meta_window (window_actor);
|
||||
MetaRectangle buffer_rect;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle buffer_rect;
|
||||
MtkRectangle view_layout;
|
||||
|
||||
if (!window->visible_to_compositor)
|
||||
continue;
|
||||
|
@ -242,7 +242,7 @@ shape_cow_for_window (MetaCompositorX11 *compositor_x11,
|
||||
XserverRegion output_region;
|
||||
XRectangle screen_rect, window_bounds;
|
||||
int width, height;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &rect);
|
||||
|
||||
|
@ -272,8 +272,8 @@ gboolean
|
||||
meta_plugin_manager_event_size_change (MetaPluginManager *plugin_mgr,
|
||||
MetaWindowActor *actor,
|
||||
MetaSizeChange which_change,
|
||||
MetaRectangle *old_frame_rect,
|
||||
MetaRectangle *old_buffer_rect)
|
||||
MtkRectangle *old_frame_rect,
|
||||
MtkRectangle *old_buffer_rect)
|
||||
{
|
||||
MetaPlugin *plugin = plugin_mgr->plugin;
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||
@ -357,7 +357,7 @@ meta_plugin_manager_confirm_display_change (MetaPluginManager *plugin_mgr)
|
||||
gboolean
|
||||
meta_plugin_manager_show_tile_preview (MetaPluginManager *plugin_mgr,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor_number)
|
||||
{
|
||||
MetaPlugin *plugin = plugin_mgr->plugin;
|
||||
|
@ -59,8 +59,8 @@ void meta_plugin_manager_event_size_changed (MetaPluginManager *mgr,
|
||||
gboolean meta_plugin_manager_event_size_change (MetaPluginManager *mgr,
|
||||
MetaWindowActor *actor,
|
||||
MetaSizeChange which_change,
|
||||
MetaRectangle *old_frame_rect,
|
||||
MetaRectangle *old_buffer_rect);
|
||||
MtkRectangle *old_frame_rect,
|
||||
MtkRectangle *old_buffer_rect);
|
||||
|
||||
gboolean meta_plugin_manager_switch_workspace (MetaPluginManager *mgr,
|
||||
gint from,
|
||||
@ -79,7 +79,7 @@ void meta_plugin_manager_confirm_display_change (MetaPluginManager *mgr);
|
||||
|
||||
gboolean meta_plugin_manager_show_tile_preview (MetaPluginManager *mgr,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor_number);
|
||||
gboolean meta_plugin_manager_hide_tile_preview (MetaPluginManager *mgr);
|
||||
|
||||
|
@ -1256,7 +1256,7 @@ meta_shaped_texture_is_opaque (MetaShapedTexture *stex)
|
||||
meta_shaped_texture_ensure_size_valid (stex);
|
||||
|
||||
return mtk_rectangle_equal (&opaque_rect,
|
||||
&(MetaRectangle) {
|
||||
&(MtkRectangle) {
|
||||
.width = stex->dst_width,
|
||||
.height = stex->dst_height
|
||||
});
|
||||
@ -1452,7 +1452,7 @@ meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
||||
image_clip))
|
||||
return NULL;
|
||||
|
||||
*image_clip = (MetaRectangle) {
|
||||
*image_clip = (MtkRectangle) {
|
||||
.x = image_clip->x * stex->buffer_scale,
|
||||
.y = image_clip->y * stex->buffer_scale,
|
||||
.width = image_clip->width * stex->buffer_scale,
|
||||
|
@ -199,7 +199,7 @@ meta_surface_actor_x11_process_damage (MetaSurfaceActor *actor,
|
||||
|
||||
if (meta_window_is_fullscreen (self->window) && !self->unredirected && !self->does_full_damage)
|
||||
{
|
||||
MetaRectangle window_rect;
|
||||
MtkRectangle window_rect;
|
||||
meta_window_get_frame_rect (self->window, &window_rect);
|
||||
|
||||
if (x == 0 &&
|
||||
|
@ -34,7 +34,7 @@ struct _MetaWindowActorClass
|
||||
gboolean (*can_freeze_commits) (MetaWindowActor *actor);
|
||||
|
||||
void (*sync_geometry) (MetaWindowActor *actor,
|
||||
const MetaRectangle *actor_rect);
|
||||
const MtkRectangle *actor_rect);
|
||||
gboolean (*is_single_surface_actor) (MetaWindowActor *actor);
|
||||
};
|
||||
|
||||
@ -53,8 +53,8 @@ void meta_window_actor_hide (MetaWindowActor *self,
|
||||
|
||||
void meta_window_actor_size_change (MetaWindowActor *self,
|
||||
MetaSizeChange which_change,
|
||||
MetaRectangle *old_frame_rect,
|
||||
MetaRectangle *old_buffer_rect);
|
||||
MtkRectangle *old_frame_rect,
|
||||
MtkRectangle *old_buffer_rect);
|
||||
|
||||
void meta_window_actor_before_paint (MetaWindowActor *self,
|
||||
ClutterStageView *stage_view);
|
||||
|
@ -107,7 +107,7 @@ surface_container_apply_transform (ClutterActor *actor,
|
||||
CLUTTER_ACTOR_CLASS (meta_surface_container_actor_wayland_parent_class);
|
||||
MetaWindow *window;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle monitor_rect;
|
||||
MtkRectangle monitor_rect;
|
||||
float scale;
|
||||
float rel_x, rel_y;
|
||||
float abs_x, abs_y;
|
||||
@ -478,7 +478,7 @@ maybe_configure_black_background (MetaWindowActorWayland *self,
|
||||
MetaWindow *window = meta_window_actor_get_meta_window (window_actor);
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
int geometry_scale;
|
||||
MetaRectangle fullscreen_layout;
|
||||
MtkRectangle fullscreen_layout;
|
||||
ClutterActor *child;
|
||||
ClutterActorIter iter;
|
||||
float max_width = 0;
|
||||
@ -527,7 +527,7 @@ maybe_configure_black_background (MetaWindowActorWayland *self,
|
||||
|
||||
static void
|
||||
meta_window_actor_wayland_sync_geometry (MetaWindowActor *actor,
|
||||
const MetaRectangle *actor_rect)
|
||||
const MtkRectangle *actor_rect)
|
||||
{
|
||||
MetaWindowActorWayland *self = META_WINDOW_ACTOR_WAYLAND (actor);
|
||||
ClutterActor *surface_container = CLUTTER_ACTOR (self->surface_container);
|
||||
|
@ -1407,7 +1407,7 @@ meta_window_actor_x11_is_single_surface_actor (MetaWindowActor *actor)
|
||||
|
||||
static void
|
||||
meta_window_actor_x11_sync_geometry (MetaWindowActor *actor,
|
||||
const MetaRectangle *actor_rect)
|
||||
const MtkRectangle *actor_rect)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -939,7 +939,7 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
|
||||
{
|
||||
MetaWindowActorPrivate *priv =
|
||||
meta_window_actor_get_instance_private (self);
|
||||
MetaRectangle actor_rect;
|
||||
MtkRectangle actor_rect;
|
||||
ClutterActor *actor = CLUTTER_ACTOR (self);
|
||||
MetaWindowActorChanges changes = 0;
|
||||
|
||||
@ -1076,8 +1076,8 @@ meta_window_actor_hide (MetaWindowActor *self,
|
||||
void
|
||||
meta_window_actor_size_change (MetaWindowActor *self,
|
||||
MetaSizeChange which_change,
|
||||
MetaRectangle *old_frame_rect,
|
||||
MetaRectangle *old_buffer_rect)
|
||||
MtkRectangle *old_frame_rect,
|
||||
MtkRectangle *old_buffer_rect)
|
||||
{
|
||||
MetaWindowActorPrivate *priv =
|
||||
meta_window_actor_get_instance_private (self);
|
||||
@ -1224,7 +1224,7 @@ meta_window_actor_get_geometry_scale (MetaWindowActor *window_actor)
|
||||
|
||||
static void
|
||||
meta_window_actor_get_buffer_bounds (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds)
|
||||
MtkRectangle *bounds)
|
||||
{
|
||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (screen_cast_window);
|
||||
MetaWindowActorPrivate *priv =
|
||||
@ -1232,7 +1232,7 @@ meta_window_actor_get_buffer_bounds (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaShapedTexture *stex;
|
||||
|
||||
stex = meta_surface_actor_get_texture (priv->surface);
|
||||
*bounds = (MetaRectangle) {
|
||||
*bounds = (MtkRectangle) {
|
||||
.width = floorf (meta_shaped_texture_get_unscaled_width (stex)),
|
||||
.height = floorf (meta_shaped_texture_get_unscaled_height (stex)),
|
||||
};
|
||||
@ -1249,7 +1249,7 @@ meta_window_actor_transform_relative_position (MetaScreenCastWindow *screen_cast
|
||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (screen_cast_window);
|
||||
MetaWindowActorPrivate *priv =
|
||||
meta_window_actor_get_instance_private (window_actor);
|
||||
MetaRectangle bounds;
|
||||
MtkRectangle bounds;
|
||||
graphene_point3d_t v1 = { 0.f, }, v2 = { 0.f, };
|
||||
|
||||
meta_window_actor_get_buffer_bounds (screen_cast_window, &bounds);
|
||||
@ -1344,7 +1344,7 @@ meta_window_actor_transform_cursor_position (MetaScreenCastWindow *screen_cast_w
|
||||
|
||||
static void
|
||||
meta_window_actor_capture_into (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds,
|
||||
MtkRectangle *bounds,
|
||||
uint8_t *data)
|
||||
{
|
||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (screen_cast_window);
|
||||
@ -1400,7 +1400,7 @@ meta_window_actor_capture_into (MetaScreenCastWindow *screen_cast_window,
|
||||
|
||||
static gboolean
|
||||
meta_window_actor_blit_to_framebuffer (MetaScreenCastWindow *screen_cast_window,
|
||||
MetaRectangle *bounds,
|
||||
MtkRectangle *bounds,
|
||||
CoglFramebuffer *framebuffer)
|
||||
{
|
||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (screen_cast_window);
|
||||
@ -1560,7 +1560,7 @@ meta_window_actor_notify_damaged (MetaWindowActor *window_actor)
|
||||
|
||||
static CoglFramebuffer *
|
||||
create_framebuffer_from_window_actor (MetaWindowActor *self,
|
||||
MetaRectangle *clip,
|
||||
MtkRectangle *clip,
|
||||
GError **error)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = meta_window_actor_get_instance_private (self);
|
||||
@ -1636,14 +1636,14 @@ meta_window_actor_is_single_surface_actor (MetaWindowActor *self)
|
||||
*/
|
||||
cairo_surface_t *
|
||||
meta_window_actor_get_image (MetaWindowActor *self,
|
||||
MetaRectangle *clip)
|
||||
MtkRectangle *clip)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = meta_window_actor_get_instance_private (self);
|
||||
ClutterActor *actor = CLUTTER_ACTOR (self);
|
||||
MetaShapedTexture *stex;
|
||||
cairo_surface_t *surface = NULL;
|
||||
CoglFramebuffer *framebuffer;
|
||||
MetaRectangle framebuffer_clip;
|
||||
MtkRectangle framebuffer_clip;
|
||||
float resource_scale;
|
||||
float x, y, width, height;
|
||||
|
||||
@ -1656,7 +1656,7 @@ meta_window_actor_get_image (MetaWindowActor *self,
|
||||
if (!meta_shaped_texture_should_get_via_offscreen (stex) &&
|
||||
meta_window_actor_is_single_surface_actor (self))
|
||||
{
|
||||
MetaRectangle *surface_clip = NULL;
|
||||
MtkRectangle *surface_clip = NULL;
|
||||
|
||||
if (clip)
|
||||
{
|
||||
@ -1665,7 +1665,7 @@ meta_window_actor_get_image (MetaWindowActor *self,
|
||||
geometry_scale =
|
||||
meta_window_actor_get_geometry_scale (self);
|
||||
|
||||
surface_clip = g_alloca (sizeof (MetaRectangle));
|
||||
surface_clip = g_alloca (sizeof (MtkRectangle));
|
||||
surface_clip->x = clip->x / geometry_scale,
|
||||
surface_clip->y = clip->y / geometry_scale;
|
||||
surface_clip->width = clip->width / geometry_scale;
|
||||
@ -1682,7 +1682,7 @@ meta_window_actor_get_image (MetaWindowActor *self,
|
||||
if (width == 0 || height == 0)
|
||||
goto out;
|
||||
|
||||
framebuffer_clip = (MetaRectangle) {
|
||||
framebuffer_clip = (MtkRectangle) {
|
||||
.x = floorf (x),
|
||||
.y = floorf (y),
|
||||
.width = ceilf (width),
|
||||
@ -1691,8 +1691,8 @@ meta_window_actor_get_image (MetaWindowActor *self,
|
||||
|
||||
if (clip)
|
||||
{
|
||||
MetaRectangle tmp_clip;
|
||||
MetaRectangle intersected_clip;
|
||||
MtkRectangle tmp_clip;
|
||||
MtkRectangle intersected_clip;
|
||||
|
||||
tmp_clip = *clip;
|
||||
tmp_clip.x += floorf (x);
|
||||
@ -1746,7 +1746,7 @@ out:
|
||||
*/
|
||||
ClutterContent *
|
||||
meta_window_actor_paint_to_content (MetaWindowActor *self,
|
||||
MetaRectangle *clip,
|
||||
MtkRectangle *clip,
|
||||
GError **error)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = meta_window_actor_get_instance_private (self);
|
||||
@ -1754,7 +1754,7 @@ meta_window_actor_paint_to_content (MetaWindowActor *self,
|
||||
ClutterContent *content = NULL;
|
||||
CoglFramebuffer *framebuffer;
|
||||
CoglTexture *texture;
|
||||
MetaRectangle framebuffer_clip;
|
||||
MtkRectangle framebuffer_clip;
|
||||
float x, y, width, height;
|
||||
|
||||
if (!priv->surface)
|
||||
@ -1768,7 +1768,7 @@ meta_window_actor_paint_to_content (MetaWindowActor *self,
|
||||
if (width == 0 || height == 0)
|
||||
goto out;
|
||||
|
||||
framebuffer_clip = (MetaRectangle) {
|
||||
framebuffer_clip = (MtkRectangle) {
|
||||
.x = floorf (x),
|
||||
.y = floorf (y),
|
||||
.width = ceilf (width),
|
||||
@ -1777,7 +1777,7 @@ meta_window_actor_paint_to_content (MetaWindowActor *self,
|
||||
|
||||
if (clip)
|
||||
{
|
||||
MetaRectangle tmp_clip;
|
||||
MtkRectangle tmp_clip;
|
||||
|
||||
if (!mtk_rectangle_intersect (&framebuffer_clip, clip, &tmp_clip))
|
||||
goto out;
|
||||
|
@ -63,7 +63,7 @@ struct _MetaWindowDrag {
|
||||
int tile_monitor_number;
|
||||
int latest_motion_x;
|
||||
int latest_motion_y;
|
||||
MetaRectangle initial_window_pos;
|
||||
MtkRectangle initial_window_pos;
|
||||
int initial_x, initial_y; /* These are only relevant for */
|
||||
gboolean threshold_movement_reached; /* raise_on_click == FALSE. */
|
||||
unsigned int last_edge_resistance_flags;
|
||||
@ -112,7 +112,7 @@ update_tile_preview_timeout (MetaWindowDrag *window_drag)
|
||||
|
||||
if (needs_preview)
|
||||
{
|
||||
MetaRectangle tile_rect;
|
||||
MtkRectangle tile_rect;
|
||||
int monitor;
|
||||
|
||||
monitor = meta_window_get_current_tile_monitor_number (window);
|
||||
@ -428,8 +428,8 @@ warp_grab_pointer (MetaWindowDrag *window_drag,
|
||||
int *x,
|
||||
int *y)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MetaRectangle display_rect = { 0 };
|
||||
MtkRectangle rect;
|
||||
MtkRectangle display_rect = { 0 };
|
||||
MetaDisplay *display;
|
||||
ClutterSeat *seat;
|
||||
|
||||
@ -589,7 +589,7 @@ process_keyboard_move_grab (MetaWindowDrag *window_drag,
|
||||
{
|
||||
MetaEdgeResistanceFlags flags;
|
||||
gboolean handled;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
ClutterModifierType modifiers;
|
||||
uint32_t keyval;
|
||||
int x, y;
|
||||
@ -841,7 +841,7 @@ process_keyboard_resize_grab (MetaWindowDrag *window_drag,
|
||||
MetaWindow *window,
|
||||
ClutterKeyEvent *event)
|
||||
{
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
gboolean handled;
|
||||
int height_inc;
|
||||
int width_inc;
|
||||
@ -1133,7 +1133,7 @@ update_move_maybe_tile (MetaWindowDrag *window_drag,
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle work_area;
|
||||
|
||||
/* For side-by-side tiling we are interested in the inside vertical
|
||||
* edges of the work area of the monitor where the pointer is located,
|
||||
@ -1186,7 +1186,7 @@ update_move (MetaWindowDrag *window_drag,
|
||||
MetaWindow *window;
|
||||
int dx, dy;
|
||||
int new_x, new_y;
|
||||
MetaRectangle old, frame_rect;
|
||||
MtkRectangle old, frame_rect;
|
||||
int shake_threshold;
|
||||
|
||||
window = window_drag->effective_grab_window;
|
||||
@ -1271,7 +1271,7 @@ update_move (MetaWindowDrag *window_drag,
|
||||
* instead, as the "correct" anchoring looks wrong. */
|
||||
if (window_drag->anchor_root_y < window_drag->initial_window_pos.y)
|
||||
{
|
||||
MetaRectangle titlebar_rect;
|
||||
MtkRectangle titlebar_rect;
|
||||
meta_window_get_titlebar_rect (window, &titlebar_rect);
|
||||
window_drag->anchor_root_y = window_drag->initial_window_pos.y + titlebar_rect.height / 2;
|
||||
}
|
||||
@ -1296,7 +1296,7 @@ update_move (MetaWindowDrag *window_drag,
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
int n_logical_monitors;
|
||||
const MetaLogicalMonitor *wmonitor;
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle work_area;
|
||||
int monitor;
|
||||
|
||||
window->tile_mode = META_TILE_NONE;
|
||||
@ -1424,8 +1424,8 @@ update_resize (MetaWindowDrag *window_drag,
|
||||
{
|
||||
int dx, dy;
|
||||
MetaGravity gravity;
|
||||
MetaRectangle new_rect;
|
||||
MetaRectangle old_rect;
|
||||
MtkRectangle new_rect;
|
||||
MtkRectangle old_rect;
|
||||
MetaWindow *window;
|
||||
|
||||
window = window_drag->effective_grab_window;
|
||||
@ -1581,7 +1581,7 @@ queue_update_resize (MetaWindowDrag *window_drag,
|
||||
static void
|
||||
maybe_maximize_tiled_window (MetaWindow *window)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle work_area;
|
||||
gint shake_threshold;
|
||||
|
||||
if (!META_WINDOW_TILED_SIDE_BY_SIDE (window))
|
||||
|
@ -101,7 +101,7 @@ static void kill_switch_workspace (MetaPlugin *plugin);
|
||||
|
||||
static void show_tile_preview (MetaPlugin *plugin,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor_number);
|
||||
static void hide_tile_preview (MetaPlugin *plugin);
|
||||
|
||||
@ -150,7 +150,7 @@ typedef struct _DisplayTilePreview
|
||||
{
|
||||
ClutterActor *actor;
|
||||
|
||||
MetaRectangle tile_rect;
|
||||
MtkRectangle tile_rect;
|
||||
} DisplayTilePreview;
|
||||
|
||||
static void
|
||||
@ -323,7 +323,7 @@ on_monitors_changed (MetaMonitorManager *monitor_manager,
|
||||
{
|
||||
MetaBackgroundContent *background_content;
|
||||
ClutterContent *content;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
ClutterActor *background_actor;
|
||||
MetaBackground *background;
|
||||
uint8_t red;
|
||||
@ -611,7 +611,7 @@ static void
|
||||
minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
|
||||
{
|
||||
MetaWindowType type;
|
||||
MetaRectangle icon_geometry;
|
||||
MtkRectangle icon_geometry;
|
||||
MetaWindow *meta_window = meta_window_actor_get_meta_window (window_actor);
|
||||
ClutterTimeline *timeline = NULL;
|
||||
ClutterActor *actor = CLUTTER_ACTOR (window_actor);
|
||||
@ -836,7 +836,7 @@ get_display_tile_preview (MetaDisplay *display)
|
||||
static void
|
||||
show_tile_preview (MetaPlugin *plugin,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor_number)
|
||||
{
|
||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||
|
@ -57,7 +57,7 @@ typedef enum _MetaRoundingStrategy
|
||||
*/
|
||||
#define RECT_LENGTH 27
|
||||
#define EDGE_LENGTH 37
|
||||
char* meta_rectangle_to_string (const MetaRectangle *rect,
|
||||
char* meta_rectangle_to_string (const MtkRectangle *rect,
|
||||
char *output);
|
||||
char* meta_rectangle_region_to_string (GList *region,
|
||||
const char *separator_string,
|
||||
@ -75,8 +75,8 @@ char* meta_rectangle_edge_list_to_string (
|
||||
* it in a MoveResize operation if you muck with old_rect just right).
|
||||
*/
|
||||
META_EXPORT_TEST
|
||||
void meta_rectangle_resize_with_gravity (const MetaRectangle *old_rect,
|
||||
MetaRectangle *rect,
|
||||
void meta_rectangle_resize_with_gravity (const MtkRectangle *old_rect,
|
||||
MtkRectangle *rect,
|
||||
MetaGravity gravity,
|
||||
int new_width,
|
||||
int new_height);
|
||||
@ -94,7 +94,7 @@ void meta_rectangle_resize_with_gravity (const MetaRectangle *old_rect,
|
||||
*/
|
||||
META_EXPORT_TEST
|
||||
GList* meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
const MetaRectangle *basic_rect,
|
||||
const MtkRectangle *basic_rect,
|
||||
const GSList *all_struts);
|
||||
|
||||
/* Expand all rectangles in region by the given amount on each side */
|
||||
@ -121,8 +121,8 @@ GList* meta_rectangle_expand_region_conditionally (
|
||||
*/
|
||||
META_EXPORT_TEST
|
||||
void meta_rectangle_expand_to_avoiding_struts (
|
||||
MetaRectangle *rect,
|
||||
const MetaRectangle *expand_to,
|
||||
MtkRectangle *rect,
|
||||
const MtkRectangle *expand_to,
|
||||
const MetaDirection direction,
|
||||
const GSList *all_struts);
|
||||
|
||||
@ -143,21 +143,21 @@ void meta_rectangle_free_list_and_elements (GList *filled_list);
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_rectangle_could_fit_in_region (
|
||||
const GList *spanning_rects,
|
||||
const MetaRectangle *rect);
|
||||
const MtkRectangle *rect);
|
||||
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_rectangle_contained_in_region (
|
||||
const GList *spanning_rects,
|
||||
const MetaRectangle *rect);
|
||||
const MtkRectangle *rect);
|
||||
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_rectangle_overlaps_with_region (
|
||||
const GList *spanning_rects,
|
||||
const MetaRectangle *rect);
|
||||
const MtkRectangle *rect);
|
||||
|
||||
gboolean meta_rectangle_is_adjacent_to_any_in_region (
|
||||
const GList *spanning_rects,
|
||||
MetaRectangle *rect);
|
||||
MtkRectangle *rect);
|
||||
|
||||
/* Make the rectangle small enough to fit into one of the spanning_rects,
|
||||
* but make it no smaller than min_size.
|
||||
@ -166,8 +166,8 @@ META_EXPORT_TEST
|
||||
void meta_rectangle_clamp_to_fit_into_region (
|
||||
const GList *spanning_rects,
|
||||
FixedDirections fixed_directions,
|
||||
MetaRectangle *rect,
|
||||
const MetaRectangle *min_size);
|
||||
MtkRectangle *rect,
|
||||
const MtkRectangle *min_size);
|
||||
|
||||
/* Clip the rectangle so that it fits into one of the spanning_rects, assuming
|
||||
* it overlaps with at least one of them
|
||||
@ -175,7 +175,7 @@ void meta_rectangle_clamp_to_fit_into_region (
|
||||
META_EXPORT_TEST
|
||||
void meta_rectangle_clip_to_region (const GList *spanning_rects,
|
||||
FixedDirections fixed_directions,
|
||||
MetaRectangle *rect);
|
||||
MtkRectangle *rect);
|
||||
|
||||
/* Shove the rectangle into one of the spanning_rects, assuming it fits in
|
||||
* one of them.
|
||||
@ -184,7 +184,7 @@ META_EXPORT_TEST
|
||||
void meta_rectangle_shove_into_region(
|
||||
const GList *spanning_rects,
|
||||
FixedDirections fixed_directions,
|
||||
MetaRectangle *rect);
|
||||
MtkRectangle *rect);
|
||||
|
||||
/* Finds the point on the line connecting (x1,y1) to (x2,y2) which is closest
|
||||
* to (px, py). Useful for finding an optimal rectangle size when given a
|
||||
@ -206,7 +206,7 @@ void meta_rectangle_find_linepoint_closest_to_point (double x1, double y1,
|
||||
* nonzero-width dimension of the edge.
|
||||
*/
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_rectangle_edge_aligns (const MetaRectangle *rect,
|
||||
gboolean meta_rectangle_edge_aligns (const MtkRectangle *rect,
|
||||
const MetaEdge *edge);
|
||||
|
||||
/* Compare two edges, so that sorting functions can put a list of edges in
|
||||
@ -233,7 +233,7 @@ GList* meta_rectangle_remove_intersections_with_boxes_from_edges (
|
||||
* MetaEdgeRect's.
|
||||
*/
|
||||
META_EXPORT_TEST
|
||||
GList* meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
|
||||
GList* meta_rectangle_find_onscreen_edges (const MtkRectangle *basic_rect,
|
||||
const GSList *all_struts);
|
||||
|
||||
/* Finds edges between adjacent monitors which are not covered by the given
|
||||
@ -245,17 +245,17 @@ GList* meta_rectangle_find_nonintersected_monitor_edges (
|
||||
const GSList *all_struts);
|
||||
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_rectangle_is_adjacent_to (MetaRectangle *rect,
|
||||
MetaRectangle *other);
|
||||
gboolean meta_rectangle_is_adjacent_to (MtkRectangle *rect,
|
||||
MtkRectangle *other);
|
||||
|
||||
META_EXPORT_TEST
|
||||
void meta_rectangle_scale_double (const MetaRectangle *rect,
|
||||
void meta_rectangle_scale_double (const MtkRectangle *rect,
|
||||
double scale,
|
||||
MetaRoundingStrategy rounding_strategy,
|
||||
MetaRectangle *dest);
|
||||
MtkRectangle *dest);
|
||||
|
||||
static inline graphene_rect_t
|
||||
meta_rectangle_to_graphene_rect (MetaRectangle *rect)
|
||||
meta_rectangle_to_graphene_rect (MtkRectangle *rect)
|
||||
{
|
||||
return (graphene_rect_t) {
|
||||
.origin = {
|
||||
@ -270,18 +270,18 @@ meta_rectangle_to_graphene_rect (MetaRectangle *rect)
|
||||
}
|
||||
|
||||
META_EXPORT_TEST
|
||||
void meta_rectangle_transform (const MetaRectangle *rect,
|
||||
void meta_rectangle_transform (const MtkRectangle *rect,
|
||||
MetaMonitorTransform transform,
|
||||
int width,
|
||||
int height,
|
||||
MetaRectangle *dest);
|
||||
MtkRectangle *dest);
|
||||
|
||||
void meta_rectangle_from_graphene_rect (const graphene_rect_t *rect,
|
||||
MetaRoundingStrategy rounding_strategy,
|
||||
MetaRectangle *dest);
|
||||
MtkRectangle *dest);
|
||||
|
||||
void meta_rectangle_crop_and_scale (const MetaRectangle *rect,
|
||||
void meta_rectangle_crop_and_scale (const MtkRectangle *rect,
|
||||
graphene_rect_t *src_rect,
|
||||
int dst_width,
|
||||
int dst_height,
|
||||
MetaRectangle *dest);
|
||||
MtkRectangle *dest);
|
||||
|
198
src/core/boxes.c
198
src/core/boxes.c
@ -31,28 +31,8 @@
|
||||
|
||||
#include "meta/util.h"
|
||||
|
||||
/* It would make sense to use GSlice here, but until we clean up the
|
||||
* rest of this file and the internal API to use these functions, we
|
||||
* leave it using g_malloc()/g_free() for consistency.
|
||||
*/
|
||||
|
||||
MetaRectangle *
|
||||
meta_rectangle_copy (const MetaRectangle *rect)
|
||||
{
|
||||
return g_memdup2 (rect, sizeof (MetaRectangle));
|
||||
}
|
||||
|
||||
void
|
||||
meta_rectangle_free (MetaRectangle *rect)
|
||||
{
|
||||
g_free (rect);
|
||||
}
|
||||
|
||||
G_DEFINE_BOXED_TYPE (MetaRectangle, meta_rectangle,
|
||||
meta_rectangle_copy, meta_rectangle_free);
|
||||
|
||||
char*
|
||||
meta_rectangle_to_string (const MetaRectangle *rect,
|
||||
meta_rectangle_to_string (const MtkRectangle *rect,
|
||||
char *output)
|
||||
{
|
||||
/* 25 chars: 2 commas, space, plus, trailing \0 + 5 for each digit.
|
||||
@ -85,7 +65,7 @@ meta_rectangle_region_to_string (GList *region,
|
||||
|
||||
while (tmp)
|
||||
{
|
||||
MetaRectangle *rect = tmp->data;
|
||||
MtkRectangle *rect = tmp->data;
|
||||
g_snprintf (rect_string, RECT_LENGTH, "[%d,%d +%d,%d]",
|
||||
rect->x, rect->y, rect->width, rect->height);
|
||||
cur = g_stpcpy (cur, rect_string);
|
||||
@ -121,7 +101,7 @@ meta_rectangle_edge_list_to_string (GList *edge_list,
|
||||
while (tmp)
|
||||
{
|
||||
MetaEdge *edge = tmp->data;
|
||||
MetaRectangle *rect = &edge->rect;
|
||||
MtkRectangle *rect = &edge->rect;
|
||||
g_snprintf (rect_string, EDGE_LENGTH, "([%d,%d +%d,%d], %2d, %2d)",
|
||||
rect->x, rect->y, rect->width, rect->height,
|
||||
edge->side_type, edge->edge_type);
|
||||
@ -135,8 +115,8 @@ return output;
|
||||
}
|
||||
|
||||
void
|
||||
meta_rectangle_resize_with_gravity (const MetaRectangle *old_rect,
|
||||
MetaRectangle *rect,
|
||||
meta_rectangle_resize_with_gravity (const MtkRectangle *old_rect,
|
||||
MtkRectangle *rect,
|
||||
MetaGravity gravity,
|
||||
int new_width,
|
||||
int new_height)
|
||||
@ -251,14 +231,14 @@ merge_spanning_rects_in_region (GList *region)
|
||||
|
||||
while (compare && compare->next)
|
||||
{
|
||||
MetaRectangle *a = compare->data;
|
||||
MtkRectangle *a = compare->data;
|
||||
GList *other = compare->next;
|
||||
|
||||
g_assert (a->width > 0 && a->height > 0);
|
||||
|
||||
while (other)
|
||||
{
|
||||
MetaRectangle *b = other->data;
|
||||
MtkRectangle *b = other->data;
|
||||
GList *delete_me = NULL;
|
||||
|
||||
g_assert (b->width > 0 && b->height > 0);
|
||||
@ -344,8 +324,8 @@ merge_spanning_rects_in_region (GList *region)
|
||||
static gint
|
||||
compare_rect_areas (gconstpointer a, gconstpointer b)
|
||||
{
|
||||
const MetaRectangle *a_rect = (gconstpointer) a;
|
||||
const MetaRectangle *b_rect = (gconstpointer) b;
|
||||
const MtkRectangle *a_rect = (gconstpointer) a;
|
||||
const MtkRectangle *b_rect = (gconstpointer) b;
|
||||
|
||||
int a_area = mtk_rectangle_area (a_rect);
|
||||
int b_area = mtk_rectangle_area (b_rect);
|
||||
@ -355,7 +335,8 @@ compare_rect_areas (gconstpointer a, gconstpointer b)
|
||||
|
||||
/* ... and another helper for get_minimal_spanning_set_for_region()... */
|
||||
static gboolean
|
||||
check_strut_align (MetaStrut *strut, const MetaRectangle *rect)
|
||||
check_strut_align (MetaStrut *strut,
|
||||
const MtkRectangle *rect)
|
||||
{
|
||||
/* Check whether @strut actually aligns to the side of @rect it claims */
|
||||
switch (strut->side)
|
||||
@ -395,7 +376,7 @@ check_strut_align (MetaStrut *strut, const MetaRectangle *rect)
|
||||
*/
|
||||
GList*
|
||||
meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
const MetaRectangle *basic_rect,
|
||||
const MtkRectangle *basic_rect,
|
||||
const GSList *all_struts)
|
||||
{
|
||||
/* NOTE FOR OPTIMIZERS: This function *might* be somewhat slow,
|
||||
@ -437,7 +418,7 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
GList *ret;
|
||||
GList *tmp_list;
|
||||
const GSList *strut_iter;
|
||||
MetaRectangle *temp_rect;
|
||||
MtkRectangle *temp_rect;
|
||||
|
||||
/* The algorithm is basically as follows:
|
||||
* Initialize rectangle_set to basic_rect
|
||||
@ -450,7 +431,7 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
* splitting
|
||||
*/
|
||||
|
||||
temp_rect = g_new (MetaRectangle, 1);
|
||||
temp_rect = g_new (MtkRectangle, 1);
|
||||
*temp_rect = *basic_rect;
|
||||
ret = g_list_prepend (NULL, temp_rect);
|
||||
|
||||
@ -458,14 +439,14 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
{
|
||||
GList *rect_iter;
|
||||
MetaStrut *strut = (MetaStrut*)strut_iter->data;
|
||||
MetaRectangle *strut_rect = &strut->rect;
|
||||
MtkRectangle *strut_rect = &strut->rect;
|
||||
|
||||
tmp_list = ret;
|
||||
ret = NULL;
|
||||
rect_iter = tmp_list;
|
||||
while (rect_iter)
|
||||
{
|
||||
MetaRectangle *rect = (MetaRectangle*) rect_iter->data;
|
||||
MtkRectangle *rect = (MtkRectangle*) rect_iter->data;
|
||||
|
||||
if (!mtk_rectangle_overlap (strut_rect, rect) ||
|
||||
!check_strut_align (strut, basic_rect))
|
||||
@ -475,7 +456,7 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
/* If there is area in rect left of strut */
|
||||
if (BOX_LEFT (*rect) < BOX_LEFT (*strut_rect))
|
||||
{
|
||||
temp_rect = g_new (MetaRectangle, 1);
|
||||
temp_rect = g_new (MtkRectangle, 1);
|
||||
*temp_rect = *rect;
|
||||
temp_rect->width = BOX_LEFT (*strut_rect) - BOX_LEFT (*rect);
|
||||
ret = g_list_prepend (ret, temp_rect);
|
||||
@ -484,7 +465,7 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
if (BOX_RIGHT (*rect) > BOX_RIGHT (*strut_rect))
|
||||
{
|
||||
int new_x;
|
||||
temp_rect = g_new (MetaRectangle, 1);
|
||||
temp_rect = g_new (MtkRectangle, 1);
|
||||
*temp_rect = *rect;
|
||||
new_x = BOX_RIGHT (*strut_rect);
|
||||
temp_rect->width = BOX_RIGHT (*rect) - new_x;
|
||||
@ -494,7 +475,7 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
/* If there is area in rect above strut */
|
||||
if (BOX_TOP (*rect) < BOX_TOP (*strut_rect))
|
||||
{
|
||||
temp_rect = g_new (MetaRectangle, 1);
|
||||
temp_rect = g_new (MtkRectangle, 1);
|
||||
*temp_rect = *rect;
|
||||
temp_rect->height = BOX_TOP (*strut_rect) - BOX_TOP (*rect);
|
||||
ret = g_list_prepend (ret, temp_rect);
|
||||
@ -503,7 +484,7 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
if (BOX_BOTTOM (*rect) > BOX_BOTTOM (*strut_rect))
|
||||
{
|
||||
int new_y;
|
||||
temp_rect = g_new (MetaRectangle, 1);
|
||||
temp_rect = g_new (MtkRectangle, 1);
|
||||
*temp_rect = *rect;
|
||||
new_y = BOX_BOTTOM (*strut_rect);
|
||||
temp_rect->height = BOX_BOTTOM (*rect) - new_y;
|
||||
@ -562,7 +543,7 @@ meta_rectangle_expand_region_conditionally (GList *region,
|
||||
GList *tmp_list = region;
|
||||
while (tmp_list)
|
||||
{
|
||||
MetaRectangle *rect = (MetaRectangle*) tmp_list->data;
|
||||
MtkRectangle *rect = (MtkRectangle*) tmp_list->data;
|
||||
if (rect->width >= min_x)
|
||||
{
|
||||
rect->x -= left_expand;
|
||||
@ -580,8 +561,8 @@ meta_rectangle_expand_region_conditionally (GList *region,
|
||||
}
|
||||
|
||||
void
|
||||
meta_rectangle_expand_to_avoiding_struts (MetaRectangle *rect,
|
||||
const MetaRectangle *expand_to,
|
||||
meta_rectangle_expand_to_avoiding_struts (MtkRectangle *rect,
|
||||
const MtkRectangle *expand_to,
|
||||
const MetaDirection direction,
|
||||
const GSList *all_struts)
|
||||
{
|
||||
@ -657,7 +638,7 @@ meta_rectangle_free_list_and_elements (GList *filled_list)
|
||||
|
||||
gboolean
|
||||
meta_rectangle_could_fit_in_region (const GList *spanning_rects,
|
||||
const MetaRectangle *rect)
|
||||
const MtkRectangle *rect)
|
||||
{
|
||||
const GList *temp;
|
||||
gboolean could_fit;
|
||||
@ -674,8 +655,8 @@ meta_rectangle_could_fit_in_region (const GList *spanning_rects,
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_rectangle_contained_in_region (const GList *spanning_rects,
|
||||
const MetaRectangle *rect)
|
||||
meta_rectangle_contained_in_region (const GList * spanning_rects,
|
||||
const MtkRectangle * rect)
|
||||
{
|
||||
const GList *temp;
|
||||
gboolean contained;
|
||||
@ -692,8 +673,8 @@ meta_rectangle_contained_in_region (const GList *spanning_rects,
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_rectangle_overlaps_with_region (const GList *spanning_rects,
|
||||
const MetaRectangle *rect)
|
||||
meta_rectangle_overlaps_with_region (const GList * spanning_rects,
|
||||
const MtkRectangle * rect)
|
||||
{
|
||||
const GList *temp;
|
||||
gboolean overlaps;
|
||||
@ -711,13 +692,13 @@ meta_rectangle_overlaps_with_region (const GList *spanning_rects,
|
||||
|
||||
gboolean
|
||||
meta_rectangle_is_adjacent_to_any_in_region (const GList *spanning_rects,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
const GList *l;
|
||||
|
||||
for (l = spanning_rects; l; l = l->next)
|
||||
{
|
||||
MetaRectangle *other = (MetaRectangle *) l->data;
|
||||
MtkRectangle *other = (MtkRectangle *) l->data;
|
||||
|
||||
if (rect == other || mtk_rectangle_equal (rect, other))
|
||||
continue;
|
||||
@ -732,11 +713,11 @@ meta_rectangle_is_adjacent_to_any_in_region (const GList *spanning_rects,
|
||||
void
|
||||
meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects,
|
||||
FixedDirections fixed_directions,
|
||||
MetaRectangle *rect,
|
||||
const MetaRectangle *min_size)
|
||||
MtkRectangle *rect,
|
||||
const MtkRectangle *min_size)
|
||||
{
|
||||
const GList *temp;
|
||||
const MetaRectangle *best_rect = NULL;
|
||||
const MtkRectangle *best_rect = NULL;
|
||||
int best_overlap = 0;
|
||||
|
||||
/* First, find best rectangle from spanning_rects to which we can clamp
|
||||
@ -744,7 +725,7 @@ meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects,
|
||||
*/
|
||||
for (temp = spanning_rects; temp; temp = temp->next)
|
||||
{
|
||||
MetaRectangle *compare_rect = temp->data;
|
||||
MtkRectangle *compare_rect = temp->data;
|
||||
int maximal_overlap_amount_for_compare;
|
||||
|
||||
/* If x is fixed and the entire width of rect doesn't fit in compare,
|
||||
@ -802,10 +783,10 @@ meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects,
|
||||
void
|
||||
meta_rectangle_clip_to_region (const GList *spanning_rects,
|
||||
FixedDirections fixed_directions,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
const GList *temp;
|
||||
const MetaRectangle *best_rect = NULL;
|
||||
const MtkRectangle *best_rect = NULL;
|
||||
int best_overlap = 0;
|
||||
|
||||
/* First, find best rectangle from spanning_rects to which we will clip
|
||||
@ -813,8 +794,8 @@ meta_rectangle_clip_to_region (const GList *spanning_rects,
|
||||
*/
|
||||
for (temp = spanning_rects; temp; temp = temp->next)
|
||||
{
|
||||
MetaRectangle *compare_rect = temp->data;
|
||||
MetaRectangle overlap;
|
||||
MtkRectangle *compare_rect = temp->data;
|
||||
MtkRectangle overlap;
|
||||
int maximal_overlap_amount_for_compare;
|
||||
|
||||
/* If x is fixed and the entire width of rect doesn't fit in compare,
|
||||
@ -881,10 +862,10 @@ meta_rectangle_clip_to_region (const GList *spanning_rects,
|
||||
void
|
||||
meta_rectangle_shove_into_region (const GList *spanning_rects,
|
||||
FixedDirections fixed_directions,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
const GList *temp;
|
||||
const MetaRectangle *best_rect = NULL;
|
||||
const MtkRectangle *best_rect = NULL;
|
||||
int best_overlap = 0;
|
||||
int shortest_distance = G_MAXINT;
|
||||
|
||||
@ -894,7 +875,7 @@ meta_rectangle_shove_into_region (const GList *spanning_rects,
|
||||
|
||||
for (temp = spanning_rects; temp; temp = temp->next)
|
||||
{
|
||||
MetaRectangle *compare_rect = temp->data;
|
||||
MtkRectangle *compare_rect = temp->data;
|
||||
int maximal_overlap_amount_for_compare;
|
||||
int dist_to_compare;
|
||||
|
||||
@ -1044,7 +1025,8 @@ meta_rectangle_find_linepoint_closest_to_point (double x1,
|
||||
/***************************************************************************/
|
||||
|
||||
gboolean
|
||||
meta_rectangle_edge_aligns (const MetaRectangle *rect, const MetaEdge *edge)
|
||||
meta_rectangle_edge_aligns (const MtkRectangle *rect,
|
||||
const MetaEdge *edge)
|
||||
{
|
||||
/* The reason for the usage of <= below instead of < is because we are
|
||||
* interested in in-the-way-or-adject'ness. So, a left (i.e. vertical
|
||||
@ -1070,22 +1052,22 @@ meta_rectangle_edge_aligns (const MetaRectangle *rect, const MetaEdge *edge)
|
||||
|
||||
static GList*
|
||||
get_rect_minus_overlap (const GList *rect_in_list,
|
||||
MetaRectangle *overlap)
|
||||
MtkRectangle *overlap)
|
||||
{
|
||||
MetaRectangle *temp;
|
||||
MetaRectangle *rect = rect_in_list->data;
|
||||
MtkRectangle *temp;
|
||||
MtkRectangle *rect = rect_in_list->data;
|
||||
GList *ret = NULL;
|
||||
|
||||
if (BOX_LEFT (*rect) < BOX_LEFT (*overlap))
|
||||
{
|
||||
temp = g_new (MetaRectangle, 1);
|
||||
temp = g_new (MtkRectangle, 1);
|
||||
*temp = *rect;
|
||||
temp->width = BOX_LEFT (*overlap) - BOX_LEFT (*rect);
|
||||
ret = g_list_prepend (ret, temp);
|
||||
}
|
||||
if (BOX_RIGHT (*rect) > BOX_RIGHT (*overlap))
|
||||
{
|
||||
temp = g_new (MetaRectangle, 1);
|
||||
temp = g_new (MtkRectangle, 1);
|
||||
*temp = *rect;
|
||||
temp->x = BOX_RIGHT (*overlap);
|
||||
temp->width = BOX_RIGHT (*rect) - BOX_RIGHT (*overlap);
|
||||
@ -1093,7 +1075,7 @@ get_rect_minus_overlap (const GList *rect_in_list,
|
||||
}
|
||||
if (BOX_TOP (*rect) < BOX_TOP (*overlap))
|
||||
{
|
||||
temp = g_new (MetaRectangle, 1);
|
||||
temp = g_new (MtkRectangle, 1);
|
||||
temp->x = overlap->x;
|
||||
temp->width = overlap->width;
|
||||
temp->y = BOX_TOP (*rect);
|
||||
@ -1102,7 +1084,7 @@ get_rect_minus_overlap (const GList *rect_in_list,
|
||||
}
|
||||
if (BOX_BOTTOM (*rect) > BOX_BOTTOM (*overlap))
|
||||
{
|
||||
temp = g_new (MetaRectangle, 1);
|
||||
temp = g_new (MtkRectangle, 1);
|
||||
temp->x = overlap->x;
|
||||
temp->width = overlap->width;
|
||||
temp->y = BOX_BOTTOM (*overlap);
|
||||
@ -1156,7 +1138,7 @@ replace_rect_with_list (GList *old_element,
|
||||
*/
|
||||
static GList*
|
||||
get_disjoint_strut_rect_list_in_region (const GSList *old_struts,
|
||||
const MetaRectangle *region)
|
||||
const MtkRectangle *region)
|
||||
{
|
||||
GList *strut_rects;
|
||||
GList *tmp;
|
||||
@ -1165,8 +1147,8 @@ get_disjoint_strut_rect_list_in_region (const GSList *old_struts,
|
||||
strut_rects = NULL;
|
||||
while (old_struts)
|
||||
{
|
||||
MetaRectangle *cur = &((MetaStrut*)old_struts->data)->rect;
|
||||
MetaRectangle *copy = g_new (MetaRectangle, 1);
|
||||
MtkRectangle *cur = &((MetaStrut*)old_struts->data)->rect;
|
||||
MtkRectangle *copy = g_new (MtkRectangle, 1);
|
||||
*copy = *cur;
|
||||
if (mtk_rectangle_intersect (copy, region, copy))
|
||||
strut_rects = g_list_prepend (strut_rects, copy);
|
||||
@ -1184,13 +1166,13 @@ get_disjoint_strut_rect_list_in_region (const GSList *old_struts,
|
||||
{
|
||||
GList *compare;
|
||||
|
||||
MetaRectangle *cur = tmp->data;
|
||||
MtkRectangle *cur = tmp->data;
|
||||
|
||||
compare = tmp->next;
|
||||
while (compare)
|
||||
{
|
||||
MetaRectangle *comp = compare->data;
|
||||
MetaRectangle overlap;
|
||||
MtkRectangle *comp = compare->data;
|
||||
MtkRectangle overlap;
|
||||
|
||||
if (mtk_rectangle_intersect (cur, comp, &overlap))
|
||||
{
|
||||
@ -1201,7 +1183,7 @@ get_disjoint_strut_rect_list_in_region (const GSList *old_struts,
|
||||
GList *comp_leftover = get_rect_minus_overlap (compare, &overlap);
|
||||
|
||||
/* Add the intersection region to cur_leftover */
|
||||
MetaRectangle *overlap_allocated = g_new (MetaRectangle, 1);
|
||||
MtkRectangle *overlap_allocated = g_new (MtkRectangle, 1);
|
||||
*overlap_allocated = overlap;
|
||||
cur_leftover = g_list_prepend (cur_leftover, overlap_allocated);
|
||||
|
||||
@ -1313,13 +1295,13 @@ edges_overlap (const MetaEdge *edge1,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
rectangle_and_edge_intersection (const MetaRectangle *rect,
|
||||
rectangle_and_edge_intersection (const MtkRectangle *rect,
|
||||
const MetaEdge *edge,
|
||||
MetaEdge *overlap,
|
||||
int *handle_type)
|
||||
{
|
||||
const MetaRectangle *rect2 = &edge->rect;
|
||||
MetaRectangle *result = &overlap->rect;
|
||||
const MtkRectangle *rect2 = &edge->rect;
|
||||
MtkRectangle *result = &overlap->rect;
|
||||
gboolean intersect = TRUE;
|
||||
|
||||
/* We don't know how to set these, so set them to invalid values */
|
||||
@ -1398,7 +1380,7 @@ rectangle_and_edge_intersection (const MetaRectangle *rect,
|
||||
*/
|
||||
static GList*
|
||||
add_edges (GList *cur_edges,
|
||||
const MetaRectangle *rect,
|
||||
const MtkRectangle *rect,
|
||||
gboolean rect_is_internal)
|
||||
{
|
||||
MetaEdge *temp_edge;
|
||||
@ -1504,8 +1486,10 @@ split_edge (GList *cur_list,
|
||||
* if and how rect and edge intersect.
|
||||
*/
|
||||
static void
|
||||
fix_up_edges (MetaRectangle *rect, MetaEdge *edge,
|
||||
GList **strut_edges, GList **edge_splits,
|
||||
fix_up_edges (MtkRectangle *rect,
|
||||
MetaEdge *edge,
|
||||
GList **strut_edges,
|
||||
GList **edge_splits,
|
||||
gboolean *edge_needs_removal)
|
||||
{
|
||||
MetaEdge overlap;
|
||||
@ -1566,7 +1550,7 @@ meta_rectangle_remove_intersections_with_boxes_from_edges (
|
||||
rect_iter = rectangles;
|
||||
while (rect_iter)
|
||||
{
|
||||
MetaRectangle *rect = rect_iter->data;
|
||||
MtkRectangle *rect = rect_iter->data;
|
||||
GList *edge_iter = edges;
|
||||
while (edge_iter)
|
||||
{
|
||||
@ -1623,7 +1607,7 @@ meta_rectangle_remove_intersections_with_boxes_from_edges (
|
||||
* This function is trying to find all the edges of an onscreen region.
|
||||
*/
|
||||
GList*
|
||||
meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
|
||||
meta_rectangle_find_onscreen_edges (const MtkRectangle *basic_rect,
|
||||
const GSList *all_struts)
|
||||
{
|
||||
GList *ret;
|
||||
@ -1656,7 +1640,7 @@ meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
|
||||
strut_rect_iter = fixed_strut_rects;
|
||||
while (strut_rect_iter)
|
||||
{
|
||||
MetaRectangle *strut_rect = (MetaRectangle*) strut_rect_iter->data;
|
||||
MtkRectangle *strut_rect = (MtkRectangle*) strut_rect_iter->data;
|
||||
|
||||
/* Get the new possible edges we may need to add from the strut */
|
||||
GList *new_strut_edges = add_edges (NULL, strut_rect, FALSE);
|
||||
@ -1731,11 +1715,11 @@ meta_rectangle_find_nonintersected_monitor_edges (
|
||||
cur = monitor_rects;
|
||||
while (cur)
|
||||
{
|
||||
MetaRectangle *cur_rect = cur->data;
|
||||
MtkRectangle *cur_rect = cur->data;
|
||||
const GList *compare = monitor_rects;
|
||||
while (compare)
|
||||
{
|
||||
MetaRectangle *compare_rect = compare->data;
|
||||
MtkRectangle *compare_rect = compare->data;
|
||||
|
||||
/* Check if cur might be horizontally adjacent to compare */
|
||||
if (mtk_rectangle_vert_overlap (cur_rect, compare_rect))
|
||||
@ -1843,8 +1827,8 @@ meta_rectangle_find_nonintersected_monitor_edges (
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_rectangle_is_adjacent_to (MetaRectangle *rect,
|
||||
MetaRectangle *other)
|
||||
meta_rectangle_is_adjacent_to (MtkRectangle *rect,
|
||||
MtkRectangle *other)
|
||||
{
|
||||
int rect_x1 = rect->x;
|
||||
int rect_y1 = rect->y;
|
||||
@ -1866,10 +1850,10 @@ meta_rectangle_is_adjacent_to (MetaRectangle *rect,
|
||||
}
|
||||
|
||||
void
|
||||
meta_rectangle_scale_double (const MetaRectangle *rect,
|
||||
meta_rectangle_scale_double (const MtkRectangle *rect,
|
||||
double scale,
|
||||
MetaRoundingStrategy rounding_strategy,
|
||||
MetaRectangle *dest)
|
||||
MtkRectangle *dest)
|
||||
{
|
||||
graphene_rect_t tmp = GRAPHENE_RECT_INIT (rect->x, rect->y,
|
||||
rect->width, rect->height);
|
||||
@ -1880,11 +1864,11 @@ meta_rectangle_scale_double (const MetaRectangle *rect,
|
||||
|
||||
/**
|
||||
* meta_rectangle_transform:
|
||||
* @rect: the #MetaRectangle to be transformed
|
||||
* @rect: the #MtkRectangle to be transformed
|
||||
* @transform: the #MetaMonitorTransform
|
||||
* @width: the width of the target space
|
||||
* @height: the height of the target space
|
||||
* @dest: the transformed #MetaRectangle
|
||||
* @dest: the transformed #MtkRectangle
|
||||
*
|
||||
* This function transforms the values in @rect in order to compensate for
|
||||
* @transform applied to a #MetaMonitor, making them match the viewport. Note
|
||||
@ -1892,11 +1876,11 @@ meta_rectangle_scale_double (const MetaRectangle *rect,
|
||||
* an anti-clockwise rotation has to be applied to @rect.
|
||||
*/
|
||||
void
|
||||
meta_rectangle_transform (const MetaRectangle *rect,
|
||||
meta_rectangle_transform (const MtkRectangle *rect,
|
||||
MetaMonitorTransform transform,
|
||||
int width,
|
||||
int height,
|
||||
MetaRectangle *dest)
|
||||
MtkRectangle *dest)
|
||||
{
|
||||
switch (transform)
|
||||
{
|
||||
@ -1904,7 +1888,7 @@ meta_rectangle_transform (const MetaRectangle *rect,
|
||||
*dest = *rect;
|
||||
break;
|
||||
case META_MONITOR_TRANSFORM_90:
|
||||
*dest = (MetaRectangle) {
|
||||
*dest = (MtkRectangle) {
|
||||
.x = rect->y,
|
||||
.y = height - (rect->x + rect->width),
|
||||
.width = rect->height,
|
||||
@ -1912,7 +1896,7 @@ meta_rectangle_transform (const MetaRectangle *rect,
|
||||
};
|
||||
break;
|
||||
case META_MONITOR_TRANSFORM_180:
|
||||
*dest = (MetaRectangle) {
|
||||
*dest = (MtkRectangle) {
|
||||
.x = width - (rect->x + rect->width),
|
||||
.y = height - (rect->y + rect->height),
|
||||
.width = rect->width,
|
||||
@ -1920,7 +1904,7 @@ meta_rectangle_transform (const MetaRectangle *rect,
|
||||
};
|
||||
break;
|
||||
case META_MONITOR_TRANSFORM_270:
|
||||
*dest = (MetaRectangle) {
|
||||
*dest = (MtkRectangle) {
|
||||
.x = width - (rect->y + rect->height),
|
||||
.y = rect->x,
|
||||
.width = rect->height,
|
||||
@ -1928,7 +1912,7 @@ meta_rectangle_transform (const MetaRectangle *rect,
|
||||
};
|
||||
break;
|
||||
case META_MONITOR_TRANSFORM_FLIPPED:
|
||||
*dest = (MetaRectangle) {
|
||||
*dest = (MtkRectangle) {
|
||||
.x = width - (rect->x + rect->width),
|
||||
.y = rect->y,
|
||||
.width = rect->width,
|
||||
@ -1936,7 +1920,7 @@ meta_rectangle_transform (const MetaRectangle *rect,
|
||||
};
|
||||
break;
|
||||
case META_MONITOR_TRANSFORM_FLIPPED_90:
|
||||
*dest = (MetaRectangle) {
|
||||
*dest = (MtkRectangle) {
|
||||
.x = rect->y,
|
||||
.y = rect->x,
|
||||
.width = rect->height,
|
||||
@ -1944,7 +1928,7 @@ meta_rectangle_transform (const MetaRectangle *rect,
|
||||
};
|
||||
break;
|
||||
case META_MONITOR_TRANSFORM_FLIPPED_180:
|
||||
*dest = (MetaRectangle) {
|
||||
*dest = (MtkRectangle) {
|
||||
.x = rect->x,
|
||||
.y = height - (rect->y + rect->height),
|
||||
.width = rect->width,
|
||||
@ -1952,7 +1936,7 @@ meta_rectangle_transform (const MetaRectangle *rect,
|
||||
};
|
||||
break;
|
||||
case META_MONITOR_TRANSFORM_FLIPPED_270:
|
||||
*dest = (MetaRectangle) {
|
||||
*dest = (MtkRectangle) {
|
||||
.x = width - (rect->y + rect->height),
|
||||
.y = height - (rect->x + rect->width),
|
||||
.width = rect->height,
|
||||
@ -1965,13 +1949,13 @@ meta_rectangle_transform (const MetaRectangle *rect,
|
||||
void
|
||||
meta_rectangle_from_graphene_rect (const graphene_rect_t *rect,
|
||||
MetaRoundingStrategy rounding_strategy,
|
||||
MetaRectangle *dest)
|
||||
MtkRectangle *dest)
|
||||
{
|
||||
switch (rounding_strategy)
|
||||
{
|
||||
case META_ROUNDING_STRATEGY_SHRINK:
|
||||
{
|
||||
*dest = (MetaRectangle) {
|
||||
*dest = (MtkRectangle) {
|
||||
.x = ceilf (rect->origin.x),
|
||||
.y = ceilf (rect->origin.y),
|
||||
.width = floorf (rect->size.width),
|
||||
@ -1985,7 +1969,7 @@ meta_rectangle_from_graphene_rect (const graphene_rect_t *rect,
|
||||
|
||||
graphene_rect_round_extents (&clamped, &clamped);
|
||||
|
||||
*dest = (MetaRectangle) {
|
||||
*dest = (MtkRectangle) {
|
||||
.x = clamped.origin.x,
|
||||
.y = clamped.origin.y,
|
||||
.width = clamped.size.width,
|
||||
@ -1995,7 +1979,7 @@ meta_rectangle_from_graphene_rect (const graphene_rect_t *rect,
|
||||
break;
|
||||
case META_ROUNDING_STRATEGY_ROUND:
|
||||
{
|
||||
*dest = (MetaRectangle) {
|
||||
*dest = (MtkRectangle) {
|
||||
.x = roundf (rect->origin.x),
|
||||
.y = roundf (rect->origin.y),
|
||||
.width = roundf (rect->size.width),
|
||||
@ -2006,11 +1990,11 @@ meta_rectangle_from_graphene_rect (const graphene_rect_t *rect,
|
||||
}
|
||||
|
||||
void
|
||||
meta_rectangle_crop_and_scale (const MetaRectangle *rect,
|
||||
meta_rectangle_crop_and_scale (const MtkRectangle *rect,
|
||||
graphene_rect_t *src_rect,
|
||||
int dst_width,
|
||||
int dst_height,
|
||||
MetaRectangle *dest)
|
||||
MtkRectangle *dest)
|
||||
{
|
||||
graphene_rect_t tmp = GRAPHENE_RECT_INIT (rect->x, rect->y,
|
||||
rect->width, rect->height);
|
||||
|
@ -124,9 +124,9 @@ typedef struct
|
||||
{
|
||||
MetaBackend *backend;
|
||||
|
||||
MetaRectangle orig;
|
||||
MetaRectangle current;
|
||||
MetaRectangle temporary;
|
||||
MtkRectangle orig;
|
||||
MtkRectangle current;
|
||||
MtkRectangle temporary;
|
||||
int rel_x;
|
||||
int rel_y;
|
||||
ActionType action_type;
|
||||
@ -143,8 +143,8 @@ typedef struct
|
||||
/* work_area_monitor - current monitor region minus struts
|
||||
* entire_monitor - current monitor, including strut regions
|
||||
*/
|
||||
MetaRectangle work_area_monitor;
|
||||
MetaRectangle entire_monitor;
|
||||
MtkRectangle work_area_monitor;
|
||||
MtkRectangle entire_monitor;
|
||||
|
||||
/* Spanning rectangles for the non-covered (by struts) region of the
|
||||
* screen and also for just the current monitor
|
||||
@ -213,8 +213,8 @@ static void setup_constraint_info (MetaBackend *backend,
|
||||
MetaWindow *window,
|
||||
MetaMoveResizeFlags flags,
|
||||
MetaGravity resize_gravity,
|
||||
const MetaRectangle *orig,
|
||||
MetaRectangle *new);
|
||||
const MtkRectangle *orig,
|
||||
MtkRectangle *new);
|
||||
static void place_window_if_needed (MetaWindow *window,
|
||||
ConstraintInfo *info);
|
||||
static void update_onscreen_requirements (MetaWindow *window,
|
||||
@ -289,9 +289,9 @@ void
|
||||
meta_window_constrain (MetaWindow *window,
|
||||
MetaMoveResizeFlags flags,
|
||||
MetaGravity resize_gravity,
|
||||
const MetaRectangle *orig,
|
||||
MetaRectangle *new,
|
||||
MetaRectangle *temporary,
|
||||
const MtkRectangle *orig,
|
||||
MtkRectangle *new,
|
||||
MtkRectangle *temporary,
|
||||
int *rel_x,
|
||||
int *rel_y)
|
||||
{
|
||||
@ -351,8 +351,8 @@ setup_constraint_info (MetaBackend *backend,
|
||||
MetaWindow *window,
|
||||
MetaMoveResizeFlags flags,
|
||||
MetaGravity resize_gravity,
|
||||
const MetaRectangle *orig,
|
||||
MetaRectangle *new)
|
||||
const MtkRectangle *orig,
|
||||
MtkRectangle *new)
|
||||
{
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
@ -419,8 +419,8 @@ setup_constraint_info (MetaBackend *backend,
|
||||
placement_rule = meta_window_get_placement_rule (window);
|
||||
if (placement_rule)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MetaRectangle parent_rect;
|
||||
MtkRectangle rect;
|
||||
MtkRectangle parent_rect;
|
||||
|
||||
rect = placement_rule->anchor_rect;
|
||||
|
||||
@ -517,7 +517,7 @@ setup_constraint_info (MetaBackend *backend,
|
||||
info->entire_monitor.width, info->entire_monitor.height);
|
||||
}
|
||||
|
||||
static MetaRectangle *
|
||||
static MtkRectangle *
|
||||
get_start_rect_for_resize (MetaWindow *window,
|
||||
ConstraintInfo *info)
|
||||
{
|
||||
@ -548,12 +548,12 @@ place_window_if_needed(MetaWindow *window,
|
||||
{
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_backend_get_monitor_manager (info->backend);
|
||||
MetaRectangle orig_rect;
|
||||
MetaRectangle placed_rect;
|
||||
MtkRectangle orig_rect;
|
||||
MtkRectangle placed_rect;
|
||||
MetaWorkspace *cur_workspace;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
|
||||
placed_rect = (MetaRectangle) {
|
||||
placed_rect = (MtkRectangle) {
|
||||
.x = window->rect.x,
|
||||
.y = window->rect.y,
|
||||
.width = info->current.width,
|
||||
@ -711,7 +711,7 @@ update_onscreen_requirements (MetaWindow *window,
|
||||
*/
|
||||
if (window->frame && window->decorated)
|
||||
{
|
||||
MetaRectangle titlebar_rect, frame_rect;
|
||||
MtkRectangle titlebar_rect, frame_rect;
|
||||
|
||||
meta_window_get_titlebar_rect (window, &titlebar_rect);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
@ -734,10 +734,10 @@ update_onscreen_requirements (MetaWindow *window,
|
||||
|
||||
static inline void
|
||||
get_size_limits (MetaWindow *window,
|
||||
MetaRectangle *min_size,
|
||||
MetaRectangle *max_size)
|
||||
MtkRectangle *min_size,
|
||||
MtkRectangle *max_size)
|
||||
{
|
||||
/* We pack the results into MetaRectangle structs just for convenience; we
|
||||
/* We pack the results into MtkRectangle structs just for convenience; we
|
||||
* don't actually use the position of those rects.
|
||||
*/
|
||||
min_size->x = min_size->y = max_size->x = max_size->y = 0;
|
||||
@ -809,14 +809,14 @@ try_flip_window_position (MetaWindow *window,
|
||||
MetaPlacementConstraintAdjustment constraint_adjustment,
|
||||
int parent_x,
|
||||
int parent_y,
|
||||
MetaRectangle *rect,
|
||||
MtkRectangle *rect,
|
||||
int *rel_x,
|
||||
int *rel_y,
|
||||
MetaRectangle *intersection)
|
||||
MtkRectangle *intersection)
|
||||
{
|
||||
MetaPlacementRule flipped_rule = *placement_rule;
|
||||
MetaRectangle flipped_rect;
|
||||
MetaRectangle flipped_intersection;
|
||||
MtkRectangle flipped_rect;
|
||||
MtkRectangle flipped_intersection;
|
||||
int flipped_rel_x;
|
||||
int flipped_rel_y;
|
||||
|
||||
@ -855,9 +855,9 @@ try_flip_window_position (MetaWindow *window,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_custom_rule_satisfied (MetaRectangle *rect,
|
||||
is_custom_rule_satisfied (MtkRectangle *rect,
|
||||
MetaPlacementRule *placement_rule,
|
||||
MetaRectangle *intersection)
|
||||
MtkRectangle *intersection)
|
||||
{
|
||||
uint32_t x_constrain_actions, y_constrain_actions;
|
||||
|
||||
@ -881,10 +881,10 @@ constrain_custom_rule (MetaWindow *window,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaPlacementRule *placement_rule;
|
||||
MetaRectangle intersection;
|
||||
MtkRectangle intersection;
|
||||
gboolean constraint_satisfied;
|
||||
MetaRectangle temporary_rect;
|
||||
MetaRectangle adjusted_unconstrained;
|
||||
MtkRectangle temporary_rect;
|
||||
MtkRectangle adjusted_unconstrained;
|
||||
int adjusted_rel_x;
|
||||
int adjusted_rel_y;
|
||||
MetaPlacementRule current_rule;
|
||||
@ -925,7 +925,7 @@ constrain_custom_rule (MetaWindow *window,
|
||||
case META_PLACEMENT_STATE_CONSTRAINED_PENDING:
|
||||
case META_PLACEMENT_STATE_CONSTRAINED_FINISHED:
|
||||
case META_PLACEMENT_STATE_INVALIDATED:
|
||||
temporary_rect = (MetaRectangle) {
|
||||
temporary_rect = (MtkRectangle) {
|
||||
.x = parent->rect.x + window->placement.current.rel_x,
|
||||
.y = parent->rect.y + window->placement.current.rel_y,
|
||||
.width = info->current.width,
|
||||
@ -1147,7 +1147,7 @@ constrain_modal_dialog (MetaWindow *window,
|
||||
{
|
||||
int x, y;
|
||||
MetaWindow *parent = meta_window_get_transient_for (window);
|
||||
MetaRectangle child_rect, parent_rect;
|
||||
MtkRectangle child_rect, parent_rect;
|
||||
gboolean constraint_already_satisfied;
|
||||
|
||||
if (!parent ||
|
||||
@ -1192,8 +1192,8 @@ constrain_maximization (MetaWindow *window,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
||||
MetaRectangle target_size;
|
||||
MetaRectangle min_size, max_size;
|
||||
MtkRectangle target_size;
|
||||
MtkRectangle min_size, max_size;
|
||||
gboolean hminbad, vminbad;
|
||||
gboolean horiz_equal, vert_equal;
|
||||
gboolean constraint_already_satisfied;
|
||||
@ -1280,8 +1280,8 @@ constrain_tiling (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle target_size;
|
||||
MetaRectangle min_size, max_size;
|
||||
MtkRectangle target_size;
|
||||
MtkRectangle min_size, max_size;
|
||||
gboolean hminbad, vminbad;
|
||||
gboolean horiz_equal, vert_equal;
|
||||
gboolean constraint_already_satisfied;
|
||||
@ -1332,7 +1332,7 @@ constrain_fullscreen (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle min_size, max_size, monitor;
|
||||
MtkRectangle min_size, max_size, monitor;
|
||||
gboolean too_big, too_small, constraint_already_satisfied;
|
||||
|
||||
if (priority > PRIORITY_FULLSCREEN)
|
||||
@ -1370,8 +1370,8 @@ constrain_size_increments (MetaWindow *window,
|
||||
int bh, hi, bw, wi, extra_height, extra_width;
|
||||
int new_width, new_height;
|
||||
gboolean constraint_already_satisfied;
|
||||
MetaRectangle *start_rect;
|
||||
MetaRectangle client_rect;
|
||||
MtkRectangle *start_rect;
|
||||
MtkRectangle client_rect;
|
||||
|
||||
if (priority > PRIORITY_SIZE_HINTS_INCREMENTS)
|
||||
return TRUE;
|
||||
@ -1441,10 +1441,10 @@ constrain_size_limits (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle min_size, max_size;
|
||||
MtkRectangle min_size, max_size;
|
||||
gboolean too_big, too_small, constraint_already_satisfied;
|
||||
int new_width, new_height;
|
||||
MetaRectangle *start_rect;
|
||||
MtkRectangle *start_rect;
|
||||
|
||||
if (priority > PRIORITY_SIZE_HINTS_LIMITS)
|
||||
return TRUE;
|
||||
@ -1495,8 +1495,8 @@ constrain_aspect_ratio (MetaWindow *window,
|
||||
int fudge, new_width, new_height;
|
||||
double best_width, best_height;
|
||||
double alt_width, alt_height;
|
||||
MetaRectangle *start_rect;
|
||||
MetaRectangle client_rect;
|
||||
MtkRectangle *start_rect;
|
||||
MtkRectangle client_rect;
|
||||
|
||||
if (priority > PRIORITY_ASPECT_RATIO)
|
||||
return TRUE;
|
||||
@ -1633,7 +1633,7 @@ do_screen_and_monitor_relative_constraints (
|
||||
gboolean check_only)
|
||||
{
|
||||
gboolean exit_early = FALSE, constraint_satisfied;
|
||||
MetaRectangle how_far_it_can_be_smushed, min_size, max_size;
|
||||
MtkRectangle how_far_it_can_be_smushed, min_size, max_size;
|
||||
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
if (meta_is_verbose ())
|
||||
|
@ -29,8 +29,8 @@
|
||||
void meta_window_constrain (MetaWindow *window,
|
||||
MetaMoveResizeFlags flags,
|
||||
MetaGravity resize_gravity,
|
||||
const MetaRectangle *orig,
|
||||
MetaRectangle *new,
|
||||
MetaRectangle *intermediate,
|
||||
const MtkRectangle *orig,
|
||||
MtkRectangle *new,
|
||||
MtkRectangle *intermediate,
|
||||
int *rel_x,
|
||||
int *rel_y);
|
||||
|
@ -286,7 +286,7 @@ gboolean meta_display_request_restart (MetaDisplay *display);
|
||||
|
||||
gboolean meta_display_show_resize_popup (MetaDisplay *display,
|
||||
gboolean show,
|
||||
MetaRectangle *rect,
|
||||
MtkRectangle *rect,
|
||||
int display_w,
|
||||
int display_h);
|
||||
|
||||
|
@ -456,7 +456,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
g_signal_accumulator_true_handled,
|
||||
NULL, NULL,
|
||||
G_TYPE_BOOLEAN, 4,
|
||||
G_TYPE_BOOLEAN, META_TYPE_RECTANGLE, G_TYPE_INT, G_TYPE_INT);
|
||||
G_TYPE_BOOLEAN, MTK_TYPE_RECTANGLE, G_TYPE_INT, G_TYPE_INT);
|
||||
|
||||
display_signals[GL_VIDEO_MEMORY_PURGED] =
|
||||
g_signal_new ("gl-video-memory-purged",
|
||||
@ -2705,7 +2705,7 @@ meta_display_request_restart (MetaDisplay *display)
|
||||
gboolean
|
||||
meta_display_show_resize_popup (MetaDisplay *display,
|
||||
gboolean show,
|
||||
MetaRectangle *rect,
|
||||
MtkRectangle *rect,
|
||||
int display_w,
|
||||
int display_h)
|
||||
{
|
||||
@ -3234,7 +3234,7 @@ check_fullscreen_func (gpointer data)
|
||||
|
||||
if (covers_monitors)
|
||||
{
|
||||
MetaRectangle window_rect;
|
||||
MtkRectangle window_rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &window_rect);
|
||||
|
||||
@ -3301,7 +3301,7 @@ meta_display_queue_check_fullscreen (MetaDisplay *display)
|
||||
|
||||
int
|
||||
meta_display_get_monitor_index_for_rect (MetaDisplay *display,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
MetaBackend *backend = backend_from_display (display);
|
||||
MetaMonitorManager *monitor_manager =
|
||||
@ -3416,7 +3416,7 @@ meta_display_get_primary_monitor (MetaDisplay *display)
|
||||
void
|
||||
meta_display_get_monitor_geometry (MetaDisplay *display,
|
||||
int monitor,
|
||||
MetaRectangle *geometry)
|
||||
MtkRectangle *geometry)
|
||||
{
|
||||
MetaBackend *backend = backend_from_display (display);
|
||||
MetaMonitorManager *monitor_manager =
|
||||
|
@ -36,7 +36,7 @@ struct _MetaFrame
|
||||
/* This rect is trusted info from where we put the
|
||||
* frame, not the result of ConfigureNotify
|
||||
*/
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
MetaFrameBorders cached_borders; /* valid if borders_cached is set */
|
||||
|
||||
|
@ -2376,8 +2376,8 @@ handle_move_to_corner_backend (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
MetaGravity gravity)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle work_area;
|
||||
MtkRectangle frame_rect;
|
||||
int new_x, new_y;
|
||||
|
||||
if (!window->monitor)
|
||||
@ -2519,8 +2519,8 @@ handle_move_to_center (MetaDisplay *display,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle work_area;
|
||||
MtkRectangle frame_rect;
|
||||
|
||||
meta_window_get_work_area_current_monitor (window, &work_area);
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
@ -2564,7 +2564,7 @@ handle_activate_window_menu (MetaDisplay *display,
|
||||
if (display->focus_window)
|
||||
{
|
||||
int x, y;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
MtkRectangle child_rect;
|
||||
|
||||
meta_window_get_frame_rect (display->focus_window, &frame_rect);
|
||||
@ -2926,7 +2926,7 @@ handle_raise_or_lower (MetaDisplay *display,
|
||||
|
||||
while (above)
|
||||
{
|
||||
MetaRectangle tmp, win_rect, above_rect;
|
||||
MtkRectangle tmp, win_rect, above_rect;
|
||||
|
||||
if (above->mapped && meta_window_should_be_showing (above))
|
||||
{
|
||||
|
@ -50,8 +50,8 @@ northwest_cmp (gconstpointer a,
|
||||
{
|
||||
MetaWindow *aw = (gpointer) a;
|
||||
MetaWindow *bw = (gpointer) b;
|
||||
MetaRectangle a_frame;
|
||||
MetaRectangle b_frame;
|
||||
MtkRectangle a_frame;
|
||||
MtkRectangle b_frame;
|
||||
int from_origin_a;
|
||||
int from_origin_b;
|
||||
int ax, ay, bx, by;
|
||||
@ -82,9 +82,9 @@ northeast_cmp (gconstpointer a,
|
||||
{
|
||||
MetaWindow *aw = (gpointer) a;
|
||||
MetaWindow *bw = (gpointer) b;
|
||||
MetaRectangle *area = user_data;
|
||||
MetaRectangle a_frame;
|
||||
MetaRectangle b_frame;
|
||||
MtkRectangle *area = user_data;
|
||||
MtkRectangle a_frame;
|
||||
MtkRectangle b_frame;
|
||||
int from_origin_a;
|
||||
int from_origin_b;
|
||||
int ax, ay, bx, by;
|
||||
@ -123,12 +123,12 @@ find_next_cascade (MetaWindow *window,
|
||||
GList *tmp;
|
||||
GList *sorted;
|
||||
int cascade_origin_x, cascade_x, cascade_y;
|
||||
MetaRectangle titlebar_rect;
|
||||
MtkRectangle titlebar_rect;
|
||||
int x_threshold, y_threshold;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
int window_width, window_height;
|
||||
int cascade_stage;
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle work_area;
|
||||
MetaLogicalMonitor *current;
|
||||
gboolean ltr = meta_get_locale_direction () == META_LOCALE_DIRECTION_LTR;
|
||||
|
||||
@ -177,7 +177,7 @@ find_next_cascade (MetaWindow *window,
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *w;
|
||||
MetaRectangle w_frame_rect;
|
||||
MtkRectangle w_frame_rect;
|
||||
int wx, ww, wy;
|
||||
gboolean nearby;
|
||||
|
||||
@ -272,9 +272,9 @@ find_most_freespace (MetaWindow *window,
|
||||
int max_area;
|
||||
int max_width, max_height, left, right, top, bottom;
|
||||
int left_space, right_space, top_space, bottom_space;
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle avoid;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle work_area;
|
||||
MtkRectangle avoid;
|
||||
MtkRectangle frame_rect;
|
||||
|
||||
meta_window_get_work_area_current_monitor (focus_window, &work_area);
|
||||
meta_window_get_frame_rect (focus_window, &avoid);
|
||||
@ -356,7 +356,7 @@ static gboolean
|
||||
window_overlaps_focus_window (MetaWindow *window)
|
||||
{
|
||||
MetaWindow *focus_window;
|
||||
MetaRectangle window_frame, focus_frame, overlap;
|
||||
MtkRectangle window_frame, focus_frame, overlap;
|
||||
|
||||
focus_window = window->display->focus_window;
|
||||
if (focus_window == NULL)
|
||||
@ -423,17 +423,17 @@ avoid_being_obscured_as_second_modal_dialog (MetaWindow *window,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
rectangle_overlaps_some_window (MetaRectangle *rect,
|
||||
rectangle_overlaps_some_window (MtkRectangle *rect,
|
||||
GList *windows)
|
||||
{
|
||||
GList *tmp;
|
||||
MetaRectangle dest;
|
||||
MtkRectangle dest;
|
||||
|
||||
tmp = windows;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *other = tmp->data;
|
||||
MetaRectangle other_rect;
|
||||
MtkRectangle other_rect;
|
||||
|
||||
switch (other->type)
|
||||
{
|
||||
@ -474,8 +474,8 @@ leftmost_cmp (gconstpointer a, gconstpointer b)
|
||||
{
|
||||
MetaWindow *aw = (gpointer) a;
|
||||
MetaWindow *bw = (gpointer) b;
|
||||
MetaRectangle a_frame;
|
||||
MetaRectangle b_frame;
|
||||
MtkRectangle a_frame;
|
||||
MtkRectangle b_frame;
|
||||
int ax, bx;
|
||||
|
||||
meta_window_get_frame_rect (aw, &a_frame);
|
||||
@ -503,8 +503,8 @@ topmost_cmp (gconstpointer a, gconstpointer b)
|
||||
{
|
||||
MetaWindow *aw = (gpointer) a;
|
||||
MetaWindow *bw = (gpointer) b;
|
||||
MetaRectangle a_frame;
|
||||
MetaRectangle b_frame;
|
||||
MtkRectangle a_frame;
|
||||
MtkRectangle b_frame;
|
||||
int ay, by;
|
||||
|
||||
meta_window_get_frame_rect (aw, &a_frame);
|
||||
@ -521,8 +521,8 @@ topmost_cmp (gconstpointer a, gconstpointer b)
|
||||
}
|
||||
|
||||
static void
|
||||
center_tile_rect_in_area (MetaRectangle *rect,
|
||||
MetaRectangle *work_area)
|
||||
center_tile_rect_in_area (MtkRectangle *rect,
|
||||
MtkRectangle *work_area)
|
||||
{
|
||||
int fluff;
|
||||
|
||||
@ -570,8 +570,8 @@ find_first_fit (MetaWindow *window,
|
||||
GList *below_sorted;
|
||||
GList *end_sorted;
|
||||
GList *tmp;
|
||||
MetaRectangle rect;
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle rect;
|
||||
MtkRectangle work_area;
|
||||
gboolean ltr = meta_get_locale_direction () == META_LOCALE_DIRECTION_LTR;
|
||||
|
||||
retval = FALSE;
|
||||
@ -622,7 +622,7 @@ find_first_fit (MetaWindow *window,
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
|
||||
meta_window_get_frame_rect (w, &frame_rect);
|
||||
|
||||
@ -648,7 +648,7 @@ find_first_fit (MetaWindow *window,
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
|
||||
meta_window_get_frame_rect (w, &frame_rect);
|
||||
|
||||
@ -684,7 +684,7 @@ meta_window_process_placement (MetaWindow *window,
|
||||
int *rel_x,
|
||||
int *rel_y)
|
||||
{
|
||||
MetaRectangle anchor_rect;
|
||||
MtkRectangle anchor_rect;
|
||||
int window_width, window_height;
|
||||
int x, y;
|
||||
|
||||
@ -843,7 +843,7 @@ meta_window_place (MetaWindow *window,
|
||||
|
||||
if (parent)
|
||||
{
|
||||
MetaRectangle frame_rect, parent_frame_rect;
|
||||
MtkRectangle frame_rect, parent_frame_rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
meta_window_get_frame_rect (parent, &parent_frame_rect);
|
||||
@ -877,8 +877,8 @@ meta_window_place (MetaWindow *window,
|
||||
if (window_place_centered (window))
|
||||
{
|
||||
/* Center on current monitor */
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle work_area;
|
||||
MtkRectangle frame_rect;
|
||||
|
||||
/* Warning, this function is a round trip! */
|
||||
logical_monitor = meta_backend_get_current_logical_monitor (backend);
|
||||
@ -933,8 +933,8 @@ meta_window_place (MetaWindow *window,
|
||||
if (window->has_maximize_func && window->decorated &&
|
||||
!window->fullscreen)
|
||||
{
|
||||
MetaRectangle workarea;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle workarea;
|
||||
MtkRectangle frame_rect;
|
||||
|
||||
meta_window_get_work_area_for_logical_monitor (window,
|
||||
logical_monitor,
|
||||
|
@ -128,7 +128,7 @@ typedef enum _MetaWindowSuspendState
|
||||
|
||||
typedef struct _MetaPlacementRule
|
||||
{
|
||||
MetaRectangle anchor_rect;
|
||||
MtkRectangle anchor_rect;
|
||||
MetaPlacementGravity gravity;
|
||||
MetaPlacementAnchor anchor;
|
||||
MetaPlacementConstraintAdjustment constraint_adjustment;
|
||||
@ -139,7 +139,7 @@ typedef struct _MetaPlacementRule
|
||||
|
||||
gboolean is_reactive;
|
||||
|
||||
MetaRectangle parent_rect;
|
||||
MtkRectangle parent_rect;
|
||||
} MetaPlacementRule;
|
||||
|
||||
typedef enum _MetaPlacementState
|
||||
@ -292,20 +292,20 @@ struct _MetaWindow
|
||||
* information. */
|
||||
|
||||
/* The current window geometry of the window. */
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
/* The geometry to restore when we unmaximize. */
|
||||
MetaRectangle saved_rect;
|
||||
MtkRectangle saved_rect;
|
||||
|
||||
/* The geometry to restore when we unfullscreen. */
|
||||
MetaRectangle saved_rect_fullscreen;
|
||||
MtkRectangle saved_rect_fullscreen;
|
||||
|
||||
/* This is the geometry the window will have if no constraints have
|
||||
* applied. We use this whenever we are moving implicitly (for example,
|
||||
* if we move to avoid a panel, we can snap back to this position if
|
||||
* the panel moves again).
|
||||
*/
|
||||
MetaRectangle unconstrained_rect;
|
||||
MtkRectangle unconstrained_rect;
|
||||
|
||||
/* The rectangle of the "server-side" geometry of the buffer,
|
||||
* in root coordinates.
|
||||
@ -316,10 +316,10 @@ struct _MetaWindow
|
||||
* surface associated with shell surface (xdg_surface, etc.)
|
||||
* The size matches the size surface size as displayed in the stage.
|
||||
*/
|
||||
MetaRectangle buffer_rect;
|
||||
MtkRectangle buffer_rect;
|
||||
|
||||
/* Cached net_wm_icon_geometry */
|
||||
MetaRectangle icon_geometry;
|
||||
MtkRectangle icon_geometry;
|
||||
|
||||
/* x/y/w/h here get filled with ConfigureRequest values */
|
||||
XSizeHints size_hints;
|
||||
@ -571,9 +571,9 @@ struct _MetaWindowClass
|
||||
void (*current_workspace_changed) (MetaWindow *window);
|
||||
void (*move_resize_internal) (MetaWindow *window,
|
||||
MetaGravity gravity,
|
||||
MetaRectangle unconstrained_rect,
|
||||
MetaRectangle constrained_rect,
|
||||
MetaRectangle temporary_rect,
|
||||
MtkRectangle unconstrained_rect,
|
||||
MtkRectangle constrained_rect,
|
||||
MtkRectangle temporary_rect,
|
||||
int rel_x,
|
||||
int rel_y,
|
||||
MetaMoveResizeFlags flags,
|
||||
@ -592,7 +592,7 @@ struct _MetaWindowClass
|
||||
void (*main_monitor_changed) (MetaWindow *window,
|
||||
const MetaLogicalMonitor *old);
|
||||
void (*adjust_fullscreen_monitor_rect) (MetaWindow *window,
|
||||
MetaRectangle *monitor_rect);
|
||||
MtkRectangle *monitor_rect);
|
||||
void (*force_restore_shortcuts) (MetaWindow *window,
|
||||
ClutterInputDevice *source);
|
||||
gboolean (*shortcuts_inhibited) (MetaWindow *window,
|
||||
@ -656,7 +656,7 @@ void meta_window_restore_tile (MetaWindow *window,
|
||||
int height);
|
||||
void meta_window_maximize_internal (MetaWindow *window,
|
||||
MetaMaximizeFlags directions,
|
||||
MetaRectangle *saved_rect);
|
||||
MtkRectangle *saved_rect);
|
||||
|
||||
void meta_window_make_fullscreen_internal (MetaWindow *window);
|
||||
void meta_window_update_fullscreen_monitors (MetaWindow *window,
|
||||
@ -668,7 +668,7 @@ void meta_window_update_fullscreen_monitors (MetaWindow *window,
|
||||
gboolean meta_window_has_fullscreen_monitors (MetaWindow *window);
|
||||
|
||||
void meta_window_adjust_fullscreen_monitor_rect (MetaWindow *window,
|
||||
MetaRectangle *monitor_rect);
|
||||
MtkRectangle *monitor_rect);
|
||||
|
||||
void meta_window_resize_frame_with_gravity (MetaWindow *window,
|
||||
gboolean user_op,
|
||||
@ -731,12 +731,12 @@ GList* meta_window_get_workspaces (MetaWindow *window);
|
||||
|
||||
void meta_window_get_work_area_for_logical_monitor (MetaWindow *window,
|
||||
MetaLogicalMonitor *logical_monitor,
|
||||
MetaRectangle *area);
|
||||
MtkRectangle *area);
|
||||
|
||||
int meta_window_get_current_tile_monitor_number (MetaWindow *window);
|
||||
void meta_window_get_tile_area (MetaWindow *window,
|
||||
MetaTileMode mode,
|
||||
MetaRectangle *tile_area);
|
||||
MtkRectangle *tile_area);
|
||||
|
||||
|
||||
gboolean meta_window_same_application (MetaWindow *window,
|
||||
@ -818,7 +818,7 @@ void meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
void meta_window_get_client_area_rect (const MetaWindow *window,
|
||||
MtkRectangle *rect);
|
||||
void meta_window_get_titlebar_rect (MetaWindow *window,
|
||||
MetaRectangle *titlebar_rect);
|
||||
MtkRectangle *titlebar_rect);
|
||||
|
||||
void meta_window_activate_full (MetaWindow *window,
|
||||
guint32 timestamp,
|
||||
@ -845,7 +845,7 @@ void meta_window_set_urgent (MetaWindow *window,
|
||||
void meta_window_move_resize_internal (MetaWindow *window,
|
||||
MetaMoveResizeFlags flags,
|
||||
MetaGravity gravity,
|
||||
MetaRectangle frame_rect);
|
||||
MtkRectangle frame_rect);
|
||||
|
||||
void meta_window_grab_op_began (MetaWindow *window, MetaGrabOp op);
|
||||
void meta_window_grab_op_ended (MetaWindow *window, MetaGrabOp op);
|
||||
@ -893,7 +893,7 @@ void meta_window_set_frame_xwindow (MetaWindow *window,
|
||||
Window xframe);
|
||||
|
||||
void meta_window_maybe_apply_size_hints (MetaWindow *window,
|
||||
MetaRectangle *target_rect);
|
||||
MtkRectangle *target_rect);
|
||||
|
||||
void meta_window_inhibit_suspend_state (MetaWindow *window);
|
||||
|
||||
|
@ -149,8 +149,8 @@ static gboolean queue_calc_showing_func (MetaWindow *window,
|
||||
|
||||
static void meta_window_move_between_rects (MetaWindow *window,
|
||||
MetaMoveResizeFlags move_resize_flags,
|
||||
const MetaRectangle *old_area,
|
||||
const MetaRectangle *new_area);
|
||||
const MtkRectangle *old_area,
|
||||
const MtkRectangle *new_area);
|
||||
|
||||
static void unmaximize_window_before_freeing (MetaWindow *window);
|
||||
static void unminimize_window_and_all_transient_parents (MetaWindow *window);
|
||||
@ -987,7 +987,7 @@ meta_window_find_monitor_from_frame_rect (MetaWindow *window)
|
||||
MetaBackend *backend = backend_from_window (window);
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
MetaRectangle window_rect;
|
||||
MtkRectangle window_rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &window_rect);
|
||||
return meta_monitor_manager_get_logical_monitor_from_rect (monitor_manager,
|
||||
@ -1000,7 +1000,7 @@ meta_window_find_highest_scale_monitor_from_frame_rect (MetaWindow *window)
|
||||
MetaBackend *backend = backend_from_window (window);
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
MetaRectangle window_rect;
|
||||
MtkRectangle window_rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &window_rect);
|
||||
return meta_monitor_manager_get_highest_scale_monitor_from_rect (monitor_manager,
|
||||
@ -2018,7 +2018,7 @@ window_state_on_map (MetaWindow *window,
|
||||
static gboolean
|
||||
windows_overlap (const MetaWindow *w1, const MetaWindow *w2)
|
||||
{
|
||||
MetaRectangle w1rect, w2rect;
|
||||
MtkRectangle w1rect, w2rect;
|
||||
meta_window_get_frame_rect (w1, &w1rect);
|
||||
meta_window_get_frame_rect (w2, &w2rect);
|
||||
return mtk_rectangle_overlap (&w1rect, &w2rect);
|
||||
@ -2247,7 +2247,7 @@ meta_window_show (MetaWindow *window)
|
||||
window->showing_for_first_time &&
|
||||
window->has_maximize_func)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle work_area;
|
||||
meta_window_get_work_area_for_monitor (window, window->monitor->number, &work_area);
|
||||
/* Automaximize windows that map with a size > MAX_UNMAXIMIZED_WINDOW_AREA of the work area */
|
||||
if (window->rect.width * window->rect.height > work_area.width * work_area.height * MAX_UNMAXIMIZED_WINDOW_AREA)
|
||||
@ -2574,7 +2574,7 @@ meta_window_unminimize (MetaWindow *window)
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_size_hints_satisfied (MetaRectangle *rect,
|
||||
ensure_size_hints_satisfied (MtkRectangle *rect,
|
||||
const XSizeHints *size_hints)
|
||||
{
|
||||
int minw, minh, maxw, maxh; /* min/max width/height */
|
||||
@ -2628,7 +2628,7 @@ meta_window_save_rect (MetaWindow *window)
|
||||
void
|
||||
meta_window_maximize_internal (MetaWindow *window,
|
||||
MetaMaximizeFlags directions,
|
||||
MetaRectangle *saved_rect)
|
||||
MtkRectangle *saved_rect)
|
||||
{
|
||||
/* At least one of the two directions ought to be set */
|
||||
gboolean maximize_horizontally, maximize_vertically;
|
||||
@ -2675,7 +2675,7 @@ void
|
||||
meta_window_maximize (MetaWindow *window,
|
||||
MetaMaximizeFlags directions)
|
||||
{
|
||||
MetaRectangle *saved_rect = NULL;
|
||||
MtkRectangle *saved_rect = NULL;
|
||||
gboolean maximize_horizontally, maximize_vertically;
|
||||
|
||||
g_return_if_fail (META_IS_WINDOW (window));
|
||||
@ -2717,7 +2717,7 @@ meta_window_maximize (MetaWindow *window,
|
||||
directions,
|
||||
saved_rect);
|
||||
|
||||
MetaRectangle old_frame_rect, old_buffer_rect;
|
||||
MtkRectangle old_frame_rect, old_buffer_rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &old_frame_rect);
|
||||
meta_window_get_buffer_rect (window, &old_buffer_rect);
|
||||
@ -2774,7 +2774,7 @@ meta_window_is_fullscreen (MetaWindow *window)
|
||||
gboolean
|
||||
meta_window_is_screen_sized (MetaWindow *window)
|
||||
{
|
||||
MetaRectangle window_rect;
|
||||
MtkRectangle window_rect;
|
||||
int screen_width, screen_height;
|
||||
|
||||
meta_display_get_size (window->display, &screen_width, &screen_height);
|
||||
@ -2808,7 +2808,7 @@ meta_window_is_monitor_sized (MetaWindow *window)
|
||||
|
||||
if (window->override_redirect)
|
||||
{
|
||||
MetaRectangle window_rect, monitor_rect;
|
||||
MtkRectangle window_rect, monitor_rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &window_rect);
|
||||
meta_display_get_monitor_geometry (window->display, window->monitor->number, &monitor_rect);
|
||||
@ -2869,7 +2869,7 @@ meta_window_update_tile_fraction (MetaWindow *window,
|
||||
int new_h)
|
||||
{
|
||||
MetaWindow *tile_match = window->tile_match;
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle work_area;
|
||||
MetaWindowDrag *window_drag;
|
||||
|
||||
if (!META_WINDOW_TILED_SIDE_BY_SIDE (window))
|
||||
@ -3001,7 +3001,7 @@ meta_window_tile (MetaWindow *window,
|
||||
!window_drag ||
|
||||
window->tile_match != meta_window_drag_get_window (window_drag))
|
||||
{
|
||||
MetaRectangle old_frame_rect, old_buffer_rect;
|
||||
MtkRectangle old_frame_rect, old_buffer_rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &old_frame_rect);
|
||||
meta_window_get_buffer_rect (window, &old_buffer_rect);
|
||||
@ -3046,8 +3046,8 @@ gboolean
|
||||
meta_window_can_tile_side_by_side (MetaWindow *window)
|
||||
{
|
||||
int monitor;
|
||||
MetaRectangle tile_area;
|
||||
MetaRectangle client_rect;
|
||||
MtkRectangle tile_area;
|
||||
MtkRectangle client_rect;
|
||||
|
||||
if (!meta_window_can_tile_maximized (window))
|
||||
return FALSE;
|
||||
@ -3103,7 +3103,7 @@ unmaximize_window_before_freeing (MetaWindow *window)
|
||||
|
||||
void
|
||||
meta_window_maybe_apply_size_hints (MetaWindow *window,
|
||||
MetaRectangle *target_rect)
|
||||
MtkRectangle *target_rect)
|
||||
{
|
||||
meta_window_frame_rect_to_client_rect (window, target_rect, target_rect);
|
||||
ensure_size_hints_satisfied (target_rect, &window->size_hints);
|
||||
@ -3133,10 +3133,10 @@ meta_window_unmaximize (MetaWindow *window,
|
||||
if ((unmaximize_horizontally && window->maximized_horizontally) ||
|
||||
(unmaximize_vertically && window->maximized_vertically))
|
||||
{
|
||||
MetaRectangle *desired_rect;
|
||||
MetaRectangle target_rect;
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle old_frame_rect, old_buffer_rect;
|
||||
MtkRectangle *desired_rect;
|
||||
MtkRectangle target_rect;
|
||||
MtkRectangle work_area;
|
||||
MtkRectangle old_frame_rect, old_buffer_rect;
|
||||
gboolean has_target_size;
|
||||
|
||||
meta_window_get_work_area_for_monitor (window, window->monitor->number, &work_area);
|
||||
@ -3306,7 +3306,7 @@ meta_window_make_fullscreen (MetaWindow *window)
|
||||
|
||||
if (!window->fullscreen)
|
||||
{
|
||||
MetaRectangle old_frame_rect, old_buffer_rect;
|
||||
MtkRectangle old_frame_rect, old_buffer_rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &old_frame_rect);
|
||||
meta_window_get_buffer_rect (window, &old_buffer_rect);
|
||||
@ -3334,7 +3334,7 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
||||
|
||||
if (window->fullscreen)
|
||||
{
|
||||
MetaRectangle old_frame_rect, old_buffer_rect, target_rect;
|
||||
MtkRectangle old_frame_rect, old_buffer_rect, target_rect;
|
||||
gboolean has_target_size;
|
||||
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
@ -3420,7 +3420,7 @@ meta_window_has_fullscreen_monitors (MetaWindow *window)
|
||||
|
||||
void
|
||||
meta_window_adjust_fullscreen_monitor_rect (MetaWindow *window,
|
||||
MetaRectangle *monitor_rect)
|
||||
MtkRectangle *monitor_rect)
|
||||
{
|
||||
MetaWindowClass *window_class = META_WINDOW_GET_CLASS (window);
|
||||
|
||||
@ -3777,7 +3777,7 @@ void
|
||||
meta_window_move_resize_internal (MetaWindow *window,
|
||||
MetaMoveResizeFlags flags,
|
||||
MetaGravity gravity,
|
||||
MetaRectangle frame_rect)
|
||||
MtkRectangle frame_rect)
|
||||
{
|
||||
/* The rectangle here that's passed in *always* in "frame rect"
|
||||
* coordinates. That means the position of the frame's visible bounds,
|
||||
@ -3800,9 +3800,9 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
|
||||
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
||||
gboolean did_placement;
|
||||
MetaRectangle unconstrained_rect;
|
||||
MetaRectangle constrained_rect;
|
||||
MetaRectangle temporary_rect;
|
||||
MtkRectangle unconstrained_rect;
|
||||
MtkRectangle constrained_rect;
|
||||
MtkRectangle temporary_rect;
|
||||
int rel_x = 0;
|
||||
int rel_y = 0;
|
||||
MetaMoveResizeResultFlags result = 0;
|
||||
@ -3862,7 +3862,7 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
temporary_rect = window->rect;
|
||||
if (flags & META_MOVE_RESIZE_CONSTRAIN && window->monitor)
|
||||
{
|
||||
MetaRectangle old_rect;
|
||||
MtkRectangle old_rect;
|
||||
meta_window_get_frame_rect (window, &old_rect);
|
||||
|
||||
meta_window_constrain (window,
|
||||
@ -3988,7 +3988,7 @@ meta_window_move_frame (MetaWindow *window,
|
||||
int root_y_nw)
|
||||
{
|
||||
MetaMoveResizeFlags flags;
|
||||
MetaRectangle rect = { root_x_nw, root_y_nw, 0, 0 };
|
||||
MtkRectangle rect = { root_x_nw, root_y_nw, 0, 0 };
|
||||
|
||||
g_return_if_fail (!window->override_redirect);
|
||||
|
||||
@ -4001,8 +4001,8 @@ meta_window_move_frame (MetaWindow *window,
|
||||
static void
|
||||
meta_window_move_between_rects (MetaWindow *window,
|
||||
MetaMoveResizeFlags move_resize_flags,
|
||||
const MetaRectangle *old_area,
|
||||
const MetaRectangle *new_area)
|
||||
const MtkRectangle *old_area,
|
||||
const MtkRectangle *new_area)
|
||||
{
|
||||
double rel_x, rel_y;
|
||||
int new_x, new_y;
|
||||
@ -4080,7 +4080,7 @@ meta_window_move_resize_frame (MetaWindow *window,
|
||||
int h)
|
||||
{
|
||||
MetaMoveResizeFlags flags;
|
||||
MetaRectangle rect = { root_x_nw, root_y_nw, w, h };
|
||||
MtkRectangle rect = { root_x_nw, root_y_nw, w, h };
|
||||
|
||||
g_return_if_fail (!window->override_redirect);
|
||||
|
||||
@ -4104,7 +4104,7 @@ void
|
||||
meta_window_move_to_monitor (MetaWindow *window,
|
||||
int monitor)
|
||||
{
|
||||
MetaRectangle old_area, new_area;
|
||||
MtkRectangle old_area, new_area;
|
||||
|
||||
if (window->tile_mode != META_TILE_NONE)
|
||||
window->tile_monitor_number = monitor;
|
||||
@ -4124,7 +4124,7 @@ meta_window_move_to_monitor (MetaWindow *window,
|
||||
}
|
||||
else
|
||||
{
|
||||
MetaRectangle old_frame_rect, old_buffer_rect;
|
||||
MtkRectangle old_frame_rect, old_buffer_rect;
|
||||
|
||||
if (monitor == window->monitor->number)
|
||||
return;
|
||||
@ -4150,7 +4150,7 @@ adjust_size_for_tile_match (MetaWindow *window,
|
||||
int *new_w,
|
||||
int *new_h)
|
||||
{
|
||||
MetaRectangle work_area, rect;
|
||||
MtkRectangle work_area, rect;
|
||||
MetaWindow *tile_match = window->tile_match;
|
||||
|
||||
if (!META_WINDOW_TILED_SIDE_BY_SIDE (window) || !tile_match)
|
||||
@ -4181,7 +4181,7 @@ meta_window_resize_frame_with_gravity (MetaWindow *window,
|
||||
MetaGravity gravity)
|
||||
{
|
||||
MetaMoveResizeFlags flags;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
rect.width = w;
|
||||
rect.height = h;
|
||||
@ -4224,7 +4224,7 @@ meta_window_get_gravity_position (MetaWindow *window,
|
||||
int *root_x,
|
||||
int *root_y)
|
||||
{
|
||||
MetaRectangle frame_extents;
|
||||
MtkRectangle frame_extents;
|
||||
int w, h;
|
||||
int x, y;
|
||||
|
||||
@ -4322,7 +4322,7 @@ meta_window_get_session_geometry (MetaWindow *window,
|
||||
/**
|
||||
* meta_window_get_buffer_rect:
|
||||
* @window: a #MetaWindow
|
||||
* @rect: (out): pointer to an allocated #MetaRectangle
|
||||
* @rect: (out): pointer to an allocated #MtkRectangle
|
||||
*
|
||||
* Gets the rectangle that the pixmap or buffer of @window occupies.
|
||||
*
|
||||
@ -4334,7 +4334,7 @@ meta_window_get_session_geometry (MetaWindow *window,
|
||||
*/
|
||||
void
|
||||
meta_window_get_buffer_rect (const MetaWindow *window,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
*rect = window->buffer_rect;
|
||||
}
|
||||
@ -4350,8 +4350,8 @@ meta_window_get_buffer_rect (const MetaWindow *window,
|
||||
*/
|
||||
void
|
||||
meta_window_client_rect_to_frame_rect (MetaWindow *window,
|
||||
MetaRectangle *client_rect,
|
||||
MetaRectangle *frame_rect)
|
||||
MtkRectangle *client_rect,
|
||||
MtkRectangle *frame_rect)
|
||||
{
|
||||
if (!frame_rect)
|
||||
return;
|
||||
@ -4397,8 +4397,8 @@ meta_window_client_rect_to_frame_rect (MetaWindow *window,
|
||||
*/
|
||||
void
|
||||
meta_window_frame_rect_to_client_rect (MetaWindow *window,
|
||||
MetaRectangle *frame_rect,
|
||||
MetaRectangle *client_rect)
|
||||
MtkRectangle *frame_rect,
|
||||
MtkRectangle *client_rect)
|
||||
{
|
||||
if (!client_rect)
|
||||
return;
|
||||
@ -4428,7 +4428,7 @@ meta_window_frame_rect_to_client_rect (MetaWindow *window,
|
||||
/**
|
||||
* meta_window_get_frame_rect:
|
||||
* @window: a #MetaWindow
|
||||
* @rect: (out): pointer to an allocated #MetaRectangle
|
||||
* @rect: (out): pointer to an allocated #MtkRectangle
|
||||
*
|
||||
* Gets the rectangle that bounds @window that is what the user thinks of
|
||||
* as the edge of the window.
|
||||
@ -4438,7 +4438,7 @@ meta_window_frame_rect_to_client_rect (MetaWindow *window,
|
||||
*/
|
||||
void
|
||||
meta_window_get_frame_rect (const MetaWindow *window,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
*rect = window->rect;
|
||||
}
|
||||
@ -4468,7 +4468,7 @@ meta_window_get_client_area_rect (const MetaWindow *window,
|
||||
|
||||
void
|
||||
meta_window_get_titlebar_rect (MetaWindow *window,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
meta_window_get_frame_rect (window, rect);
|
||||
|
||||
@ -5326,7 +5326,7 @@ meta_window_set_focused_internal (MetaWindow *window,
|
||||
*/
|
||||
gboolean
|
||||
meta_window_get_icon_geometry (MetaWindow *window,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
g_return_val_if_fail (!window->override_redirect, FALSE);
|
||||
|
||||
@ -5353,7 +5353,7 @@ meta_window_get_icon_geometry (MetaWindow *window,
|
||||
*/
|
||||
void
|
||||
meta_window_set_icon_geometry (MetaWindow *window,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
if (rect)
|
||||
{
|
||||
@ -5621,7 +5621,7 @@ meta_window_recalc_features (MetaWindow *window)
|
||||
if (!window->has_resize_func)
|
||||
{
|
||||
window->has_maximize_func = FALSE;
|
||||
MetaRectangle display_rect = { 0 };
|
||||
MtkRectangle display_rect = { 0 };
|
||||
|
||||
meta_display_get_size (window->display, &display_rect.width,
|
||||
&display_rect.height);
|
||||
@ -5654,7 +5654,7 @@ meta_window_recalc_features (MetaWindow *window)
|
||||
|
||||
if (window->has_maximize_func && window->monitor)
|
||||
{
|
||||
MetaRectangle work_area, client_rect;
|
||||
MtkRectangle work_area, client_rect;
|
||||
|
||||
meta_window_get_work_area_current_monitor (window, &work_area);
|
||||
meta_window_frame_rect_to_client_rect (window, &work_area, &client_rect);
|
||||
@ -5729,7 +5729,7 @@ void
|
||||
meta_window_shove_titlebar_onscreen (MetaWindow *window)
|
||||
{
|
||||
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
GList *onscreen_region;
|
||||
int horiz_amount, vert_amount;
|
||||
|
||||
@ -5770,7 +5770,7 @@ gboolean
|
||||
meta_window_titlebar_is_onscreen (MetaWindow *window)
|
||||
{
|
||||
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
||||
MetaRectangle titlebar_rect, frame_rect;
|
||||
MtkRectangle titlebar_rect, frame_rect;
|
||||
GList *onscreen_region;
|
||||
gboolean is_onscreen;
|
||||
|
||||
@ -5797,8 +5797,8 @@ meta_window_titlebar_is_onscreen (MetaWindow *window)
|
||||
onscreen_region = workspace_manager->active_workspace->screen_region;
|
||||
while (onscreen_region)
|
||||
{
|
||||
MetaRectangle *spanning_rect = onscreen_region->data;
|
||||
MetaRectangle overlap;
|
||||
MtkRectangle *spanning_rect = onscreen_region->data;
|
||||
MtkRectangle overlap;
|
||||
|
||||
mtk_rectangle_intersect (&titlebar_rect, spanning_rect, &overlap);
|
||||
if (overlap.height > MIN (titlebar_rect.height, min_height_needed) &&
|
||||
@ -5818,7 +5818,7 @@ meta_window_titlebar_is_onscreen (MetaWindow *window)
|
||||
void
|
||||
meta_window_get_work_area_for_logical_monitor (MetaWindow *window,
|
||||
MetaLogicalMonitor *logical_monitor,
|
||||
MetaRectangle *area)
|
||||
MtkRectangle *area)
|
||||
{
|
||||
GList *tmp;
|
||||
|
||||
@ -5830,7 +5830,7 @@ meta_window_get_work_area_for_logical_monitor (MetaWindow *window,
|
||||
tmp = meta_window_get_workspaces (window);
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaRectangle workspace_work_area;
|
||||
MtkRectangle workspace_work_area;
|
||||
meta_workspace_get_work_area_for_logical_monitor (tmp->data,
|
||||
logical_monitor,
|
||||
&workspace_work_area);
|
||||
@ -5855,7 +5855,7 @@ meta_window_get_work_area_for_logical_monitor (MetaWindow *window,
|
||||
*/
|
||||
void
|
||||
meta_window_get_work_area_current_monitor (MetaWindow *window,
|
||||
MetaRectangle *area)
|
||||
MtkRectangle *area)
|
||||
{
|
||||
meta_window_get_work_area_for_monitor (window,
|
||||
window->monitor->number,
|
||||
@ -5874,7 +5874,7 @@ meta_window_get_work_area_current_monitor (MetaWindow *window,
|
||||
void
|
||||
meta_window_get_work_area_for_monitor (MetaWindow *window,
|
||||
int which_monitor,
|
||||
MetaRectangle *area)
|
||||
MtkRectangle *area)
|
||||
{
|
||||
MetaBackend *backend = backend_from_window (window);
|
||||
MetaMonitorManager *monitor_manager = meta_backend_get_monitor_manager (backend);
|
||||
@ -5898,10 +5898,10 @@ meta_window_get_work_area_for_monitor (MetaWindow *window,
|
||||
*/
|
||||
void
|
||||
meta_window_get_work_area_all_monitors (MetaWindow *window,
|
||||
MetaRectangle *area)
|
||||
MtkRectangle *area)
|
||||
{
|
||||
GList *tmp;
|
||||
MetaRectangle display_rect = { 0 };
|
||||
MtkRectangle display_rect = { 0 };
|
||||
|
||||
meta_display_get_size (window->display,
|
||||
&display_rect.width,
|
||||
@ -5913,7 +5913,7 @@ meta_window_get_work_area_all_monitors (MetaWindow *window,
|
||||
tmp = meta_window_get_workspaces (window);
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaRectangle workspace_work_area;
|
||||
MtkRectangle workspace_work_area;
|
||||
meta_workspace_get_work_area_all_monitors (tmp->data,
|
||||
&workspace_work_area);
|
||||
mtk_rectangle_intersect (area,
|
||||
@ -5944,9 +5944,9 @@ meta_window_get_current_tile_monitor_number (MetaWindow *window)
|
||||
void
|
||||
meta_window_get_tile_area (MetaWindow *window,
|
||||
MetaTileMode tile_mode,
|
||||
MetaRectangle *tile_area)
|
||||
MtkRectangle *tile_area)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle work_area;
|
||||
int tile_monitor_number;
|
||||
double fraction;
|
||||
|
||||
@ -6345,7 +6345,7 @@ void
|
||||
meta_window_set_demands_attention (MetaWindow *window)
|
||||
{
|
||||
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
||||
MetaRectangle candidate_rect, other_rect;
|
||||
MtkRectangle candidate_rect, other_rect;
|
||||
GList *stack = window->display->stack->sorted;
|
||||
MetaWindow *other_window;
|
||||
gboolean obscured = FALSE;
|
||||
@ -7166,7 +7166,7 @@ meta_window_find_tile_match (MetaWindow *window,
|
||||
if (match)
|
||||
{
|
||||
MetaWindow *above, *bottommost, *topmost;
|
||||
MetaRectangle above_rect, bottommost_rect, topmost_rect;
|
||||
MtkRectangle above_rect, bottommost_rect, topmost_rect;
|
||||
MetaWindowDrag *window_drag;
|
||||
|
||||
if (meta_stack_windows_cmp (window->display->stack, match, window) > 0)
|
||||
@ -7704,7 +7704,7 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
{
|
||||
gboolean north, south;
|
||||
gboolean west, east;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
MetaGrabOp op = META_GRAB_OP_WINDOW_BASE;
|
||||
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
@ -7987,7 +7987,7 @@ meta_window_calculate_bounds (MetaWindow *window,
|
||||
main_monitor = meta_window_get_main_logical_monitor (window);
|
||||
if (main_monitor)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle work_area;
|
||||
|
||||
meta_window_get_work_area_for_logical_monitor (window,
|
||||
main_monitor,
|
||||
|
@ -56,7 +56,7 @@ struct _MetaWorkspace
|
||||
|
||||
GHashTable *logical_monitor_data;
|
||||
|
||||
MetaRectangle work_area_screen;
|
||||
MtkRectangle work_area_screen;
|
||||
GList *screen_region;
|
||||
GList *screen_edges;
|
||||
GList *monitor_edges;
|
||||
@ -83,7 +83,7 @@ void meta_workspace_relocate_windows (MetaWorkspace *workspace,
|
||||
|
||||
void meta_workspace_get_work_area_for_logical_monitor (MetaWorkspace *workspace,
|
||||
MetaLogicalMonitor *logical_monitor,
|
||||
MetaRectangle *area);
|
||||
MtkRectangle *area);
|
||||
|
||||
void meta_workspace_invalidate_work_area (MetaWorkspace *workspace);
|
||||
|
||||
|
@ -84,7 +84,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
|
||||
typedef struct _MetaWorkspaceLogicalMonitorData
|
||||
{
|
||||
GList *logical_monitor_region;
|
||||
MetaRectangle logical_monitor_work_area;
|
||||
MtkRectangle logical_monitor_work_area;
|
||||
} MetaWorkspaceLogicalMonitorData;
|
||||
|
||||
typedef struct _MetaWorkspaceFocusableAncestorData
|
||||
@ -838,8 +838,8 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
|
||||
GList *windows;
|
||||
GList *tmp;
|
||||
GList *logical_monitors, *l;
|
||||
MetaRectangle display_rect = { 0 };
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle display_rect = { 0 };
|
||||
MtkRectangle work_area;
|
||||
|
||||
if (!workspace->work_areas_invalid)
|
||||
return;
|
||||
@ -994,8 +994,8 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
|
||||
*/
|
||||
if (workspace->screen_region == NULL)
|
||||
{
|
||||
MetaRectangle *nonempty_region;
|
||||
nonempty_region = g_new (MetaRectangle, 1);
|
||||
MtkRectangle *nonempty_region;
|
||||
nonempty_region = g_new (MtkRectangle, 1);
|
||||
*nonempty_region = workspace->work_area_screen;
|
||||
workspace->screen_region = g_list_prepend (NULL, nonempty_region);
|
||||
}
|
||||
@ -1057,7 +1057,7 @@ meta_workspace_set_builtin_struts (MetaWorkspace *workspace,
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
MetaDisplay *display = workspace->display;
|
||||
MetaRectangle display_rect = { 0 };
|
||||
MtkRectangle display_rect = { 0 };
|
||||
GSList *l;
|
||||
|
||||
meta_display_get_size (display, &display_rect.width, &display_rect.height);
|
||||
@ -1125,7 +1125,7 @@ meta_workspace_set_builtin_struts (MetaWorkspace *workspace,
|
||||
void
|
||||
meta_workspace_get_work_area_for_logical_monitor (MetaWorkspace *workspace,
|
||||
MetaLogicalMonitor *logical_monitor,
|
||||
MetaRectangle *area)
|
||||
MtkRectangle *area)
|
||||
{
|
||||
meta_workspace_get_work_area_for_monitor (workspace,
|
||||
logical_monitor->number,
|
||||
@ -1144,7 +1144,7 @@ meta_workspace_get_work_area_for_logical_monitor (MetaWorkspace *workspace,
|
||||
void
|
||||
meta_workspace_get_work_area_for_monitor (MetaWorkspace *workspace,
|
||||
int which_monitor,
|
||||
MetaRectangle *area)
|
||||
MtkRectangle *area)
|
||||
{
|
||||
MetaContext *context = meta_display_get_context (workspace->display);
|
||||
MetaBackend *backend = meta_context_get_backend (context);
|
||||
@ -1175,7 +1175,7 @@ meta_workspace_get_work_area_for_monitor (MetaWorkspace *workspace,
|
||||
*/
|
||||
void
|
||||
meta_workspace_get_work_area_all_monitors (MetaWorkspace *workspace,
|
||||
MetaRectangle *area)
|
||||
MtkRectangle *area)
|
||||
{
|
||||
ensure_work_areas_validated (workspace);
|
||||
|
||||
@ -1426,7 +1426,7 @@ window_contains_point (MetaWindow *window,
|
||||
int root_x,
|
||||
int root_y)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &rect);
|
||||
|
||||
|
@ -24,44 +24,15 @@
|
||||
#include <glib-object.h>
|
||||
#include <meta/common.h>
|
||||
|
||||
#define META_TYPE_RECTANGLE (meta_rectangle_get_type ())
|
||||
|
||||
/**
|
||||
* MetaRectangle:
|
||||
* @x: X coordinate of the top-left corner
|
||||
* @y: Y coordinate of the top-left corner
|
||||
* @width: Width of the rectangle
|
||||
* @height: Height of the rectangle
|
||||
*/
|
||||
#ifdef __GI_SCANNER__
|
||||
/* The introspection scanner is currently unable to lookup how
|
||||
* cairo_rectangle_int_t is actually defined. This prevents
|
||||
* introspection data for the GdkRectangle type to include fields
|
||||
* descriptions. To workaround this issue, we define it with the same
|
||||
* content as cairo_rectangle_int_t, but only under the introspection
|
||||
* define.
|
||||
*/
|
||||
struct _MetaRectangle
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
typedef struct _MetaRectangle MetaRectangle;
|
||||
#else
|
||||
typedef cairo_rectangle_int_t MetaRectangle;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MetaStrut:
|
||||
* @rect: #MetaRectangle the #MetaStrut is on
|
||||
* @rect: #MtkRectangle the #MetaStrut is on
|
||||
* @side: #MetaSide the #MetaStrut is on
|
||||
*/
|
||||
typedef struct _MetaStrut MetaStrut;
|
||||
struct _MetaStrut
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
MetaSide side;
|
||||
};
|
||||
|
||||
@ -80,23 +51,14 @@ typedef enum
|
||||
|
||||
/**
|
||||
* MetaEdge:
|
||||
* @rect: #MetaRectangle with the bounds of the edge
|
||||
* @rect: #MtkRectangle with the bounds of the edge
|
||||
* @side_type: Side
|
||||
* @edge_type: To what belongs the edge
|
||||
*/
|
||||
typedef struct _MetaEdge MetaEdge;
|
||||
struct _MetaEdge
|
||||
{
|
||||
MetaRectangle rect; /* width or height should be 1 */
|
||||
MtkRectangle rect; /* width or height should be 1 */
|
||||
MetaSide side_type;
|
||||
MetaEdgeType edge_type;
|
||||
};
|
||||
|
||||
META_EXPORT
|
||||
GType meta_rectangle_get_type (void);
|
||||
|
||||
META_EXPORT
|
||||
MetaRectangle *meta_rectangle_copy (const MetaRectangle *rect);
|
||||
|
||||
META_EXPORT
|
||||
void meta_rectangle_free (MetaRectangle *rect);
|
||||
|
@ -246,7 +246,7 @@ int meta_display_get_current_monitor (MetaDisplay *display);
|
||||
META_EXPORT
|
||||
void meta_display_get_monitor_geometry (MetaDisplay *display,
|
||||
int monitor,
|
||||
MetaRectangle *geometry);
|
||||
MtkRectangle *geometry);
|
||||
|
||||
META_EXPORT
|
||||
float meta_display_get_monitor_scale (MetaDisplay *display,
|
||||
@ -258,7 +258,7 @@ gboolean meta_display_get_monitor_in_fullscreen (MetaDisplay *display,
|
||||
|
||||
META_EXPORT
|
||||
int meta_display_get_monitor_index_for_rect (MetaDisplay *display,
|
||||
MetaRectangle *rect);
|
||||
MtkRectangle *rect);
|
||||
|
||||
META_EXPORT
|
||||
int meta_display_get_monitor_neighbor_index (MetaDisplay *display,
|
||||
|
@ -95,8 +95,8 @@ struct _MetaPluginClass
|
||||
void (*size_change) (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
MetaSizeChange which_change,
|
||||
MetaRectangle *old_frame_rect,
|
||||
MetaRectangle *old_buffer_rect);
|
||||
MtkRectangle *old_frame_rect,
|
||||
MtkRectangle *old_buffer_rect);
|
||||
|
||||
/**
|
||||
* MetaPluginClass::map:
|
||||
@ -131,7 +131,7 @@ struct _MetaPluginClass
|
||||
|
||||
void (*show_tile_preview) (MetaPlugin *plugin,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor_number);
|
||||
void (*hide_tile_preview) (MetaPlugin *plugin);
|
||||
|
||||
@ -144,7 +144,7 @@ struct _MetaPluginClass
|
||||
void (*show_window_menu_for_rect) (MetaPlugin *plugin,
|
||||
MetaWindow *window,
|
||||
MetaWindowMenuType menu,
|
||||
MetaRectangle *rect);
|
||||
MtkRectangle *rect);
|
||||
|
||||
/**
|
||||
* MetaPluginClass::kill_window_effects:
|
||||
|
@ -52,7 +52,7 @@ cairo_surface_t * meta_window_actor_get_image (MetaWindowActor *self,
|
||||
|
||||
META_EXPORT
|
||||
ClutterContent * meta_window_actor_paint_to_content (MetaWindowActor *self,
|
||||
MetaRectangle *clip,
|
||||
MtkRectangle *clip,
|
||||
GError **error);
|
||||
|
||||
META_EXPORT
|
||||
|
@ -121,20 +121,22 @@ META_EXPORT
|
||||
gboolean meta_window_is_skip_taskbar (MetaWindow *window);
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_get_buffer_rect (const MetaWindow *window, MetaRectangle *rect);
|
||||
void meta_window_get_buffer_rect (const MetaWindow *window,
|
||||
MtkRectangle *rect);
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_get_frame_rect (const MetaWindow *window, MetaRectangle *rect);
|
||||
void meta_window_get_frame_rect (const MetaWindow *window,
|
||||
MtkRectangle *rect);
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_client_rect_to_frame_rect (MetaWindow *window,
|
||||
MetaRectangle *client_rect,
|
||||
MetaRectangle *frame_rect);
|
||||
MtkRectangle *client_rect,
|
||||
MtkRectangle *frame_rect);
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_frame_rect_to_client_rect (MetaWindow *window,
|
||||
MetaRectangle *frame_rect,
|
||||
MetaRectangle *client_rect);
|
||||
MtkRectangle *frame_rect,
|
||||
MtkRectangle *client_rect);
|
||||
|
||||
META_EXPORT
|
||||
MetaDisplay *meta_window_get_display (MetaWindow *window);
|
||||
@ -281,11 +283,11 @@ gboolean meta_window_is_on_primary_monitor (MetaWindow *window);
|
||||
|
||||
META_EXPORT
|
||||
gboolean meta_window_get_icon_geometry (MetaWindow *window,
|
||||
MetaRectangle *rect);
|
||||
MtkRectangle *rect);
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_set_icon_geometry (MetaWindow *window,
|
||||
MetaRectangle *rect);
|
||||
MtkRectangle *rect);
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_maximize (MetaWindow *window,
|
||||
@ -388,16 +390,16 @@ void meta_window_check_alive (MetaWindow *window,
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_get_work_area_current_monitor (MetaWindow *window,
|
||||
MetaRectangle *area);
|
||||
MtkRectangle *area);
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_get_work_area_for_monitor (MetaWindow *window,
|
||||
int which_monitor,
|
||||
MetaRectangle *area);
|
||||
MtkRectangle *area);
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_get_work_area_all_monitors (MetaWindow *window,
|
||||
MetaRectangle *area);
|
||||
MtkRectangle *area);
|
||||
|
||||
META_EXPORT
|
||||
gboolean meta_window_begin_grab_op (MetaWindow *window,
|
||||
|
@ -47,11 +47,11 @@ GList* meta_workspace_list_windows (MetaWorkspace *workspace);
|
||||
META_EXPORT
|
||||
void meta_workspace_get_work_area_for_monitor (MetaWorkspace *workspace,
|
||||
int which_monitor,
|
||||
MetaRectangle *area);
|
||||
MtkRectangle *area);
|
||||
|
||||
META_EXPORT
|
||||
void meta_workspace_get_work_area_all_monitors (MetaWorkspace *workspace,
|
||||
MetaRectangle *area);
|
||||
MtkRectangle *area);
|
||||
|
||||
META_EXPORT
|
||||
void meta_workspace_activate (MetaWorkspace *workspace, guint32 timestamp);
|
||||
|
@ -41,7 +41,7 @@ init_random_ness (void)
|
||||
}
|
||||
|
||||
static void
|
||||
get_random_rect (MetaRectangle *rect)
|
||||
get_random_rect (MtkRectangle *rect)
|
||||
{
|
||||
rect->x = rand () % 1600;
|
||||
rect->y = rand () % 1200;
|
||||
@ -93,7 +93,7 @@ new_monitor_edge (int x, int y, int width, int height, int side_type)
|
||||
static void
|
||||
test_init_rect (void)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
rect = MTK_RECTANGLE_INIT (1, 2, 3, 4);
|
||||
g_assert_cmpint (rect.x, ==, 1);
|
||||
@ -105,7 +105,7 @@ test_init_rect (void)
|
||||
static void
|
||||
test_area (void)
|
||||
{
|
||||
MetaRectangle temp;
|
||||
MtkRectangle temp;
|
||||
int i;
|
||||
for (i = 0; i < NUM_RANDOM_RUNS; i++)
|
||||
{
|
||||
@ -120,13 +120,13 @@ test_area (void)
|
||||
static void
|
||||
test_intersect (void)
|
||||
{
|
||||
MetaRectangle a = {100, 200, 50, 40};
|
||||
MetaRectangle b = { 0, 50, 110, 152};
|
||||
MetaRectangle c = { 0, 0, 10, 10};
|
||||
MetaRectangle d = {100, 100, 50, 50};
|
||||
MetaRectangle b_intersect_d = {100, 100, 10, 50};
|
||||
MetaRectangle temp;
|
||||
MetaRectangle temp2;
|
||||
MtkRectangle a = {100, 200, 50, 40};
|
||||
MtkRectangle b = { 0, 50, 110, 152};
|
||||
MtkRectangle c = { 0, 0, 10, 10};
|
||||
MtkRectangle d = {100, 100, 50, 50};
|
||||
MtkRectangle b_intersect_d = {100, 100, 10, 50};
|
||||
MtkRectangle temp;
|
||||
MtkRectangle temp2;
|
||||
|
||||
mtk_rectangle_intersect (&a, &b, &temp);
|
||||
temp2 = MTK_RECTANGLE_INIT (100, 200, 10, 2);
|
||||
@ -146,12 +146,12 @@ test_intersect (void)
|
||||
static void
|
||||
test_equal (void)
|
||||
{
|
||||
MetaRectangle a = {10, 12, 4, 18};
|
||||
MetaRectangle b = a;
|
||||
MetaRectangle c = {10, 12, 4, 19};
|
||||
MetaRectangle d = {10, 12, 7, 18};
|
||||
MetaRectangle e = {10, 62, 4, 18};
|
||||
MetaRectangle f = {27, 12, 4, 18};
|
||||
MtkRectangle a = {10, 12, 4, 18};
|
||||
MtkRectangle b = a;
|
||||
MtkRectangle c = {10, 12, 4, 19};
|
||||
MtkRectangle d = {10, 12, 7, 18};
|
||||
MtkRectangle e = {10, 62, 4, 18};
|
||||
MtkRectangle f = {27, 12, 4, 18};
|
||||
|
||||
g_assert ( mtk_rectangle_equal (&a, &b));
|
||||
g_assert (!mtk_rectangle_equal (&a, &c));
|
||||
@ -163,7 +163,7 @@ test_equal (void)
|
||||
static void
|
||||
test_overlap_funcs (void)
|
||||
{
|
||||
MetaRectangle temp1, temp2;
|
||||
MtkRectangle temp1, temp2;
|
||||
int i;
|
||||
for (i = 0; i < NUM_RANDOM_RUNS; i++)
|
||||
{
|
||||
@ -184,7 +184,7 @@ test_overlap_funcs (void)
|
||||
static void
|
||||
test_basic_fitting (void)
|
||||
{
|
||||
MetaRectangle temp1, temp2, temp3;
|
||||
MtkRectangle temp1, temp2, temp3;
|
||||
int i;
|
||||
/* Four cases:
|
||||
* case temp1 fits temp2 temp1 could fit temp2
|
||||
@ -274,7 +274,7 @@ get_screen_region (int which)
|
||||
{
|
||||
GList *ret;
|
||||
GSList *struts;
|
||||
MetaRectangle basic_rect;
|
||||
MtkRectangle basic_rect;
|
||||
|
||||
basic_rect = MTK_RECTANGLE_INIT (0, 0, 1600, 1200);
|
||||
ret = NULL;
|
||||
@ -291,7 +291,7 @@ get_screen_edges (int which)
|
||||
{
|
||||
GList *ret;
|
||||
GSList *struts;
|
||||
MetaRectangle basic_rect;
|
||||
MtkRectangle basic_rect;
|
||||
|
||||
basic_rect = MTK_RECTANGLE_INIT (0, 0, 1600, 1200);
|
||||
ret = NULL;
|
||||
@ -382,14 +382,14 @@ test_merge_regions (void)
|
||||
|
||||
while (compare && compare->next)
|
||||
{
|
||||
MetaRectangle *a = compare->data;
|
||||
MtkRectangle *a = compare->data;
|
||||
GList *other = compare->next;
|
||||
|
||||
g_assert (a->width > 0 && a->height > 0);
|
||||
|
||||
while (other)
|
||||
{
|
||||
MetaRectangle *b = other->data;
|
||||
MtkRectangle *b = other->data;
|
||||
GList *delete_me = NULL;
|
||||
|
||||
g_assert (b->width > 0 && b->height > 0);
|
||||
@ -469,7 +469,7 @@ test_merge_regions (void)
|
||||
if (delete_me != NULL)
|
||||
{
|
||||
#ifdef PRINT_DEBUG
|
||||
MetaRectangle *bla = delete_me->data;
|
||||
MtkRectangle *bla = delete_me->data;
|
||||
printf (" Deleting rect %s\n",
|
||||
meta_rectangle_to_string (bla, rect1));
|
||||
#endif
|
||||
@ -525,8 +525,8 @@ verify_lists_are_equal (GList *code, GList *answer)
|
||||
|
||||
while (code && answer)
|
||||
{
|
||||
MetaRectangle *a = code->data;
|
||||
MetaRectangle *b = answer->data;
|
||||
MtkRectangle *a = code->data;
|
||||
MtkRectangle *b = answer->data;
|
||||
|
||||
if (a->x != b->x ||
|
||||
a->y != b->y ||
|
||||
@ -549,7 +549,7 @@ verify_lists_are_equal (GList *code, GList *answer)
|
||||
/* Ought to be at the end of both lists; check if we aren't */
|
||||
if (code)
|
||||
{
|
||||
MetaRectangle *tmp = code->data;
|
||||
MtkRectangle *tmp = code->data;
|
||||
g_error ("code list longer than answer list by %d items; "
|
||||
"first extra item: %d,%d +%d,%d\n",
|
||||
g_list_length (code),
|
||||
@ -558,7 +558,7 @@ verify_lists_are_equal (GList *code, GList *answer)
|
||||
|
||||
if (answer)
|
||||
{
|
||||
MetaRectangle *tmp = answer->data;
|
||||
MtkRectangle *tmp = answer->data;
|
||||
g_error ("answer list longer than code list by %d items; "
|
||||
"first extra item: %d,%d +%d,%d\n",
|
||||
g_list_length (answer),
|
||||
@ -656,7 +656,7 @@ static void
|
||||
test_region_fitting (void)
|
||||
{
|
||||
GList *region;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
/* See test_basic_fitting() for how/why these automated random tests work */
|
||||
int i;
|
||||
@ -698,8 +698,8 @@ static void
|
||||
test_clamping_to_region (void)
|
||||
{
|
||||
GList *region;
|
||||
MetaRectangle rect;
|
||||
MetaRectangle min_size;
|
||||
MtkRectangle rect;
|
||||
MtkRectangle min_size;
|
||||
FixedDirections fixed_directions;
|
||||
int i;
|
||||
|
||||
@ -709,7 +709,7 @@ test_clamping_to_region (void)
|
||||
region = get_screen_region (3);
|
||||
for (i = 0; i < NUM_RANDOM_RUNS; i++)
|
||||
{
|
||||
MetaRectangle temp;
|
||||
MtkRectangle temp;
|
||||
get_random_rect (&rect);
|
||||
temp = rect;
|
||||
meta_rectangle_clamp_to_fit_into_region (region,
|
||||
@ -796,7 +796,7 @@ test_clamping_to_region (void)
|
||||
|
||||
static gboolean
|
||||
rect_overlaps_region (const GList *spanning_rects,
|
||||
const MetaRectangle *rect)
|
||||
const MtkRectangle *rect)
|
||||
{
|
||||
/* FIXME: Should I move this to boxes.[ch]? */
|
||||
const GList *temp;
|
||||
@ -819,7 +819,7 @@ static void
|
||||
test_clipping_to_region (void)
|
||||
{
|
||||
GList *region;
|
||||
MetaRectangle rect, temp;
|
||||
MtkRectangle rect, temp;
|
||||
FixedDirections fixed_directions = 0;
|
||||
int i;
|
||||
|
||||
@ -879,7 +879,7 @@ static void
|
||||
test_shoving_into_region (void)
|
||||
{
|
||||
GList *region;
|
||||
MetaRectangle rect, temp;
|
||||
MtkRectangle rect, temp;
|
||||
FixedDirections fixed_directions = 0;
|
||||
int i;
|
||||
|
||||
@ -1211,7 +1211,7 @@ test_find_nonintersected_monitor_edges (void)
|
||||
static void
|
||||
test_gravity_resize (void)
|
||||
{
|
||||
MetaRectangle oldrect, rect, temp;
|
||||
MtkRectangle oldrect, rect, temp;
|
||||
|
||||
rect.x = -500; /* Some random amount not equal to oldrect.x to ensure that
|
||||
* the resize is done with respect to oldrect instead of rect
|
||||
|
@ -121,7 +121,7 @@ meta_get_mode_fixed_rect_16 (MetaKmsMode *mode)
|
||||
meta_kms_mode_get_height (mode));
|
||||
}
|
||||
|
||||
MetaRectangle
|
||||
MtkRectangle
|
||||
meta_get_mode_rect (MetaKmsMode *mode)
|
||||
{
|
||||
return MTK_RECTANGLE_INIT (0, 0,
|
||||
|
@ -38,4 +38,4 @@ MetaDrmBuffer * meta_create_test_mode_dumb_buffer (MetaKmsDevice *device,
|
||||
|
||||
MetaFixed16Rectangle meta_get_mode_fixed_rect_16 (MetaKmsMode *mode);
|
||||
|
||||
MetaRectangle meta_get_mode_rect (MetaKmsMode *mode);
|
||||
MtkRectangle meta_get_mode_rect (MetaKmsMode *mode);
|
||||
|
@ -208,7 +208,7 @@ check_current_monitor_mode (MetaMonitor *monitor,
|
||||
|
||||
static MetaLogicalMonitor *
|
||||
logical_monitor_from_layout (MetaMonitorManager *monitor_manager,
|
||||
MetaRectangle *layout)
|
||||
MtkRectangle *layout)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
|
@ -165,7 +165,7 @@ typedef struct _MonitorTestCaseMonitor
|
||||
|
||||
typedef struct _MonitorTestCaseLogicalMonitor
|
||||
{
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
float scale;
|
||||
int monitors[MAX_N_MONITORS];
|
||||
int n_monitors;
|
||||
|
@ -221,7 +221,7 @@ assert_software_rendered (ClutterStageView *stage_view)
|
||||
|
||||
static void
|
||||
capture_view_into (ClutterStageView *view,
|
||||
MetaRectangle *rect,
|
||||
MtkRectangle *rect,
|
||||
uint8_t *buffer,
|
||||
int stride)
|
||||
{
|
||||
@ -277,7 +277,7 @@ on_after_paint (MetaStage *stage,
|
||||
gpointer user_data)
|
||||
{
|
||||
CaptureViewData *data = user_data;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
float view_scale;
|
||||
int texture_width, texture_height;
|
||||
cairo_surface_t *image;
|
||||
|
@ -92,7 +92,7 @@ typedef struct _DisplayTilePreview
|
||||
{
|
||||
ClutterActor *actor;
|
||||
|
||||
MetaRectangle tile_rect;
|
||||
MtkRectangle tile_rect;
|
||||
} DisplayTilePreview;
|
||||
|
||||
G_DEFINE_TYPE (MetaTestShell, meta_test_shell, META_TYPE_PLUGIN)
|
||||
@ -262,7 +262,7 @@ on_monitors_changed (MetaMonitorManager *monitor_manager,
|
||||
{
|
||||
MetaBackgroundContent *background_content;
|
||||
ClutterContent *content;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
ClutterActor *background_actor;
|
||||
MetaBackground *background;
|
||||
uint8_t red;
|
||||
@ -720,7 +720,7 @@ get_display_tile_preview (MetaDisplay *display)
|
||||
static void
|
||||
meta_test_shell_show_tile_preview (MetaPlugin *plugin,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor_number)
|
||||
{
|
||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||
|
@ -53,7 +53,7 @@ typedef struct _MonitorStoreTestCaseMonitor
|
||||
|
||||
typedef struct _MonitorStoreTestCaseLogicalMonitor
|
||||
{
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
float scale;
|
||||
MetaMonitorTransform transform;
|
||||
gboolean is_primary;
|
||||
|
@ -7968,7 +7968,7 @@ meta_test_monitor_custom_lid_switch_config (void)
|
||||
test_case.expect.crtcs[1].x = 1024;
|
||||
test_case.expect.crtcs[1].transform = META_MONITOR_TRANSFORM_270;
|
||||
test_case.expect.logical_monitors[0].layout =
|
||||
(MetaRectangle) { .width = 1024, .height = 768 };
|
||||
(MtkRectangle) { .width = 1024, .height = 768 };
|
||||
test_case.expect.logical_monitors[0].transform = META_MONITOR_TRANSFORM_NORMAL;
|
||||
test_case.expect.logical_monitors[1].transform = META_MONITOR_TRANSFORM_270;
|
||||
test_case.expect.n_logical_monitors = 2;
|
||||
@ -7990,7 +7990,7 @@ meta_test_monitor_custom_lid_switch_config (void)
|
||||
test_case.expect.crtcs[1].x = 0;
|
||||
test_case.expect.monitors[0].current_mode = -1;
|
||||
test_case.expect.logical_monitors[0].layout =
|
||||
(MetaRectangle) { .width = 768, .height = 1024 };
|
||||
(MtkRectangle) { .width = 768, .height = 1024 };
|
||||
test_case.expect.logical_monitors[0].monitors[0] = 1;
|
||||
test_case.expect.logical_monitors[0].transform = META_MONITOR_TRANSFORM_90;
|
||||
test_case.expect.n_logical_monitors = 1;
|
||||
@ -8015,7 +8015,7 @@ meta_test_monitor_custom_lid_switch_config (void)
|
||||
test_case.expect.crtcs[1].x = 1024;
|
||||
test_case.expect.monitors[0].current_mode = 0;
|
||||
test_case.expect.logical_monitors[0].layout =
|
||||
(MetaRectangle) { .width = 1024, .height = 768 };
|
||||
(MtkRectangle) { .width = 1024, .height = 768 };
|
||||
test_case.expect.logical_monitors[0].monitors[0] = 0;
|
||||
test_case.expect.logical_monitors[0].transform = META_MONITOR_TRANSFORM_NORMAL;
|
||||
test_case.expect.logical_monitors[1].transform = META_MONITOR_TRANSFORM_270;
|
||||
|
@ -264,7 +264,7 @@ meta_test_kms_device_mode_set (void)
|
||||
g_autoptr (MetaDrmBuffer) primary_buffer = NULL;
|
||||
MetaKmsCrtcState crtc_state;
|
||||
MetaKmsConnectorState connector_state;
|
||||
MetaRectangle mode_rect;
|
||||
MtkRectangle mode_rect;
|
||||
MetaKmsFeedback *feedback;
|
||||
|
||||
device = meta_get_test_kms_device (test_context);
|
||||
|
@ -64,7 +64,7 @@ meta_test_headless_monitor_getters (void)
|
||||
display = meta_context_get_display (test_context);
|
||||
|
||||
index = meta_display_get_monitor_index_for_rect (display,
|
||||
&(MetaRectangle) { 0 });
|
||||
&(MtkRectangle) { 0 });
|
||||
g_assert_cmpint (index, ==, -1);
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ meta_test_headless_monitor_connect (void)
|
||||
g_autolist (GObject) udev_devices = NULL;
|
||||
GList *logical_monitors;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle monitor_layout;
|
||||
MtkRectangle monitor_layout;
|
||||
ClutterActor *stage;
|
||||
g_autoptr (GError) error = NULL;
|
||||
|
||||
|
@ -245,7 +245,7 @@ meta_test_switch_config (void)
|
||||
g_autoptr (ClutterVirtualInputDevice) virtual_keyboard = NULL;
|
||||
g_autoptr (MetaVirtualMonitor) virtual_monitor = NULL;
|
||||
GList *logical_monitors;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
gulong after_paint_handler_id;
|
||||
gulong presented_handler_id;
|
||||
gboolean monitors_changed;
|
||||
|
@ -229,8 +229,8 @@ meta_test_kms_render_client_scanout (void)
|
||||
gulong paint_view_handler_id;
|
||||
gulong presented_handler_id;
|
||||
MetaWindow *window;
|
||||
MetaRectangle view_rect;
|
||||
MetaRectangle buffer_rect;
|
||||
MtkRectangle view_rect;
|
||||
MtkRectangle buffer_rect;
|
||||
|
||||
test_driver = meta_wayland_test_driver_new (wayland_compositor);
|
||||
meta_wayland_test_driver_set_property (test_driver,
|
||||
|
@ -39,7 +39,7 @@ wait_for_paint (gpointer user_data)
|
||||
GList *monitors;
|
||||
GList *logical_monitors;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
g_signal_connect_swapped (stage, "presented",
|
||||
|
@ -350,7 +350,7 @@ test_case_assert_size (TestCase *test,
|
||||
int expected_height,
|
||||
GError **error)
|
||||
{
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
|
||||
@ -449,7 +449,7 @@ parse_window_size (MetaWindow *window,
|
||||
const char *size_str)
|
||||
{
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
int value;
|
||||
|
||||
logical_monitor = meta_window_find_monitor_from_frame_rect (window);
|
||||
@ -889,7 +889,7 @@ test_case_do (TestCase *test,
|
||||
MetaDisplay *display = meta_context_get_display (test->context);
|
||||
MetaWorkspaceManager *workspace_manager =
|
||||
meta_display_get_workspace_manager (display);
|
||||
MetaRectangle rect = { x, y, width, height };
|
||||
MtkRectangle rect = { x, y, width, height };
|
||||
MetaStrut strut = { rect, side };
|
||||
GSList *struts = g_slist_append (NULL, &strut);
|
||||
GList *workspaces =
|
||||
@ -999,7 +999,7 @@ test_case_do (TestCase *test,
|
||||
if (!window)
|
||||
return FALSE;
|
||||
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
meta_window_get_frame_rect (window, &frame_rect);
|
||||
int x = atoi (argv[2]);
|
||||
int y = atoi (argv[3]);
|
||||
|
@ -202,8 +202,8 @@ meta_test_util_later_schedule_from_later (void)
|
||||
static void
|
||||
meta_test_adjacent_to (void)
|
||||
{
|
||||
MetaRectangle base = { .x = 10, .y = 10, .width = 10, .height = 10 };
|
||||
MetaRectangle adjacent[] = {
|
||||
MtkRectangle base = { .x = 10, .y = 10, .width = 10, .height = 10 };
|
||||
MtkRectangle adjacent[] = {
|
||||
{ .x = 20, .y = 10, .width = 10, .height = 10 },
|
||||
{ .x = 0, .y = 10, .width = 10, .height = 10 },
|
||||
{ .x = 0, .y = 1, .width = 10, .height = 10 },
|
||||
@ -211,7 +211,7 @@ meta_test_adjacent_to (void)
|
||||
{ .x = 10, .y = 20, .width = 10, .height = 10 },
|
||||
{ .x = 10, .y = 0, .width = 10, .height = 10 },
|
||||
};
|
||||
MetaRectangle not_adjacent[] = {
|
||||
MtkRectangle not_adjacent[] = {
|
||||
{ .x = 0, .y = 0, .width = 10, .height = 10 },
|
||||
{ .x = 20, .y = 20, .width = 10, .height = 10 },
|
||||
{ .x = 21, .y = 10, .width = 10, .height = 10 },
|
||||
|
@ -65,7 +65,7 @@ fractional_scale (void)
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
|
||||
wait_for_sync_point (0);
|
||||
assert_wayland_surface_size (test_window, 1920, 1080);
|
||||
|
@ -105,7 +105,7 @@ wait_for_window_added (MetaWindow *window)
|
||||
static void
|
||||
toplevel_fullscreen (void)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
wait_for_first_frame (test_window);
|
||||
|
||||
@ -121,7 +121,7 @@ static void
|
||||
toplevel_fullscreen_ref_test (void)
|
||||
{
|
||||
MetaWindowWayland *wl_window = META_WINDOW_WAYLAND (test_window);
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
wait_for_window_added (test_window);
|
||||
assert_wayland_surface_size (test_window, 10, 10);
|
||||
|
@ -148,7 +148,7 @@ on_effects_completed_idle (gpointer user_data)
|
||||
MetaBackend *backend = meta_context_get_backend (test_context);
|
||||
ClutterActor *stage = meta_backend_get_stage (backend);
|
||||
MetaWindow *window = meta_window_actor_get_meta_window (actor);
|
||||
MetaRectangle buffer_rect;
|
||||
MtkRectangle buffer_rect;
|
||||
|
||||
/* Move the window to a known position and perform a mouse click, allowing a
|
||||
* popup to be mapped. */
|
||||
@ -244,7 +244,7 @@ on_unmap_sync_point (MetaWaylandTestDriver *test_driver,
|
||||
ClutterActor *actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface));
|
||||
MetaWindowActor *window_actor = meta_window_actor_from_actor (actor);
|
||||
MetaWindow *window = meta_window_actor_get_meta_window (window_actor);
|
||||
MetaRectangle buffer_rect;
|
||||
MtkRectangle buffer_rect;
|
||||
|
||||
/* Click inside the window to allow mapping a popup. */
|
||||
|
||||
@ -424,7 +424,7 @@ wait_until_after_paint (void)
|
||||
}
|
||||
|
||||
static void
|
||||
set_struts (MetaRectangle rect,
|
||||
set_struts (MtkRectangle rect,
|
||||
MetaSide side)
|
||||
{
|
||||
MetaDisplay *display = meta_context_get_display (test_context);
|
||||
@ -465,7 +465,7 @@ clear_struts (void)
|
||||
}
|
||||
}
|
||||
|
||||
static MetaRectangle
|
||||
static MtkRectangle
|
||||
get_primary_logical_monitor_layout (void)
|
||||
{
|
||||
MetaBackend *backend = meta_context_get_backend (test_context);
|
||||
@ -483,8 +483,8 @@ toplevel_bounds_struts (void)
|
||||
{
|
||||
MetaWaylandTestClient *wayland_test_client;
|
||||
MetaWindow *window;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
MtkRectangle work_area;
|
||||
|
||||
/*
|
||||
* This test case makes sure that setting and changing struts result in the
|
||||
@ -492,7 +492,7 @@ toplevel_bounds_struts (void)
|
||||
*/
|
||||
|
||||
logical_monitor_layout = get_primary_logical_monitor_layout ();
|
||||
set_struts ((MetaRectangle) {
|
||||
set_struts ((MtkRectangle) {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.width = logical_monitor_layout.width,
|
||||
@ -566,8 +566,8 @@ toplevel_bounds_monitors (void)
|
||||
ClutterSeat *seat;
|
||||
g_autoptr (MetaVirtualMonitor) second_virtual_monitor = NULL;
|
||||
MetaWaylandTestClient *wayland_test_client;
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MetaRectangle work_area;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
MtkRectangle work_area;
|
||||
MetaWindow *window;
|
||||
|
||||
/*
|
||||
@ -584,7 +584,7 @@ toplevel_bounds_monitors (void)
|
||||
300, 200, 60.0);
|
||||
|
||||
logical_monitor_layout = get_primary_logical_monitor_layout ();
|
||||
set_struts ((MetaRectangle) {
|
||||
set_struts ((MtkRectangle) {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.width = logical_monitor_layout.width,
|
||||
|
@ -334,7 +334,7 @@ meta_wayland_actor_surface_is_on_logical_monitor (MetaWaylandSurfaceRole *surfac
|
||||
MetaBackend *backend = meta_context_get_backend (context);
|
||||
MetaRenderer *renderer = meta_backend_get_renderer (backend);
|
||||
ClutterActor *actor = CLUTTER_ACTOR (priv->actor);
|
||||
MetaRectangle logical_monitor_layout;
|
||||
MtkRectangle logical_monitor_layout;
|
||||
GList *l;
|
||||
|
||||
logical_monitor_layout = meta_logical_monitor_get_layout (logical_monitor);
|
||||
@ -342,7 +342,7 @@ meta_wayland_actor_surface_is_on_logical_monitor (MetaWaylandSurfaceRole *surfac
|
||||
for (l = meta_renderer_get_views (renderer); l; l = l->next)
|
||||
{
|
||||
ClutterStageView *stage_view = l->data;
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
|
||||
clutter_stage_view_get_layout (stage_view, &view_layout);
|
||||
|
||||
|
@ -608,7 +608,7 @@ send_xdg_output_events (struct wl_resource *resource,
|
||||
gboolean need_all_events,
|
||||
gboolean *pending_done_event)
|
||||
{
|
||||
MetaRectangle layout;
|
||||
MtkRectangle layout;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
int version;
|
||||
|
||||
|
@ -44,16 +44,16 @@ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (MetaWaylandShellSurface,
|
||||
|
||||
void
|
||||
meta_wayland_shell_surface_calculate_geometry (MetaWaylandShellSurface *shell_surface,
|
||||
MetaRectangle *out_geometry)
|
||||
MtkRectangle *out_geometry)
|
||||
{
|
||||
MetaWaylandSurfaceRole *surface_role =
|
||||
META_WAYLAND_SURFACE_ROLE (shell_surface);
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaRectangle geometry;
|
||||
MtkRectangle geometry;
|
||||
MetaWaylandSurface *subsurface_surface;
|
||||
|
||||
geometry = (MetaRectangle) {
|
||||
geometry = (MtkRectangle) {
|
||||
.width = meta_wayland_surface_get_width (surface),
|
||||
.height = meta_wayland_surface_get_height (surface),
|
||||
};
|
||||
@ -74,11 +74,11 @@ meta_wayland_shell_surface_calculate_geometry (MetaWaylandShellSurface *shell_su
|
||||
|
||||
void
|
||||
meta_wayland_shell_surface_determine_geometry (MetaWaylandShellSurface *shell_surface,
|
||||
MetaRectangle *set_geometry,
|
||||
MetaRectangle *out_geometry)
|
||||
MtkRectangle *set_geometry,
|
||||
MtkRectangle *out_geometry)
|
||||
{
|
||||
MetaRectangle bounding_geometry = { 0 };
|
||||
MetaRectangle intersected_geometry = { 0 };
|
||||
MtkRectangle bounding_geometry = { 0 };
|
||||
MtkRectangle intersected_geometry = { 0 };
|
||||
|
||||
meta_wayland_shell_surface_calculate_geometry (shell_surface,
|
||||
&bounding_geometry);
|
||||
|
@ -51,11 +51,11 @@ void meta_wayland_shell_surface_managed (MetaWaylandShellSurface *shell_surface,
|
||||
MetaWindow *window);
|
||||
|
||||
void meta_wayland_shell_surface_calculate_geometry (MetaWaylandShellSurface *shell_surface,
|
||||
MetaRectangle *out_geometry);
|
||||
MtkRectangle *out_geometry);
|
||||
|
||||
void meta_wayland_shell_surface_determine_geometry (MetaWaylandShellSurface *shell_surface,
|
||||
MetaRectangle *set_geometry,
|
||||
MetaRectangle *out_geometry);
|
||||
MtkRectangle *set_geometry,
|
||||
MtkRectangle *out_geometry);
|
||||
|
||||
void meta_wayland_shell_surface_set_window (MetaWaylandShellSurface *shell_surface,
|
||||
MetaWindow *window);
|
||||
|
@ -111,15 +111,15 @@ void
|
||||
meta_wayland_subsurface_union_geometry (MetaWaylandSubsurface *subsurface,
|
||||
int parent_x,
|
||||
int parent_y,
|
||||
MetaRectangle *out_geometry)
|
||||
MtkRectangle *out_geometry)
|
||||
{
|
||||
MetaWaylandSurfaceRole *surface_role = META_WAYLAND_SURFACE_ROLE (subsurface);
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaRectangle geometry;
|
||||
MtkRectangle geometry;
|
||||
MetaWaylandSurface *subsurface_surface;
|
||||
|
||||
geometry = (MetaRectangle) {
|
||||
geometry = (MtkRectangle) {
|
||||
.x = surface->offset_x + surface->sub.x,
|
||||
.y = surface->offset_y + surface->sub.y,
|
||||
.width = meta_wayland_surface_get_width (surface),
|
||||
|
@ -42,7 +42,7 @@ typedef struct
|
||||
void meta_wayland_subsurface_union_geometry (MetaWaylandSubsurface *subsurface,
|
||||
int parent_x,
|
||||
int parent_y,
|
||||
MetaRectangle *out_geometry);
|
||||
MtkRectangle *out_geometry);
|
||||
|
||||
void meta_wayland_subsurface_parent_destroyed (MetaWaylandSurface *surface);
|
||||
|
||||
|
@ -2272,7 +2272,7 @@ meta_wayland_surface_can_scanout_untransformed (MetaWaylandSurface *surface,
|
||||
|
||||
if (surface->viewport.has_dst_size)
|
||||
{
|
||||
MetaRectangle view_layout;
|
||||
MtkRectangle view_layout;
|
||||
float view_scale;
|
||||
float untransformed_layout_width;
|
||||
float untransformed_layout_height;
|
||||
|
@ -100,7 +100,7 @@ struct _MetaWaylandSurfaceState
|
||||
/* wl_surface.frame */
|
||||
struct wl_list frame_callback_list;
|
||||
|
||||
MetaRectangle new_geometry;
|
||||
MtkRectangle new_geometry;
|
||||
gboolean has_new_geometry;
|
||||
|
||||
gboolean has_acked_configure_serial;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user