Alexandre Julliard : winex11: Don' t put window manager decorations on shaped windows.

Alexandre Julliard julliard at winehq.org
Tue Apr 29 08:54:36 CDT 2008


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Apr 29 12:46:16 2008 +0200

winex11: Don't put window manager decorations on shaped windows.

---

 dlls/winex11.drv/window.c |    3 +++
 dlls/winex11.drv/x11drv.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 0f84ae2..ad56a70 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -163,6 +163,7 @@ static unsigned long get_mwm_decorations( struct x11drv_win_data *data,
     if (!decorated_mode) return 0;
 
     if (IsRectEmpty( &data->window_rect )) return 0;
+    if (data->shaped) return 0;
 
     if (ex_style & WS_EX_TOOLWINDOW) return 0;
 
@@ -321,6 +322,7 @@ static void sync_window_region( Display *display, struct x11drv_win_data *data,
 {
 #ifdef HAVE_LIBXSHAPE
     if (!data->whole_window) return;
+    data->shaped = FALSE;
 
     if (!hrgn)
     {
@@ -341,6 +343,7 @@ static void sync_window_region( Display *display, struct x11drv_win_data *data,
                                      pRegionData->rdh.nCount, ShapeSet, YXBanded );
             wine_tsx11_unlock();
             HeapFree(GetProcessHeap(), 0, pRegionData);
+            data->shaped = TRUE;
         }
     }
 #endif  /* HAVE_LIBXSHAPE */
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index f46eaaa..2f2e583 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -690,6 +690,7 @@ struct x11drv_win_data
     BOOL        mapped : 1;     /* is window mapped? (in either normal or iconic state) */
     BOOL        iconic : 1;     /* is window in iconic state? */
     BOOL        embedded : 1;   /* is window an XEMBED client? */
+    BOOL        shaped : 1;     /* is window using a custom region shape? */
     int         wm_state;       /* current value of the WM_STATE property */
     DWORD       net_wm_state;   /* bit mask of active x11drv_net_wm_state values */
     HBITMAP     hWMIconBitmap;




More information about the wine-cvs mailing list