[gtk+/wip/attachment-rectangle] x11: add origin parameter to gdk_x11_window_set_attachment_rectangle.
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/attachment-rectangle] x11: add origin parameter to gdk_x11_window_set_attachment_rectangle.
- Date: Sat, 15 Aug 2015 00:16:30 +0000 (UTC)
commit 397611fee37808275318394a32627d3d15c65625
Author: William Hua <william hua canonical com>
Date: Fri Aug 14 20:11:25 2015 -0400
x11: add origin parameter to gdk_x11_window_set_attachment_rectangle.
gdk/x11/gdkwindow-x11.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index fd6c123..7fae928 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -5683,10 +5683,26 @@ gdk_x11_window_show_window_menu (GdkWindow *window,
static void
gdk_x11_window_set_attachment_rectangle (GdkWindow *window,
+ const GdkPoint *origin,
const GdkRectangle *rect,
GdkAttachmentOptions options)
{
- gdk_window_move (window, rect->x, rect->y + rect->height);
+ gint x;
+ gint y;
+
+ if (!rect)
+ return;
+
+ x = rect->x;
+ y = rect->y + rect->height;
+
+ if (origin)
+ {
+ x += origin->x;
+ y += origin->y;
+ }
+
+ gdk_window_move (window, x, y);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]