summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2013-10-02 20:23:11 +0200
committerraveit65 <[email protected]>2013-11-08 16:44:47 +0100
commit422504e251442ca9921c4218151cffb6548280e6 (patch)
tree7c95090ceac4172dc85f50d80eca12a7e7bb1e69
parent16b52af7ce208b7bac89ad04ae4ba4cf433103fd (diff)
downloadmate-utils-422504e251442ca9921c4218151cffb6548280e6.tar.bz2
mate-utils-422504e251442ca9921c4218151cffb6548280e6.tar.xz
disable masking for area or window screenshots
-rw-r--r--mate-screenshot/mate-screenshot.c5
-rw-r--r--mate-screenshot/screenshot-utils.c9
-rw-r--r--mate-screenshot/screenshot-utils.h3
3 files changed, 12 insertions, 5 deletions
diff --git a/mate-screenshot/mate-screenshot.c b/mate-screenshot/mate-screenshot.c
index 63ec5d9b..6510f7f8 100644
--- a/mate-screenshot/mate-screenshot.c
+++ b/mate-screenshot/mate-screenshot.c
@@ -809,13 +809,14 @@ static void
finish_prepare_screenshot (char *initial_uri, GdkWindow *window, GdkRectangle *rectangle)
{
ScreenshotDialog *dialog;
+ gboolean include_mask = (!take_window_shot && !take_area_shot);
/* always disable window border for full-desktop or selected-area screenshots */
if (!take_window_shot)
- screenshot = screenshot_get_pixbuf (window, rectangle, include_pointer, FALSE);
+ screenshot = screenshot_get_pixbuf (window, rectangle, include_pointer, FALSE, include_mask);
else
{
- screenshot = screenshot_get_pixbuf (window, rectangle, include_pointer, include_border);
+ screenshot = screenshot_get_pixbuf (window, rectangle, include_pointer, include_border, include_mask);
switch (border_effect[0])
{
diff --git a/mate-screenshot/screenshot-utils.c b/mate-screenshot/screenshot-utils.c
index b41ae4b8..faed6762 100644
--- a/mate-screenshot/screenshot-utils.c
+++ b/mate-screenshot/screenshot-utils.c
@@ -670,7 +670,8 @@ GdkPixbuf *
screenshot_get_pixbuf (GdkWindow *window,
GdkRectangle *rectangle,
gboolean include_pointer,
- gboolean include_border)
+ gboolean include_border,
+ gboolean include_mask)
{
GdkWindow *root;
GdkPixbuf *screenshot;
@@ -738,7 +739,11 @@ screenshot_get_pixbuf (GdkWindow *window,
x_orig, y_orig, 0, 0,
width, height);
- mask_monitors (screenshot, root);
+ /*
+ * Masking currently only works properly with full-screen shots
+ */
+ if (include_mask)
+ mask_monitors (screenshot, root);
#ifdef HAVE_X11_EXTENSIONS_SHAPE_H
if (include_border)
diff --git a/mate-screenshot/screenshot-utils.h b/mate-screenshot/screenshot-utils.h
index 0af2ba39..5404bde4 100644
--- a/mate-screenshot/screenshot-utils.h
+++ b/mate-screenshot/screenshot-utils.h
@@ -36,7 +36,8 @@ gboolean screenshot_select_area (int *px,
GdkPixbuf *screenshot_get_pixbuf (GdkWindow *win,
GdkRectangle *rectangle,
gboolean include_pointer,
- gboolean include_border);
+ gboolean include_border,
+ gboolean include_mask);
void screenshot_show_error_dialog (GtkWindow *parent,
const gchar *message,