summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-05-27 15:10:28 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-05-27 15:14:33 -0400
commit516b8f6bf8d9e74b63c664a4fc239210bb3079b3 (patch)
tree58e250ad44a100933ea7200a6f04f73b3d8934c6
parent75fdca0b47ebeb1d9fb6951ecb0ca52c2ea3b25e (diff)
screenshot: Don't use meta_window_get_rect
It's going to be removed soon.
-rw-r--r--src/shell-screenshot.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/shell-screenshot.c b/src/shell-screenshot.c
index a076aaab..02d4e150 100644
--- a/src/shell-screenshot.c
+++ b/src/shell-screenshot.c
@@ -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);
- screenshot_data->screenshot_area.x = rect.x;
- screenshot_data->screenshot_area.y = rect.y;
+ if (!include_frame)
+ meta_window_frame_rect_to_client_rect (window, &rect, &rect);
- 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;
- }
+ 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;
clip.width = screenshot_data->screenshot_area.width = rect.width;
clip.height = screenshot_data->screenshot_area.height = rect.height;