[gtk+/wip/attachment-rectangle] x11: place window on correct monitor
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/attachment-rectangle] x11: place window on correct monitor
- Date: Wed, 9 Sep 2015 04:30:26 +0000 (UTC)
commit 8b31e0455474aad3312eb03ea4c73736765ddc8d
Author: William Hua <william hua canonical com>
Date: Wed Sep 9 00:27:56 2015 -0400
x11: place window on correct monitor
gdk/x11/gdkwindow-x11.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 9f6721c..504712b 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -5734,11 +5734,14 @@ gdk_x11_window_set_attachment_rectangle (GdkWindow *window,
origin = &zero;
screen = gdk_window_get_screen (window);
- monitor = gdk_screen_get_monitor_at_window (screen, window);
+ x = origin->x + rect->x + rect->width / 2;
+ y = origin->y + rect->y + rect->height / 2;
+ monitor = gdk_screen_get_monitor_at_point (screen, x, y);
gdk_screen_get_monitor_workarea (screen, monitor, &bounds);
w = gdk_window_get_width (window);
h = gdk_window_get_height (window);
can_flip = options & GDK_ATTACHMENT_ATTACH_OPPOSITE_EDGE;
+ should_move = FALSE;
switch (options & GDK_ATTACHMENT_ATTACH_MASK)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]