0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00
Commit Graph

37 Commits

Author SHA1 Message Date
gxalpha
ec5f499cb3 UI: Inline macOS 13 check 2024-08-23 22:09:48 -04:00
jcm
1b25acd184 UI: Don't create default desktop audio source on macOS 13+ 2024-08-12 22:45:16 +02:00
derrod
0a9f1e7391 UI: Add HighContrastEnabled() to platform utilities 2024-04-21 00:01:16 -04:00
PatTheMav
7628265099 Update .clang-format rules for ObjC files for version 16 2023-08-10 17:12:30 -04:00
PatTheMav
f8e00d6071 clang-format: Update formatting of all ObjC and ObjC++ files 2023-06-11 14:56:45 +02:00
Lain
106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
PatTheMav
d2ea998f49 UI: Use native ObjectiveC methods to generate data file paths 2023-05-13 16:57:30 -07:00
PatTheMav
ee3c2d0e8a CI: Fix build errors with Xcode 14.3 and platform SDK 13.3
Xcode 14.3 and the macOS 13.3 platform SDK introduced a few breaking
changes:

* Updated AppleClang emits warnings about unqualified std cast calls
  when using C++ - as `move` is too broad a word, developers are to use
  `std::move` to make this explicit. Alas this is exactly what `json11`
  uses and because that library is archived, there is no possibility
  of an upstream update.

* Apple guarded calls to old screen capture APIs as "available but
  deprecated", but seems to have chosen the wrong lower version
  boundary: The calls are flagged as being available for macOS 13 and
  macOS 14 only.

  To fix this, the existing macOS platform SDK header is replaced by a
  local copy that uses macOS 11 as the lower boundary (the oldest macOS
  version supported by obs-studio anyway)
2023-04-04 17:27:59 +00:00
Norihiro Kamae
3d5c4ff56e UI: Remove empty clause 2023-03-18 15:16:44 -07:00
gxalpha
11e9291800 UI: Set macOS appearance on theme change
Makes macOS aware that we're using either light or dark theme to adjust
native dialog colors accordingly.

Co-Authored-By: Patrick Heyer <PatTheMav@users.noreply.github.com>
2023-01-31 18:50:56 +01:00
tytan652
90c49c7af1 UI: Fix shadow-ivar warning on macOS 2023-01-19 13:08:46 -05:00
gxalpha
b7a20cd5e4 UI: Add function to open privacy preferences on macOS 2022-07-31 18:14:41 +02:00
PatTheMav
11325e6a35 UI: Remove permission code paths for Mac OS X before 10.15 2022-07-31 12:21:35 +02:00
Tommy Vercetti
fb30837a7c UI: Remove unused header for macOS 2022-07-28 14:04:01 -04:00
gxalpha
f8b31f6f90 UI: Fix macOS permissions availability check
Documentation appears to wrongly claim that this is available in 10.15,
while in reality it's only 11+. This would lead to a crash on 10.15
since the symbol doesn't exist there.
2022-07-27 19:55:09 +02:00
PatTheMav
e15fdf69c0 UI: Add functions to check for and request macOS permissions
Adds functions to check and/or request specific macOS permissions
(audio device access, video device access, accessibility access, and
screen capture access).

