<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - wayland: new window momentarily displays on wrong monitor"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=782183#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - wayland: new window momentarily displays on wrong monitor"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=782183">bug 782183</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>What happens (it seems) is that the window is first moved to a "wrong" location
where it shows and when the set_maximized() is received, it gets moved to the
"active" monitor which in Wayland happens to be the onw with the pointer.

What places the window at the wrong position initially is the initial
apply_pending_state() which places the surface at (-26,-23) (the shadows
offset):

</pre>
<p class="trace_link" title="See Full Trace">
  <a class="trace_toggle_box" href="#"
     title="Expand/Collapse Trace"
     onclick="traceparser_toggle_trace(this, 237438); return false;">+</a>
  <a href="page.cgi?id=traceparser/trace.html&trace_id=237438">Trace
    237438</a></p>

<table border="0" cellpadding="0" cellspacing="0"><tr><td>
<div class="trace  bz_default_hidden"
     id="trace_237438">


      <ul class="frames">
          <li class="frame ">
              <span class="frame_number">#0</span>
            <span class="frame_function">meta_window_actor_sync_actor_geometry</span>
              <div class="frame_file_container">
                at <span class="frame_file">mutter/src/compositor/meta-window-actor.c</span>
                  line
                  <span class="frame_line">1270</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#1</span>
            <span class="frame_function">meta_compositor_sync_window_geometry</span>
              <div class="frame_file_container">
                at <span class="frame_file">mutter/src/compositor/compositor.c</span>
                  line
                  <span class="frame_line">1018</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#2</span>
            <span class="frame_function">meta_window_move_resize_internal</span>
              <div class="frame_file_container">
                at <span class="frame_file">mutter/src/core/window.c</span>
                  line
                  <span class="frame_line">3743</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#3</span>
            <span class="frame_function">meta_window_wayland_move_resize</span>
              <div class="frame_file_container">
                at <span class="frame_file">mutter/src/wayland/meta-window-wayland.c</span>
                  line
                  <span class="frame_line">683</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#4</span>
            <span class="frame_function">xdg_toplevel_role_commit</span>
              <div class="frame_file_container">
                at <span class="frame_file">mutter/src/wayland/meta-wayland-xdg-shell.c</span>
                  line
                  <span class="frame_line">637</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#5</span>
            <span class="frame_function">meta_wayland_surface_role_commit</span>
              <div class="frame_file_container">
                at <span class="frame_file">mutter/src/wayland/meta-wayland-surface.c</span>
                  line
                  <span class="frame_line">1928</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#6</span>
            <span class="frame_function">apply_pending_state</span>
              <div class="frame_file_container">
                at <span class="frame_file">mutter/src/wayland/meta-wayland-surface.c</span>
                  line
                  <span class="frame_line">826</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#7</span>
            <span class="frame_function">ffi_call_unix64</span>
              <div class="frame_file_container">
                at <span class="frame_file">../src/x86/unix64.S</span>
                  line
                  <span class="frame_line">76</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#8</span>
            <span class="frame_function">ffi_call</span>
              <div class="frame_file_container">
                at <span class="frame_file">../src/x86/ffi64.c</span>
                  line
                  <span class="frame_line">525</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#9</span>
            <span class="frame_function">wl_closure_invoke</span>
              <div class="frame_file_container">
                at <span class="frame_file">src/connection.c</span>
                  line
                  <span class="frame_line">935</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#10</span>
            <span class="frame_function">wl_client_connection_data</span>
              <div class="frame_file_container">
                at <span class="frame_file">src/wayland-server.c</span>
                  line
                  <span class="frame_line">406</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#11</span>
            <span class="frame_function">wl_event_loop_dispatch</span>
              <div class="frame_file_container">
                at <span class="frame_file">src/event-loop.c</span>
                  line
                  <span class="frame_line">423</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#12</span>
            <span class="frame_function">wayland_event_source_dispatch</span>
              <div class="frame_file_container">
                at <span class="frame_file">mutter/src/wayland/meta-wayland.c</span>
                  line
                  <span class="frame_line">80</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#13</span>
            <span class="frame_function">g_main_dispatch</span>
              <div class="frame_file_container">
                at <span class="frame_file">/glib/glib/gmain.c</span>
                  line
                  <span class="frame_line">3234</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#14</span>
            <span class="frame_function">g_main_context_dispatch</span>
              <div class="frame_file_container">
                at <span class="frame_file">/glib/glib/gmain.c</span>
                  line
                  <span class="frame_line">3899</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#15</span>
            <span class="frame_function">g_main_context_iterate</span>
              <div class="frame_file_container">
                at <span class="frame_file">/glib/glib/gmain.c</span>
                  line
                  <span class="frame_line">3972</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#16</span>
            <span class="frame_function">g_main_loop_run</span>
              <div class="frame_file_container">
                at <span class="frame_file">/glib/glib/gmain.c</span>
                  line
                  <span class="frame_line">4168</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#17</span>
            <span class="frame_function">meta_run</span>
              <div class="frame_file_container">
                at <span class="frame_file">mutter/src/core/main.c</span>
                  line
                  <span class="frame_line">646</span>
              </div>
          </li>
          <li class="frame ">
              <span class="frame_number">#18</span>
            <span class="frame_function">main</span>
              <div class="frame_file_container">
                at <span class="frame_file">mutter/src/core/mutter.c</span>
                  line
                  <span class="frame_line">85</span>
              </div>
          </li>
      </ul>
</div>
</td></tr></table>
<pre class="bz_comment_text" >

Then the animation is played from that "wrong" location and the window is
finally showed at its final location on the "other" monitor.</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>