window: Allow checking if a window covers a rect

This is just a small function to improve the readability of the code.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1154>
This commit is contained in:
Dor Askayo 2022-06-11 12:50:02 +03:00 committed by Marge Bot
parent 4e5ac0186c
commit 1318cd3faf
2 changed files with 11 additions and 0 deletions

View File

@ -707,6 +707,9 @@ void meta_window_get_session_geometry (MetaWindow *window,
int *width,
int *height);
gboolean meta_window_geometry_contains_rect (MetaWindow *window,
MtkRectangle *rect);
void meta_window_update_appears_focused (MetaWindow *window);
void meta_window_set_focused_internal (MetaWindow *window,

View File

@ -4281,6 +4281,14 @@ meta_window_get_session_geometry (MetaWindow *window,
window->size_hints.height_inc;
}
gboolean
meta_window_geometry_contains_rect (MetaWindow *window,
MtkRectangle *rect)
{
return mtk_rectangle_contains_rect (&window->rect,
rect);
}
/**
* meta_window_get_buffer_rect:
* @window: a #MetaWindow