[Xfce4-commits] [apps/xfce4-screenshooter] 01/01: Use new xfce_gdk_screen_get_geometry if available
noreply at xfce.org
noreply at xfce.org
Wed Apr 24 15:49:04 CEST 2019
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-screenshooter.
commit ae188a0e0fa157ea5e381c3ec4c878ffa1b4ed37
Author: Andre Miranda <andreldm at xfce.org>
Date: Wed Apr 24 10:47:16 2019 -0300
Use new xfce_gdk_screen_get_geometry if available
---
lib/screenshooter-utils.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/screenshooter-utils.c b/lib/screenshooter-utils.c
index 0790342..8e3cfa5 100644
--- a/lib/screenshooter-utils.c
+++ b/lib/screenshooter-utils.c
@@ -398,6 +398,12 @@ screenshooter_f1_key (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
void
screenshooter_get_screen_geometry (GdkRectangle *geometry)
{
+#if LIBXFCE4UI_CHECK_VERSION (4,14,0)
+ GdkRectangle *geometry2 = xfce_gdk_screen_get_geometry ();
+ geometry->width = geometry2->width;
+ geometry->height = geometry2->height;
+ g_free (geometry2);
+#else
GdkDisplay *display = gdk_display_get_default ();
int num_monitors = gdk_display_get_n_monitors (display);
@@ -420,6 +426,7 @@ screenshooter_get_screen_geometry (GdkRectangle *geometry)
geometry->width = w - x;
geometry->height = h - y;
+#endif
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list