Commit 8876751e authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Prevent disabled windows from being moved.

This won't be enforced if AllowImmovableWindows=n is set in the registry.
parent 5f7b30ae
......@@ -642,6 +642,9 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
[self setContentMaxSize:savedContentMaxSize];
[self setContentMinSize:savedContentMinSize];
}
if (allow_immovable_windows)
[self setMovable:!disabled];
}
- (void) adjustFullScreenBehavior:(NSWindowCollectionBehavior)behavior
......
......@@ -146,6 +146,7 @@ extern int topmost_float_inactive DECLSPEC_HIDDEN;
extern int capture_displays_for_fullscreen DECLSPEC_HIDDEN;
extern int left_option_is_alt DECLSPEC_HIDDEN;
extern int right_option_is_alt DECLSPEC_HIDDEN;
extern int allow_immovable_windows DECLSPEC_HIDDEN;
extern int macdrv_start_cocoa_app(unsigned long long tickcount) DECLSPEC_HIDDEN;
extern void macdrv_window_rejected_focus(const struct macdrv_event *event) DECLSPEC_HIDDEN;
......
......@@ -54,6 +54,7 @@ int left_option_is_alt = 0;
int right_option_is_alt = 0;
BOOL allow_software_rendering = FALSE;
BOOL disable_window_decorations = FALSE;
int allow_immovable_windows = TRUE;
HMODULE macdrv_module = 0;
......@@ -171,6 +172,9 @@ static void setup_options(void)
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]);
if (appkey) RegCloseKey(appkey);
if (hkey) RegCloseKey(hkey);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment