From: Rémi Bernon rbernon@codeweavers.com
This breaks the winemac driver registry option under "Mac Driver", as win32u now reads it from the "X11 Driver" key, but winecfg writes it to "X11 Driver" unconditionally. --- dlls/win32u/sysparams.c | 3 +++ dlls/win32u/win32u_private.h | 1 + dlls/win32u/window.c | 2 +- dlls/winemac.drv/macdrv.h | 1 - dlls/winemac.drv/macdrv_main.c | 5 ----- dlls/winemac.drv/window.c | 2 -- dlls/winex11.drv/window.c | 2 -- dlls/winex11.drv/x11drv.h | 1 - dlls/winex11.drv/x11drv_main.c | 4 ---- 9 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index a5e6a244264..5a1b2e12e40 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -147,6 +147,7 @@ static struct list monitors = LIST_INIT(monitors); static INT64 last_query_display_time; static pthread_mutex_t display_lock = PTHREAD_MUTEX_INITIALIZER;
+BOOL decorated_mode = TRUE; BOOL enable_thunk_lock = FALSE;
#define VIRTUAL_HMONITOR ((HMONITOR)(UINT_PTR)(0x10000 + 1)) @@ -4933,6 +4934,8 @@ void sysparams_init(void) grab_pointer = IS_OPTION_TRUE( buffer[0] ); if (!get_config_key( hkey, appkey, "GrabFullscreen", buffer, sizeof(buffer) )) grab_fullscreen = IS_OPTION_TRUE( buffer[0] ); + if (!get_config_key( hkey, appkey, "Decorated", buffer, sizeof(buffer) )) + decorated_mode = IS_OPTION_TRUE( buffer[0] );
#undef IS_OPTION_TRUE } diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 47b50c87f14..28801dfd30f 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -158,6 +158,7 @@ extern void set_standard_scroll_painted( HWND hwnd, int bar, BOOL painted ); extern void track_scroll_bar( HWND hwnd, int scrollbar, POINT pt );
/* sysparams.c */ +extern BOOL decorated_mode; extern BOOL enable_thunk_lock; extern HBRUSH get_55aa_brush(void); extern DWORD get_dialog_base_units(void); diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index d2b33089582..c53e4f8e0e8 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1823,7 +1823,7 @@ static RECT get_visible_rect( HWND hwnd, BOOL shaped, UINT style, UINT ex_style, UINT dpi = get_dpi_for_window( hwnd ), style_mask, ex_style_mask; RECT visible_rect, rect = {0};
- if (IsRectEmpty( &rects->window ) || EqualRect( &rects->window, &rects->client ) || shaped) return rects->window; + if (IsRectEmpty( &rects->window ) || EqualRect( &rects->window, &rects->client ) || shaped || !decorated_mode) return rects->window; if (!user_driver->pGetWindowStyleMasks( hwnd, style, ex_style, &style_mask, &ex_style_mask )) return rects->window; if (!NtUserAdjustWindowRect( &rect, style & style_mask, FALSE, ex_style & ex_style_mask, dpi )) return rects->window;
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 6e506514164..5394a3f89fe 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -43,7 +43,6 @@ extern BOOL allow_vsync; extern BOOL allow_set_gamma; extern BOOL allow_software_rendering; -extern BOOL disable_window_decorations;
extern const char* debugstr_cf(CFTypeRef t);
diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index 84e5818b8ce..009d9e694a5 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -52,7 +52,6 @@ int right_option_is_alt = 0; int left_command_is_ctrl = 0; int right_command_is_ctrl = 0; BOOL allow_software_rendering = FALSE; -BOOL disable_window_decorations = FALSE; int allow_immovable_windows = TRUE; int use_confinement_cursor_clipping = TRUE; int cursor_clipping_locks_windows = TRUE; @@ -347,10 +346,6 @@ 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 (!get_config_key(hkey, appkey, "AllowImmovableWindows", buffer, sizeof(buffer))) allow_immovable_windows = IS_OPTION_TRUE(buffer[0]);
diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 48b4fa64dee..deb2a39072f 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1798,8 +1798,6 @@ BOOL macdrv_GetWindowStyleMasks(HWND hwnd, UINT style, UINT ex_style, UINT *styl { struct macdrv_window_features wf = get_window_features_for_style(style, ex_style, FALSE);
- if (disable_window_decorations) return FALSE; - *style_mask = ex_style = 0; if (wf.title_bar) { diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 6f183d1e853..0e06939f67d 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2557,8 +2557,6 @@ BOOL X11DRV_GetWindowStyleMasks( HWND hwnd, UINT style, UINT ex_style, UINT *sty unsigned long decor = get_mwm_decorations_for_style( style, ex_style ); struct x11drv_win_data *data;
- if (!decorated_mode) return FALSE; - if ((data = get_win_data( hwnd ))) { if (!data->managed) decor = 0; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index b87d6a87932..9c47a7462ba 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -431,7 +431,6 @@ extern BOOL use_system_cursors; extern BOOL grab_fullscreen; extern BOOL usexcomposite; extern BOOL managed_mode; -extern BOOL decorated_mode; extern BOOL private_color_map; extern int primary_monitor; extern int copy_default_colors; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 9c00b16386e..c7056400e2f 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -76,7 +76,6 @@ BOOL use_primary_selection = FALSE; BOOL use_system_cursors = TRUE; BOOL grab_fullscreen = FALSE; BOOL managed_mode = TRUE; -BOOL decorated_mode = TRUE; BOOL private_color_map = FALSE; int primary_monitor = 0; BOOL client_side_graphics = TRUE; @@ -454,9 +453,6 @@ static void setup_options(void) if (!get_config_key( hkey, appkey, "Managed", buffer, sizeof(buffer) )) managed_mode = IS_OPTION_TRUE( buffer[0] );
- if (!get_config_key( hkey, appkey, "Decorated", buffer, sizeof(buffer) )) - decorated_mode = IS_OPTION_TRUE( buffer[0] ); - if (!get_config_key( hkey, appkey, "UseXVidMode", buffer, sizeof(buffer) )) usexvidmode = IS_OPTION_TRUE( buffer[0] );