mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
macos: Set activation policy in gst_macos_main
Setting the policy to NSApplicationActivationPolicyAccessory by default makes sure that we can activate windows programmatically or by clicking on them. Without that, windows would disappear if you clicked outside them and there would be no way to bring them to front again. This change also allows osxvideosink to receive navigation events correctly. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4573>
This commit is contained in:
parent
f60c87769f
commit
1815061e26
1 changed files with 3 additions and 0 deletions
|
@ -31,6 +31,9 @@ run_main_with_nsapp (ThreadArgs args)
|
|||
GThread *gst_thread;
|
||||
|
||||
[NSApplication sharedApplication];
|
||||
if ([NSApp activationPolicy] == NSApplicationActivationPolicyProhibited) {
|
||||
[NSApp setActivationPolicy:NSApplicationActivationPolicyAccessory];
|
||||
}
|
||||
gst_thread = g_thread_new ("macos-gst-thread", (GThreadFunc) gst_thread_func, &args);
|
||||
[NSApp run];
|
||||
|
||||
|
|
Loading…
Reference in a new issue