winemac: Prevent disabled windows from being moved.
This won't be enforced if AllowImmovableWindows=n is set in the registry.
This commit is contained in:
parent
5f7b30aee2
commit
8876751e93
|
@ -642,6 +642,9 @@ - (void) adjustFeaturesForState
|
|||
[self setContentMaxSize:savedContentMaxSize];
|
||||
[self setContentMinSize:savedContentMinSize];
|
||||
}
|
||||
|
||||
if (allow_immovable_windows)
|
||||
[self setMovable:!disabled];
|
||||
}
|
||||
|
||||
- (void) adjustFullScreenBehavior:(NSWindowCollectionBehavior)behavior
|
||||
|
|
|
@ -146,6 +146,7 @@
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue