Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/gala.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<issue url="https://github.com/elementary/gala/issues/544">Multitasking View. Wingpanel shows for brief moment if a fullscreen wokspace is selected after coming from a wokspace that shows the wingpanel.</issue>
<issue url="https://github.com/elementary/gala/issues/823">Check for redacted font</issue>
<issue url="https://github.com/elementary/gala/issues/898">Super+Number. When workspace doesn't exist, switch to last workspace instead.</issue>
<issue url="https://github.com/elementary/gala/issues/1121">Postman app is captured partially (and without a shadow)</issue>
<issue url="https://github.com/elementary/gala/issues/1202">Touchpad desktop switching gesture is sometimes unresponsive</issue>
<issue url="https://github.com/elementary/gala/issues/1235">Overview window title should follow keyboard focus</issue>
<issue url="https://github.com/elementary/gala/issues/1661">Better post-screenshot animation</issue>
Expand Down
17 changes: 7 additions & 10 deletions src/ScreenshotManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,19 @@ public class Gala.ScreenshotManager : Object {
wm.launch_action (ActionKeys.INTERACTIVE_SCREENSHOT_ACTION);
break;
case "area-screenshot":
handle_screenshot_area_shortcut.begin (false);
handle_screenshot_area_shortcut.begin (false);
break;
case "window-screenshot":
handle_screenshot_current_window_shortcut.begin (false);
handle_screenshot_current_window_shortcut.begin (false);
break;
case "screenshot-clip":
handle_screenshot_screen_shortcut.begin (true);
break;
case "area-screenshot-clip":
handle_screenshot_area_shortcut.begin (true);
handle_screenshot_area_shortcut.begin (true);
break;
case "window-screenshot-clip":
handle_screenshot_current_window_shortcut.begin (true);
handle_screenshot_current_window_shortcut.begin (true);
break;
}
}
Expand Down Expand Up @@ -280,15 +280,12 @@ public class Gala.ScreenshotManager : Object {

var window_actor = (Meta.WindowActor) window.get_compositor_private ();

float actor_x, actor_y;
window_actor.get_position (out actor_x, out actor_y);

var rect = window.get_frame_rect ();
var rect = window.get_buffer_rect ();
if (!include_frame) {
rect = window.frame_rect_to_client_rect (rect);
rect = window.get_frame_rect ();
}

Mtk.Rectangle clip = { rect.x - (int) actor_x, rect.y - (int) actor_y, rect.width, rect.height };
Mtk.Rectangle clip = { rect.x - (int) window_actor.x, rect.y - (int) window_actor.y, rect.width, rect.height };
var image = (Cairo.ImageSurface) window_actor.get_image (clip);
if (include_cursor) {
if (window.get_client_type () == Meta.WindowClientType.WAYLAND) {
Expand Down
Loading