Commit Graph

15 Commits (master)

Author SHA1 Message Date
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
gxalpha 6d86b58ed7 UI: Simplify multi-instance check 2022-03-05 15:21:11 -08:00
jpark37 f186b8c304 UI: Remove conflicting setlocale call
Qt already sets LC_ALL to "" for non-Windows. We set LC_NUMERIC to "C"
afterward for sanity, and we don't want that setting to get smashed.
2022-03-01 12:53:51 -08:00
obiwac 93c2e681ca linux-v4l2: scandir with alphasort on non-Linux
Sort video device entries with `alphasort` on non-Linux platforms,
as opposed to `versionsort` on Linux.
(`versionsort` is a GNU extension, unavailable on e.g. FreeBSD.)

UI: Fix call to `to_string` on FreeBSD
2022-02-26 15:36:08 -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
James Beddek 5fccf86b07 UI: Fix build with Clang and libc++
std::bind conflicts with extern int bind defined in socket.h

Signed-off-by: James Beddek <telans@posteo.de>
2021-10-16 16:14:32 -07:00
jpark37 48ba511bda UI: Avoid asprintf warning 2021-01-30 00:25:25 -08:00
Ed Maste a0f64a6017 UI: fix build on older FreeBSD versions
Include pthread_np.h header and use pthread_set_name_np to fix build
on FreeBSD 12.1.  The Linux-compatible pthread_setname_np alias was
added later.
2020-11-16 19:01:56 -08:00
Ka Ho Ng f8aa02897f UI: Detect other instances of obs on FreeBSD
Detect other instances of the obs by creating an extra dummy thread,
named "OBS runonce". The process of threads enumeration of current user
is guarded by an O_EXLOCK file advisory lock when opening the lock file.
Such file lock would be dropped once the thread name is changed.

This should be usable on FreeBSD and possibly compile on DragonFly BSD.

fixes: #3053
2020-11-14 12:04:31 -08:00
Christian Lockley ad528bef17 UI: Detect other instances of obs on Linux
fixes: obsproject#3053
2020-10-30 11:50:47 -07:00
Ka Ho Ng 33dd7eebd2 UI: Fix GetPreferredLocales locale detection
When scanning the preferred locales, always pick the one
with exact match before falling back to other matches.
2020-06-06 09:00:52 +08:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -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