mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
Let the UI layer (via the core) construct the frame mask
This essentially just moves install_corners() from the compositor, through the core, into the UI layer where it arguably should have been anyway, leaving behind stub functions which call through the various layers. This removes the compositor's special knowledge of how rounded corners work, replacing it with "ask the UI for an alpha mask". The computation of border widths and heights changes a bit, because the width and height used in install_corners() are the meta_window_get_outer_rect() (which includes the visible borders but not the invisible ones), whereas the more readily-available rectangle is the MetaFrame.rect (which includes both). Computing the same width and height as meta_window_get_outer_rect() involves compensating for the invisible borders, but the UI layer is the authority on those anyway, so it seems clearer to have it do the calculations from scratch. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=697758 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
This commit is contained in:
@ -140,12 +140,11 @@ cairo_region_t *meta_frames_get_frame_bounds (MetaFrames *frames,
|
||||
int window_width,
|
||||
int window_height);
|
||||
|
||||
void meta_frames_get_corner_radiuses (MetaFrames *frames,
|
||||
Window xwindow,
|
||||
float *top_left,
|
||||
float *top_right,
|
||||
float *bottom_left,
|
||||
float *bottom_right);
|
||||
void meta_frames_get_mask (MetaFrames *frames,
|
||||
Window xwindow,
|
||||
guint width,
|
||||
guint height,
|
||||
cairo_t *cr);
|
||||
|
||||
void meta_frames_move_resize_frame (MetaFrames *frames,
|
||||
Window xwindow,
|
||||
|
Reference in New Issue
Block a user