Module: wine Branch: master Commit: 788e2034f6de55383d641cbb8ff08f70c2f6f600 URL: http://source.winehq.org/git/wine.git/?a=commit;h=788e2034f6de55383d641cbb8f...
Author: Ken Thomases ken@codeweavers.com Date: Thu Nov 21 14:47:57 2013 -0600
winemac: Add support for a "Decorated" registry setting to control whether windows get Mac-style decorations.
---
dlls/winemac.drv/macdrv.h | 1 + dlls/winemac.drv/macdrv_main.c | 5 +++++ dlls/winemac.drv/window.c | 1 + 3 files changed, 7 insertions(+), 0 deletions(-)
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 skip_single_buffer_flushes DECLSPEC_HIDDEN; 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 1ad8ac2..f8e30ca 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))