winemac: Add support for a "Decorated" registry setting to control whether windows get Mac-style decorations.

This commit is contained in:
Ken Thomases 2013-11-21 14:47:57 -06:00 committed by Alexandre Julliard
parent 1e78c99388
commit 788e2034f6
3 changed files with 7 additions and 0 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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))