After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772729 - [wayland] mutter/gnome-shell relocates windows after they're mapped on screen
[wayland] mutter/gnome-shell relocates windows after they're mapped on screen
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2016-10-11 07:02 UTC by Olivier Fourdan
Modified: 2016-10-12 08:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screencast of the issue (167.70 KB, video/webm)
2016-10-11 09:16 UTC, Olivier Fourdan
  Details
[PATCH] wayland: apply size hints after placing the window (1.75 KB, patch)
2016-10-11 13:24 UTC, Olivier Fourdan
committed Details | Review

Description Olivier Fourdan 2016-10-11 07:02:29 UTC
Description:

This seems to be a recent regression in mutter-3.22.x (I did not notice that in 3.20), it seems in a multii-monitor setup, mutter relocates windows after they're mapped, which is confusing to the user.

Steps to reproduce:

 - Log into GNOME on Wayland with a dual monitor setup.
 - In the primary monitor, open the gnome-control-center and move the pointer quickly to the second monitor

Actual result:

The gnome-controll-center window shows up on the primary monitor for  second andthen moves to the second monitor

Expected results:

Once mapped, the window remains where it is.
Comment 1 Olivier Fourdan 2016-10-11 07:03:53 UTC
Same with pretty much any application actually, just reproduced with gnome-calculator launched from the dash.
Comment 2 Olivier Fourdan 2016-10-11 09:16:15 UTC
Created attachment 337391 [details]
Screencast of the issue

The screencast makes the problem very visible...
Comment 3 Christian Stadelmann 2016-10-11 09:30:15 UTC
I'm seeing this for a single-monitor setup too. In this case the relocation isn't that obvious because it is just like 20 pixels, but it is still present. I can confirm this bug doesn't affect other (Gtk+ 2.x, Qt4 or Gtk+ 3.x with GDK_BACKEND=x11) toolkits and backends.

This is a list of some applications I've tested with every window I could find to open:
* gnome-terminal:
	* about dialog
	* search dialog
	* profile settings dialog
	* preferences dialog, but only when opened from menu, not from appmenu
	* NOT affected:
		* new window
* evince:
	* shortcuts window
	* about dialog
	* NOT affected:
		* document properties dialog
		* file open/save dialogs
		* document properties dialog
* nautilus:
	* preferences dialog
	* shortcuts window
	* about dialog
	* NOT affected: 
		* folder/file properties dialog
		* new window

Some more places I've noticed this:
* gnome-control-center main window
* gnome-control-center shortcuts window
* gnome-calendar event editor dialog
* evolution about dialog
* yelp main window (at least when called from evince appmenu or nautilus appmenu)
Comment 4 Olivier Fourdan 2016-10-11 13:02:20 UTC
The regression was introduced after 3.21.91 as this version was not affected. 3.21.92 has the bug though.

git bisect gives:

4f58a4621725ac657dcfa1e232af4e0d063b8f76 is the first bad commit
commit 4f58a4621725ac657dcfa1e232af4e0d063b8f76
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Wed Apr 6 14:07:08 2016 +0200

    wayland: add min/max size from xdg-shell v6
    
    Implement min/max size request from xdg-shell-v6 and plug it into the
    existing code so that windows with fixed size cannot be tiled/maximized
    in Wayland just like in X11.
    
    Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=770226


Oops... :(
Comment 5 Olivier Fourdan 2016-10-11 13:24:51 UTC
Created attachment 337430 [details] [review]
[PATCH] wayland: apply size hints after placing the window

Otherwise the window will be shown initially in the wrong position then
moved quickly as soon as it's made visible, which is confusing.
Comment 6 Jonas Ådahl 2016-10-12 08:11:34 UTC
Review of attachment 337430 [details] [review]:

Looks good to me.
Comment 7 Olivier Fourdan 2016-10-12 08:17:22 UTC
Comment on attachment 337430 [details] [review]
[PATCH] wayland: apply size hints after placing the window

attachment 337430 [details] [review] pushed to git master as commit d7f61e4 - wayland: apply size hints after placing the window