By default only audio capture, video capture, and accessibility are
requested on launch - the first two have straight-forward "Yes/No"
prompts, the latter requires people to enable OBS in the settings
application (but is required for hotkey functionality, independent
of scene setups).
2022-07-26 14:20:34 +02:00
PatTheMav
c1740e3636 UI: Add initialization to ensure compat between pthread and NSThread
Ensures that Cocoa knows that we intend to use multiple threads, per
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html#//apple_ref/doc/uid/10000057i-CH15-SW21
2022-07-25 17:27:07 +02:00
gxalpha
eea2fd2f3f UI: Add status overlay for macOS dock icon
Adds an implementation for the dock icon status overlay on macOS (which
doesn't rely on QtMacExtras, which means it also works on Qt6).
2022-07-25 16:34:31 +02:00
gxalpha
0fa7834bfc UI: Use libobs rosetta detection 2022-06-19 01:37:15 +02:00
gxalpha
41521b2816 UI: Move taskbar overlay functions into platform.hpp
Refactors the existing implementation for Windows into
platform-windows.cpp, allowing for other OS implementations in the
future.
2022-05-20 20:16:56 +10:00
gxalpha
dde2fe209a UI: Remove InitApplicationBundle() function 2022-03-19 15:13:00 -07:00
PatTheMav
1f0f2be15e
UI: Update CMakeLists.txt for main OBS app 2022-03-16 23:11:58 +01:00
gxalpha
6d86b58ed7 UI: Simplify multi-instance check 2022-03-05 15:21:11 -08:00
Richard Stanway
076cd5d5d4 UI: Add option to hide OBS windows on Windows
This uses the SetWindowDisplayAffinity API to hide windows from capture
applications (including OBS). This is not perfect - internal windows
such as context menus, combo box dropdowns, etc will still be displayed.
Even with these limitations, it should help people with single monitors
capture content with less interference from the OBS window.

This implementation is for Windows only but the code is generic enough
that adding other platforms should be straightforward.
2022-01-22 15:14:16 -08:00
gxalpha
8298f040fe UI: Add Rosetta Detection
Adds a check that detects if OBS is running on Rosetta on macOS and logs
the result.
2022-01-04 01:57:02 -08:00
jp9000
7fffca945e Revert "UI: Remove macOS-Default Full Screen Menu Item"
This reverts commit cf445be44c.

Did not mean to merge this. #4768
2021-08-17 06:00:53 -07:00
gxalpha
cf445be44c UI: Remove macOS-Default Full Screen Menu Item
macOS looks if the NSUserDefault NSFullScreenMenuItemEverywhere is set
to true, and if it is, it adds its own full screen menu item.
Sets this NSUserDefault to false since it defaults to true.
2021-08-17 05:58:29 -07:00
Mikhail Kochegarov
117d35433f UI: Detect other instances of obs on macOS
Detect other instances of the obs by inspecting running applications
with same bundle ID.

fixes: #3053
2020-10-16 05:48:37 -07:00
PatTheMav
cab32e7e67 UI: Disable QT's implicit colourspace conversion on macOS
Fixes issues as described in https://bugreports.qt.io/browse/QTBUG-47660
and halves CPU usage of OBS' UI by about 40-50%.
2020-10-01 23:54:58 -07:00
Jon Topper
87e90ee8a4 UI: Make macOS 'always on top' more aggressive
Applications like Keynote, in full screen mode, cover up OBS.

This change forces windows that have been set as 'always on top' (eg.
projector windows) to sit above Keynote's full screen view by
manipulating the NSWindow's level attribute.
2020-07-27 16:37:36 -07:00
Theodore Dubois
bd3cbf23ad UI: Add Chromium-compatible NSApplication subclass
This fixes some crashes in browser panels on Mac, but it's also harmless
if browser panels aren't enabled.
2020-02-09 00:02:09 -08:00
Colin Edwards
32690926b9 CI: Use custom macdylibbundler for OSX deps 2019-11-03 00:00:38 -05:00
Colin Edwards
747ce9b77c libobs: Use proper resource paths when running from an OSX bundle 2019-10-13 21:53:43 -05:00
Colin Edwards
ad85a9fa25 Apply clang-format to objective c code 2019-07-09 13:39:13 -05:00
DungFu
5cbc78b0a9 UI: Hide Dock Icon on Mac OSX when minimizing to tray
This hides the dock icon when minimizing OBS to the tray on OSX. This
also fixes the bugs with minimizing on startup (and hides the dock icon
correctly in that case as well).

Closes obsproject/obs-studio#1430
2018-08-17 10:34:11 -07:00
Warren Turkal
f3eb8aacfe UI: Use Qt lib for screen info instead of x11 libs
All of the monitor discovery logic can be implemented with Qt. This
change removes all the x11 implementations in favor of Qt and removes a
fair amount of platform specific code.
2016-10-03 23:50:13 -07:00
jp9000
01b274f1da UI: Rename 'obs' dir to 'UI'
This is to prevent confusion both when prefixing commits and when
reading the directory structure for the first time.
2016-08-27 20:19:45 -07:00