Alexandre Julliard : winex11: Sync the window attributes when switching a window to embedded.

Alexandre Julliard julliard at winehq.org
Fri Nov 5 13:47:17 CDT 2010


Module: wine
Branch: master
Commit: 8f24cd05b1fde3fd857ccd6fb8d086a9ef3c859f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8f24cd05b1fde3fd857ccd6fb8d086a9ef3c859f

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Nov  5 13:42:05 2010 +0100

winex11: Sync the window attributes when switching a window to embedded.

---

 dlls/winex11.drv/window.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index acf0b4d..7e96a39 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -1356,6 +1356,8 @@ static void set_xembed_flags( Display *display, struct x11drv_win_data *data, un
 {
     unsigned long info[2];
 
+    if (!data->whole_window) return;
+
     info[0] = 0; /* protocol version */
     info[1] = flags;
     wine_tsx11_lock();
@@ -1418,18 +1420,19 @@ static void unmap_window( Display *display, struct x11drv_win_data *data )
  */
 void make_window_embedded( Display *display, struct x11drv_win_data *data )
 {
-    if (data->mapped)
-    {
-        /* the window cannot be mapped before being embedded */
-        unmap_window( display, data );
-        data->embedded = TRUE;
+    BOOL was_mapped = data->mapped;
+    /* the window cannot be mapped before being embedded */
+    if (data->mapped) unmap_window( display, data );
+
+    data->embedded = TRUE;
+    data->managed = TRUE;
+    SetPropA( data->hwnd, managed_prop, (HANDLE)1 );
+    sync_window_style( display, data );
+
+    if (was_mapped)
         map_window( display, data, 0 );
-    }
     else
-    {
-        data->embedded = TRUE;
         set_xembed_flags( display, data, 0 );
-    }
 }
 
 




More information about the wine-cvs mailing list