Bug 59983 - XWayland: XWM can't handle transient windows without parent
Summary: XWayland: XWM can't handle transient windows without parent
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: All All
: medium minor
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
: 54691 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-28 19:17 UTC by Tiago Vignatti
Modified: 2013-06-14 22:44 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago Vignatti 2013-01-28 19:17:40 UTC
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)
Comment 1 Darxus 2013-01-28 19:19:14 UTC
*** Bug 54691 has been marked as a duplicate of this bug. ***
Comment 2 Darxus 2013-06-12 19:44:27 UTC
"I just sent the fix to the mailing list. I don't consider that patch enough though cause it exposes now another bug in XWayland infrastructure." - Tiago

http://lists.freedesktop.org/archives/wayland-devel/2013-June/009850.html
Comment 3 Kristian Høgsberg 2013-06-14 22:44:08 UTC
Patch applied, can no longer reproduce crash.

commit fb2adba3da09e9a613b1702bf3c49885ad7ca225
Author: Tiago Vignatti <tiago.vignatti@intel.com>
Date:   Wed Jun 12 15:43:21 2013 -0300

    xwayland: Forward global position to X
    
    xeyes works as expected now. subwindows are popped also as expected. This
    patch should fix the following:
    
    https://bugs.freedesktop.org/show_bug.cgi?id=59983
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.