From: Ken Thomases Subject: winemac: Add support for a "Decorated" registry setting to control whether windows get Mac-style decorations. (try 2) Message-Id: <7DB27530-B832-4BF6-9077-29D3EA1A5328@codeweavers.com> Date: Thu, 21 Nov 2013 14:47:57 -0600 try 2: changed registry value name to "Decorated" with reversed logical sense to match the X11 driver For . --- dlls/winemac.drv/macdrv.h | 1 + dlls/winemac.drv/macdrv_main.c | 5 +++++ dlls/winemac.drv/window.c | 1 + 3 files changed, 7 insertions(+) diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 120fa51..32a342b 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -39,6 +39,7 @@ extern BOOL allow_vsync DECLSPEC_HIDDEN; extern BOOL allow_set_gamma DECLSPEC_HIDDEN; extern BOOL allow_software_rendering DECLSPEC_HIDDEN; +extern BOOL disable_window_decorations DECLSPEC_HIDDEN; extern HMODULE macdrv_module DECLSPEC_HIDDEN; diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index ba15706..2c3ec23 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -53,6 +53,7 @@ BOOL allow_set_gamma = TRUE; int left_option_is_alt = 0; int right_option_is_alt = 0; BOOL allow_software_rendering = FALSE; +BOOL disable_window_decorations = FALSE; HMODULE macdrv_module = 0; @@ -166,6 +167,10 @@ static void setup_options(void) if (!get_config_key(hkey, appkey, "AllowSoftwareRendering", buffer, sizeof(buffer))) allow_software_rendering = IS_OPTION_TRUE(buffer[0]); + /* Value name chosen to match what's used in the X11 driver. */ + if (!get_config_key(hkey, appkey, "Decorated", buffer, sizeof(buffer))) + disable_window_decorations = !IS_OPTION_TRUE(buffer[0]); + if (appkey) RegCloseKey(appkey); if (hkey) RegCloseKey(hkey); } diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index dfff277..3699091 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -57,6 +57,7 @@ static void get_cocoa_window_features(struct macdrv_win_data *data, { memset(wf, 0, sizeof(*wf)); + if (disable_window_decorations) return; if (IsRectEmpty(&data->window_rect)) return; if ((style & WS_CAPTION) == WS_CAPTION && !(ex_style & WS_EX_LAYERED))