[PATCH 1/2] winex11: Don't set MWM decorations either for fullscreen virtual desktops.

Henri Verbeet hverbeet at codeweavers.com
Mon Aug 13 04:39:41 CDT 2012


I think it would make sense for _NET_WM_STATE_FULLSCREEN to take precedence
over the MWM hints, but apparently at least some versions of Compiz (0.8.8)
don't seem to think so. Setting conflicting hints is probably best avoided
either way though.
---
 dlls/winex11.drv/desktop.c |    5 +++++
 dlls/winex11.drv/window.c  |    5 +++--
 dlls/winex11.drv/x11drv.h  |    1 +
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c
index c75c54c..66b1e11 100644
--- a/dlls/winex11.drv/desktop.c
+++ b/dlls/winex11.drv/desktop.c
@@ -203,6 +203,11 @@ static BOOL CALLBACK update_windows_on_desktop_resize( HWND hwnd, LPARAM lparam
     return TRUE;
 }
 
+BOOL is_desktop_fullscreen(void)
+{
+    return screen_width == max_width && screen_height == max_height;
+}
+
 static void update_desktop_fullscreen( unsigned int width, unsigned int height)
 {
     Display *display = thread_display();
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index b202586..46e2cdb 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -1063,8 +1063,9 @@ static void set_mwm_hints( Display *display, struct x11drv_win_data *data, DWORD
 
     if (data->hwnd == GetDesktopWindow())
     {
-        mwm_hints.decorations = MWM_DECOR_TITLE | MWM_DECOR_BORDER | MWM_DECOR_MENU | MWM_DECOR_MINIMIZE;
-        mwm_hints.functions   = MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE | MWM_FUNC_CLOSE;
+        if (is_desktop_fullscreen()) mwm_hints.decorations = 0;
+        else mwm_hints.decorations = MWM_DECOR_TITLE | MWM_DECOR_BORDER | MWM_DECOR_MENU | MWM_DECOR_MINIMIZE;
+        mwm_hints.functions        = MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE | MWM_FUNC_CLOSE;
     }
     else
     {
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 32d7772..59bc672 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -649,6 +649,7 @@ struct x11drv_mode_info
 
 extern void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height ) DECLSPEC_HIDDEN;
 extern void X11DRV_resize_desktop(unsigned int width, unsigned int height) DECLSPEC_HIDDEN;
+BOOL is_desktop_fullscreen(void) DECLSPEC_HIDDEN;
 extern void X11DRV_Settings_AddDepthModes(void) DECLSPEC_HIDDEN;
 extern void X11DRV_Settings_AddOneMode(unsigned int width, unsigned int height, unsigned int bpp, unsigned int freq) DECLSPEC_HIDDEN;
 unsigned int X11DRV_Settings_GetModeCount(void) DECLSPEC_HIDDEN;
-- 
1.7.8.6




More information about the wine-patches mailing list