[mutter/gnome-3-4] Initialize window->user_rect in the initial placement
- From: Alban Crequy <albanc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-4] Initialize window->user_rect in the initial placement
- Date: Fri, 30 Nov 2012 13:38:55 +0000 (UTC)
commit 844ad6f4d426c49a3b002227f4aa4d6a9c4f567f
Author: Alban Crequy <alban crequy collabora co uk>
Date: Fri Nov 23 00:06:22 2012 +0000
Initialize window->user_rect in the initial placement
The window positioning is delayed in idle_move_resize() in case the application
resizes/maximizes its window quickly after its creation. The delayed
positioning uses window->user_rect because of bug 426519 comment 3 (see
meta_window_move_resize_now()).
user_rect was not set in the initial positioning, causing the delayed
positioning unable to know which monitor we use for this window. As a
consequence, the window could jump spontaneously from one monitor to another.
With this patch, the window does not jump anymore.
https://bugzilla.gnome.org/show_bug.cgi?id=556696
src/core/constraints.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/core/constraints.c b/src/core/constraints.c
index e5e390f..3476bf8 100644
--- a/src/core/constraints.c
+++ b/src/core/constraints.c
@@ -564,6 +564,11 @@ place_window_if_needed(MetaWindow *window,
.083 * info->work_area_monitor.height;
}
+ /* idle_move_resize() uses the user_rect, so make sure it uses the
+ * placed coordinates (bug #556696).
+ */
+ window->user_rect = info->current;
+
if (window->maximize_horizontally_after_placement ||
window->maximize_vertically_after_placement)
meta_window_maximize_internal (window,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]