update 7-Zip to 4.62
[sugaredwine.git] / patches / 0020-winex11.drv-hack-to-allow-changing-the-parent-of-vi.patch
blobd234d969dfc3eda8956a6b2f88de4efce8c09d6d
1 From 3f715ad92b792184ff62b227059a82f0a3732185 Mon Sep 17 00:00:00 2001
2 From: Vincent Povirk <vincent@codeweavers.com>
3 Date: Thu, 2 Oct 2008 13:55:41 -0500
4 Subject: [PATCH] winex11.drv: hack to allow changing the parent of virtual desktops
6 ---
7 dlls/winex11.drv/desktop.c | 11 +++++++++--
8 1 files changed, 9 insertions(+), 2 deletions(-)
10 diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c
11 index 9a39d40..b3f0ced 100644
12 --- a/dlls/winex11.drv/desktop.c
13 +++ b/dlls/winex11.drv/desktop.c
14 @@ -21,6 +21,7 @@
15 #include "config.h"
16 #include <X11/cursorfont.h>
17 #include <X11/Xlib.h>
18 +#include <stdlib.h>
20 #include "x11drv.h"
22 @@ -131,8 +132,9 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height )
23 Window X11DRV_create_desktop( UINT width, UINT height )
25 XSetWindowAttributes win_attr;
26 - Window win;
27 + Window win, parent;
28 Display *display = thread_init_display();
29 + char* parent_str;
31 wine_tsx11_lock();
33 @@ -147,7 +149,12 @@ Window X11DRV_create_desktop( UINT width, UINT height )
34 else
35 win_attr.colormap = None;
37 - win = XCreateWindow( display, DefaultRootWindow(display),
38 + if ((parent_str = getenv("WINE_DESKTOP_PARENT")))
39 + parent = (Window)atol(parent_str);
40 + else
41 + parent = DefaultRootWindow(display);
43 + win = XCreateWindow( display, parent,
44 0, 0, width, height, 0, screen_depth, InputOutput, visual,
45 CWEventMask | CWCursor | CWColormap, &win_attr );
46 XFlush( display );
47 --
48 1.5.6.5