[gnome-screenshot/wip/exalm/refactor: 11/13] backend-x11: Use pixbuf dimensions when masking
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screenshot/wip/exalm/refactor: 11/13] backend-x11: Use pixbuf dimensions when masking
- Date: Wed, 22 Apr 2020 13:33:28 +0000 (UTC)
commit f53d720c7d9199075369f085cf5a39a6b53268bc
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Apr 22 18:23:02 2020 +0500
backend-x11: Use pixbuf dimensions when masking
There's no need to fetch screen dimensions there via deprecated API, since
we already have a pixbuf, its own dimensions work just fine here.
src/screenshot-backend-x11.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/screenshot-backend-x11.c b/src/screenshot-backend-x11.c
index 9da8947..3d858cb 100644
--- a/src/screenshot-backend-x11.c
+++ b/src/screenshot-backend-x11.c
@@ -204,20 +204,18 @@ mask_monitors (GdkPixbuf *pixbuf,
GdkWindow *root_window)
{
GdkDisplay *display;
- GdkScreen *screen;
cairo_region_t *region_with_monitors;
cairo_region_t *invisible_region;
cairo_rectangle_int_t rect;
display = gdk_window_get_display (root_window);
- screen = gdk_display_get_default_screen (display);
region_with_monitors = make_region_with_monitors (display);
rect.x = 0;
rect.y = 0;
- rect.width = gdk_screen_get_width (screen);
- rect.height = gdk_screen_get_height (screen);
+ rect.width = gdk_pixbuf_get_width (pixbuf);
+ rect.height = gdk_pixbuf_get_height (pixbuf);
invisible_region = cairo_region_create_rectangle (&rect);
cairo_region_subtract (invisible_region, region_with_monitors);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]