`w.move_resize_frame` and `w.move_frame` moves the window to another monitor, which they should not
Affected version
Fedora 37 with Gnome 43.1
Mutter version: mutter-43.1-2
XOrg (I don't test on Wayland)
Bug summary
MetaWindow.move_frame
and MetaWindow.move_resize_frame
will move window to another monitor, this makes no sense, the window should stay on the current monitor.
Steps to reproduce
Test it in the Looking Glass:
- Launch Gnome Calendar
- Run those js code:
w=Shell.AppSystem.get_default().lookup_app(Shell.AppSystem.search('gnome-calendar')[0][0]).get_windows()[0];
w.move_to_monitor(0);
w.move_to_monitor(1);
w.move_resize_frame(true, 200, 200, 1000, 600);
// or
// w.move_frame(true, 200, 200);
What happened
Looks that the w
has not been updated when running w.move_to_monitor(1);
and w
doesn't know the window is already on monitor1, it though the window still on monitor0. So when we run w.move_resize_frame(true, 200, 200, 1000, 600);
or w.move_frame(true, 200, 200);
it just moves the window to monitor0.
What did you expect to happen
w.move_resize_frame(true, 200, 200, 1000, 600);
or w.move_frame(true, 200, 200);
should keep the window on the current monitor.