<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - XWayland: XWM can't handle transient windows without parent"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=59983">59983</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>wayland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>XWayland: XWM can't handle transient windows without parent
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>minor
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tiago.vignatti@linux.intel.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>weston
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Wayland
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Weston crashes because shell is trying to set a transient surface without
having a parent. The real problem though is in XWM which always assign
transient shell type for X override-redirected windows, in particular the ones
that don't have a parent. To fix for this behaviour, we have to introduce a
special shell type for X windows, where X windows are positioned globally and
not depending on their parents for anything.

To reproduce: start Weston with Xwayland support, start gedit then "File" ->
"Open" and press ESC. Weston segfaults with the following backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffefae22d8 in set_surface_type (shsurf=0x9f1a80) at shell.c:1496
1496                    pes->geometry.y + shsurf->transient.y);
(gdb) bt
#0  0x00007fffefae22d8 in set_surface_type (shsurf=0x9f1a80) at shell.c:1496
#1  0x00007fffefae5aee in shell_surface_configure (es=0x9f0490, sx=0, sy=0)
    at shell.c:3039
#2  0x000000000040a757 in surface_commit (client=0x9a9d10, resource=0x9f0490)
    at compositor.c:1401
#3  0x00007ffff635ea14 in ffi_call_unix64 ()
   from /usr/lib/x86_64-linux-gnu/libffi.so.6
#4  0x00007ffff635e435 in ffi_call ()
   from /usr/lib/x86_64-linux-gnu/libffi.so.6
#5  0x00007ffff7bd3404 in wl_closure_invoke (closure=0x9efc70, 
    target=0x9f0490, func=0x40a65a <surface_commit>, data=0x9a9d10)
    at connection.c:908
#6  0x00007ffff7bcc63b in wl_client_connection_data (fd=32, mask=1, 
    data=0x9a9d10) at wayland-server.c:297
#7  0x00007ffff7bd06a8 in wl_event_source_fd_dispatch (source=0x962590, 
    ep=0x7fffffffd7a0) at event-loop.c:84
#8  0x00007ffff7bd1076 in wl_event_loop_dispatch (loop=0x6279b0, timeout=-1)
    at event-loop.c:415
#9  0x00007ffff7bce4a3 in wl_display_run (display=0x627950)
    at wayland-server.c:1207
#10 0x000000000040f12d in main (argc=1, argv=0x7fffffffdc88)
    at compositor.c:3356
(gdb)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>