<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] Maps widget is displayed at wrong position inside gnome-contacts"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=771320#c14">Comment # 14</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] Maps widget is displayed at wrong position inside gnome-contacts"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=771320">bug 771320</a>
              from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
        <pre>(In reply to Olivier Fourdan from <a href="show_bug.cgi?id=771320#c12">comment #12</a>)
<span class="quote">> Yes, that's precisely the problem... abs_x/abs_y can be wrong when
> transitioning from/to fullscreen/maximized/normal because the shadows and
> header bar get added/removed.</span >

Just to clarify a bit here, this part there is to keep clutter-gtk's
GtkClutterEmbed happy.

There are two things to consider, one is that clutter stage with gdk backend
resizes on configure events whereas clutter-gtk GtkClutterEmbed widget reizes
on size_allocate signal emitted by gtk+ (upper layer).

By putting traces in clutter gdk's backend
_clutter_stage_gdk_notify_configure():

 
<a href="https://git.gnome.org/browse/clutter/tree/clutter/gdk/clutter-stage-gdk.c#n282">https://git.gnome.org/browse/clutter/tree/clutter/gdk/clutter-stage-gdk.c#n282</a>

And another in clutter-gtk gtk_clutter_embed_size_allocate():

 
<a href="https://git.gnome.org/browse/clutter-gtk/tree/clutter-gtk/gtk-clutter-embed.c#n670">https://git.gnome.org/browse/clutter-gtk/tree/clutter-gtk/gtk-clutter-embed.c#n670</a>

We can see exactly what happens with and without the patch when running totem
while switchng to maximized state and back:

A) If we configure *only* if abs_x/abs_y have changed:

1. Start in normal state:

  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x24f2650
(26,70) [661x429]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x24f2650
(26,70) [661x429]
  Clutter-Gtk-Message: gtk_clutter_embed_size_allocate() window 0x24f2650 (0,0)
[661x429]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x24f2650
(26,70) [661x429]

2. Switch to maximized state:

  Clutter-Gtk-Message: gtk_clutter_embed_size_allocate() window 0x24f2650 (0,0)
[1972x1205]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x24f2650
(26,70) [1972x1205]
  Clutter-Gtk-Message: gtk_clutter_embed_size_allocate() window 0x24f2650 (0,0)
[1920x1153]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x24f2650
(0,47) [1920x1153]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x24f2650
(0,47) [1972x1205]

3. Back to normal state:

  Clutter-Gtk-Message: gtk_clutter_embed_size_allocate() window 0x24f2650 (0,0)
[609x377]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x24f2650
(0,47) [609x377]
  Clutter-Gtk-Message: gtk_clutter_embed_size_allocate() window 0x24f2650 (0,0)
[661x429]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x24f2650
(26,70) [661x429]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x24f2650
(26,70) [609x377]

=> The final configure event gives (26,70) [609x377] which is too small

B) Now with sending a configure event even if the abs_x/abs_y didn't change:

1. Start in normal state:

  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(26,70) [661x429]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(26,70) [661x429]
  Clutter-Gtk-Message: gtk_clutter_embed_size_allocate() window 0x2a62650 (0,0)
[661x429]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(26,70) [661x429]

2. Switch to maximized state:

  Clutter-Gtk-Message: gtk_clutter_embed_size_allocate() window 0x2a62650 (0,0)
[1972x1205]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(26,70) [1972x1205]
  Clutter-Gtk-Message: gtk_clutter_embed_size_allocate() window 0x2a62650 (0,0)
[1920x1153]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(0,47) [1920x1153]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(0,47) [1972x1205]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(0,47) [1972x1205]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(0,47) [1920x1153]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(0,47) [1920x1153]

3. Back to normal state:

  Clutter-Gtk-Message: gtk_clutter_embed_size_allocate() window 0x2a62650 (0,0)
[609x377]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(0,47) [609x377]
  Clutter-Gtk-Message: gtk_clutter_embed_size_allocate() window 0x2a62650 (0,0)
[661x429]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(26,70) [661x429]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(26,70) [609x377]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(26,70) [609x377]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(26,70) [661x429]
  Clutter-Message: _clutter_stage_gdk_notify_configure() window 0x2a62650
(26,70) [661x429]

=> The final configure event gives (26,70) [661x429] which is the right size
for the clutter stage window</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>