mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-02 10:52: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/6103>
This commit is contained in:
parent
750de28e7a
commit
a3c474acf4
|
@ -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