summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/window-private.h1
-rw-r--r--src/core/window.c16
2 files changed, 14 insertions, 3 deletions
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 0f652b961..32515f7f7 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -82,6 +82,7 @@ typedef enum
META_MOVE_RESIZE_UNMAXIMIZE = 1 << 6,
META_MOVE_RESIZE_FORCE_MOVE = 1 << 7,
META_MOVE_RESIZE_WAYLAND_STATE_CHANGED = 1 << 8,
+ META_MOVE_RESIZE_FORCE_UPDATE_MONITOR = 1 << 9,
} MetaMoveResizeFlags;
typedef enum
diff --git a/src/core/window.c b/src/core/window.c
index c79d2663b..1f69d4afa 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -119,6 +119,7 @@ static gboolean queue_calc_showing_func (MetaWindow *window,
void *data);
static void meta_window_move_between_rects (MetaWindow *window,
+ MetaMoveResizeFlags move_resize_flags,
const MetaRectangle *old_area,
const MetaRectangle *new_area);
@@ -3841,6 +3842,7 @@ meta_window_update_for_monitors_changed (MetaWindow *window)
* monitors changed and the same index could be refereing
* to a different monitor. */
meta_window_move_between_rects (window,
+ META_MOVE_RESIZE_FORCE_UPDATE_MONITOR,
&old->rect,
&new->rect);
}
@@ -4020,6 +4022,8 @@ meta_window_move_resize_internal (MetaWindow *window,
update_monitor_flags = META_WINDOW_UPDATE_MONITOR_FLAGS_NONE;
if (flags & META_MOVE_RESIZE_USER_ACTION)
update_monitor_flags |= META_WINDOW_UPDATE_MONITOR_FLAGS_USER_OP;
+ if (flags & META_MOVE_RESIZE_FORCE_UPDATE_MONITOR)
+ update_monitor_flags |= META_WINDOW_UPDATE_MONITOR_FLAGS_FORCE;
if (window->monitor)
{
@@ -4079,6 +4083,7 @@ meta_window_move_frame (MetaWindow *window,
static void
meta_window_move_between_rects (MetaWindow *window,
+ MetaMoveResizeFlags move_resize_flags,
const MetaRectangle *old_area,
const MetaRectangle *new_area)
{
@@ -4102,7 +4107,12 @@ meta_window_move_between_rects (MetaWindow *window,
window->saved_rect.x = window->unconstrained_rect.x;
window->saved_rect.y = window->unconstrained_rect.y;
- meta_window_move_resize_now (window);
+ meta_window_move_resize_internal (window,
+ move_resize_flags |
+ META_MOVE_RESIZE_MOVE_ACTION |
+ META_MOVE_RESIZE_RESIZE_ACTION,
+ NorthWestGravity,
+ window->unconstrained_rect);
}
/**
@@ -4163,14 +4173,14 @@ meta_window_move_to_monitor (MetaWindow *window,
window->unconstrained_rect.height == 0 ||
!meta_rectangle_overlap (&window->unconstrained_rect, &old_area))
{
- meta_window_move_between_rects (window, NULL, &new_area);
+ meta_window_move_between_rects (window, 0, NULL, &new_area);
}
else
{
if (monitor == window->monitor->number)
return;
- meta_window_move_between_rects (window, &old_area, &new_area);
+ meta_window_move_between_rects (window, 0, &old_area, &new_area);
}
window->preferred_output_winsys_id = window->monitor->winsys_id;