screenshot: Don't use meta_window_get_rect

It's going to be removed soon.
This commit is contained in:
Jasper St. Pierre 2014-05-27 15:10:28 -04:00
parent 75fdca0b47
commit 516b8f6bf8

View File

@ -530,26 +530,15 @@ shell_screenshot_screenshot_window (ShellScreenshot *screenshot,
window_actor = CLUTTER_ACTOR (meta_window_get_compositor_private (window));
clutter_actor_get_position (window_actor, &actor_x, &actor_y);
if (include_frame || !meta_window_get_frame (window))
{
meta_window_get_outer_rect (window, &rect);
meta_window_get_frame_rect (window, &rect);
if (!include_frame)
meta_window_frame_rect_to_client_rect (window, &rect, &rect);
screenshot_data->screenshot_area.x = rect.x;
screenshot_data->screenshot_area.y = rect.y;
clip.x = rect.x - (gint) actor_x;
clip.y = rect.y - (gint) actor_y;
}
else
{
rect = *meta_window_get_rect (window);
screenshot_data->screenshot_area.x = (gint) actor_x + rect.x;
screenshot_data->screenshot_area.y = (gint) actor_y + rect.y;
clip.x = rect.x;
clip.y = rect.y;
}
clip.width = screenshot_data->screenshot_area.width = rect.width;
clip.height = screenshot_data->screenshot_area.height = rect.height;