From: Sebastian Lackner Subject: winex11: Catch invalid values from broken QX11EmbedContainer implementations Message-Id: <52E2CFEC.7040900@fds-team.de> Date: Fri, 24 Jan 2014 21:41:16 +0100 This patch "fixes" 35347. The QT implementation of XEmbed is pretty much broken, and one of the errors is located here: https://qt.gitorious.org/qt/qt/source/f7b3072924fb57b3979ff4d536eb213270be1047:src/gui/kernel/qx11embed_x11.cpp#L1708 Please note that they pass the X11 window as the WRONG argument! It should be passed in data1, but instead they pass it in detail (which should be zero). This has the effect that wine interprets "minversion" (= 0) as X11 window ID, and crashes with a BadWindow exception. To "workaround" this problem this patch ignores the XEMBED_EMBEDDED_NOTIFY events with 0 as window ID. --- dlls/winex11.drv/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) From dc1b13161c6ffdc1138ff687aa74601e074e6a9e Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 23 Jan 2014 20:19:41 +0100 Subject: winex11: Catch invalid values from broken QX11EmbedContainer implementations --- dlls/winex11.drv/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index d75c167..8b860cc 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -1679,7 +1679,7 @@ static void handle_xembed_protocol( HWND hwnd, XClientMessageEvent *event ) data->embedder = event->data.l[3]; /* window has been marked as embedded before (e.g. systray) */ - if (data->embedded) + if (data->embedded || !data->embedder /* broken QX11EmbedContainer implementation */) { release_win_data( data ); break; -- 1.7.9.5