96 Commits
Author SHA1 Message Date
Warchamp7 fb5140d0a3 frontend: Only send event when scene list changed 2026-03-04 15:48:03 -05:00
Ryan Foster 423d3dfc9c frontend: Update parent logic for systray menu projector items
Adding some more cleanup with Qt Widget/Object parenting and manual
deletes.
2026-02-24 18:55:26 -05:00
Lordmau5 336261c868 frontend: Update parent logic, remove explicit delete calls
Not necessary anymore in Windows tests at least since the parent widget
(in this case OBSBasic) is taking care of cleaning up its children.
2026-02-24 18:55:26 -05:00
Lordmau5 c1f8cbb9d5 frontend: Fix unclean shutdown on Windows
This issue was brought back by a somewhat recent change to fix slow
shutdown times in Linux.

To paraphrase tfo from the OBS Discord:
"I think the issue is that all the tray actions are parented to
trayIcon, so when it's deleted, Qt auto deletes them as children, then
delete trayMenu on the next line accesses those dead actions."

We now create the tray menu first, then setting the parent of the
actions (show / hide, stop / start streaming, etc.) to the tray menu.
2026-02-24 18:55:26 -05:00
Warchamp7 decee5780d frontend: Set mixer toolbar size policy 2026-02-20 16:13:06 -05:00
Warchamp7 8bd4511843 frontend: Ignore sources with disabled audio in mixer 2026-02-13 14:26:50 -05:00
Warchamp7 c1a134ea15 frontend: Adjust log upload text for current logs 2026-02-05 17:30:31 -05:00
Warchamp7 923118befc frontend: Clean up mixer hidden state 2026-02-04 18:29:20 -05:00
PatTheMav 921dc93927 frontend: Fix macOS crash in application shutdown
With recent changes to the application shutdown logic, events had to
follow a very strict order as certain elements of shutdown code
depend on other elements not being deallocated prematurely.

This turned the (correct) order of events on macOS upside down and
lead to crashes either when the app was quit from within or when
terminated by the OS.

The fix incorporates multiple elements:

* Removal of the custom "Quit" menu item on macOS to use the default
  implementation of Qt's platform plugin.
* Soft-revert (via preprocessor conditionals) parts of the updated
  shutdown logic to prevent emitting recursive shutdown events.
* Handle main window close event by simply emitting a "quit" event
  on the application instance.
* Update POSIX signal handlers to also simply emit a "quit" event.

In combination these changes reduce the number of different code paths
taken during shutdown:

* Closing the app via the menu item, menu item shortcut, or initiated
  by AppKit (OS shutdown/reboot, or quit via Dock/Finder) will emit an
  AppKit "terminate" event for orderly shutdown.
* Closing the main window or sending an appropriate POSIX signal
  triggers the "terminate" event indirectly by emitting the "quit"
  event on the application instance.

Either way a "close" event to the main window happens before the
event loop is terminated and the application instance is torn down
(either directly, or indirectly via Qt's "closeAllWindows" function in
response to "terminate"). The order of events thus is always:

0. Terminate event by AppKit (except when closing the main window)
1. Closing of main window
2. Termination of browser docks
3. Deallocation of main window
4. Termination of application
5. Deallocation of application

NOTE: All this only applies to macOS. The shutdown order and procedures
on Windows and Linux are unchanged.
2026-02-04 17:04:31 -05:00
PatTheMav 21f6f08679 frontend: Fix Youtube app dock destruction
When the main window is closed and with it the application state is torn
down, browser panels need to be explicitly removed before the the CEF
instance used by the application is shut down itself.

For service-based docks this happens as part of the "reset" of the
"auth" pointer (and thus its destructor), for user-created browser
panels this is achieved by the call to "ClearExtraBrowserDocks".

Because the Youtube app dock is a special browser panel that is created
conditionally, but potentially exists globally, it also has to be
closed this way (if it was created).

Otherwise CEF will force-close the underlying browser host instance as
part of its own shutdown and also deallocate the native window used
by the browser. When the QCefWidget then attempts to detach the
native window from the view hierarchy (to avoid this operation from
potentially closing the root window it is anchored to), it will either
attempt to access a CrFatZombie object (and crash) or access deallocated
memory (and also crash).
2026-02-04 17:04:31 -05:00
Warchamp7 f53c843ac0 frontend: Update previewed sources in mixer by visibility 2026-01-28 13:58:01 -05:00
Warchamp7 84361415ff frontend: Close rename dialog if name unchanged 2026-01-28 13:18:47 -05:00
Warchamp7 694680e8c0 frontend: Revert Add Source dialog update
This reverts commit 5fc2476913.
2026-01-28 12:13:20 -05:00
Warchamp7 e73662f6c1 frontend: Implement sizeHint for VolumeMeter 2026-01-22 12:32:12 -05:00
Penwywern 71de30f2a9 frontend: Properly update studio mode mixer 2026-01-20 12:34:54 -05:00
Warchamp7 f9c084d88c frontend: Update menu text when switching layouts 2026-01-20 11:47:51 -05:00
shiina424 058f9a8377 frontend: Make Audio Mixer Hidden Button translatable 2026-01-17 14:28:20 -05:00
Warchamp7 e6b52f2e9b libobs, frontend: Signal transition_stop for cancelled transitions 2026-01-16 15:57:36 -05:00
Warchamp7 2faf51a7ed frontend: Prevent setting transition during transitions 2026-01-16 15:57:36 -05:00
Warchamp7 26f6091b66 frontend: Fix Audio Mixer toolbar tooltips 2026-01-15 11:43:03 -05:00
Dennis Sädtler 68b19f6b88 frontend: Fix groups not being saved to collection 2026-01-14 16:16:23 -05:00
Warchamp7andLain 5fc2476913 frontend: Replace add source dropdown with dialog
Co-Authored-By: Lain <134130700+Lain-B@users.noreply.github.com>
2026-01-14 14:49:38 -05:00
Anton Kesy 22016f309c frontend: Fix typos 2026-01-14 13:47:30 -05:00
Warchamp7 a42a6c4c5f frontend: Refactor and update Audio Mixer 2026-01-13 16:34:33 -05:00
Hoshino Lina 2b53fe0e65 frontend: Fix QSystemTrayIcon and QMenu delete order
QSystemTrayIcon holds a non-owning pointer to the QMenu, so it needs to
be deleted first.

Fixes: #12948
2026-01-12 17:48:14 -05:00
cg2121 ee1539614a frontend: Add more source undo/redo actions
This adds undo/redo actions for scale filtering, blending mode,
blending method, deinterlacing mode and deinterlacing field order.
2026-01-08 21:37:02 -05:00
Warchamp7 6fa1a35ad4 frontend: Update transform dialog 2026-01-08 21:12:30 -05:00
Warchamp7 c01a9bea49 frontend: Create AlignmentSelector widget 2026-01-08 21:12:30 -05:00
cg2121 8c946e792a frontend: Make sure all scene item properties are copied
Scale filtering, show/hide transitions and private settings were
not copied when copying scene items.
2026-01-08 20:18:13 -05:00
Warchamp7 92a83e4c4c frontend: Sync Preview/Program size and positioning 2026-01-08 19:58:07 -05:00
Dennis Sädtler de82ca9293 frontend: Refactor OBSBasic::Save to only save frontend canvas scenes/groups 2026-01-08 15:03:19 -05:00
Warchamp7 407944a27c frontend: Rearrange default dock positions 2025-12-19 14:43:44 -05:00
Sebastian Beckmann f6a56227eb frontend: Remove implicit capture of "this" using "="
Implicitly capturing "this" with the capture default "=" is deprecated
with C++20. We fix this by either explicitly passing this, or by copying
the required members manually.
While this exposes some rather expensive copies like the QList
selectedItems in OBSBasic_Preview, it doesn't introduce them ("=" copies
implicitly).
2025-12-18 17:30:42 -05:00
Warchamp7 c8e74c9dec frontend: Round display size for projectors 2025-12-17 21:43:44 -05:00
Sebastian Beckmann f80d35fa4a frontend: Remove "using namespace std" from headers
This is very dangerous as it propagates down everywhere the headers are
included in.
2025-12-17 18:51:35 -05:00
gxalpha 5129612b6c frontend,shared: Replace and disable contextless connect calls
# Conflicts:
#	frontend/OBSApp.cpp
2025-12-17 16:35:45 -05:00
gxalpha 876806bbf5 frontend: Replace and disable QString to QUrl casts 2025-12-17 16:35:45 -05:00
gxalpha 9b1d1493ab frontend,shared: Replace and disable QByteArray to char * casts 2025-12-17 16:35:45 -05:00
Warchamp7 ff9b4eb099 frontend: Fix transition duration not loading correctly 2025-12-12 13:44:47 -05:00
Warchamp7 e3df8722bd frontend: Switch off deleted scenes immediately 2025-12-12 13:08:40 -05:00
Warchamp7 34a0a6a530 frontend: Remove crash handler earlier in shutdown 2025-12-04 15:05:23 -05:00
Dennis Sädtler 606e1932b8 frontend: Fix recursion during canvas removal causing crashes 2025-12-03 15:10:44 -05:00
Warchamp7 14572498dc frontend: Adjust application shutdown logic
Improves app shutdown in a few ways, including separating out different
pieces of the OBSBasic close handler into their own functions.

Removes the crash handler sentinel earlier when the main window is closed,
preventing unclean shutdown warnings when a plugin causes issues. While not
ideal, the dialog is not useful when we cannot specify which plugin caused the
problem.

Increases shutdown priority of the main application so that when OBS interrupts
the session ending, CEF is not closed at the same time. This fixes a crash.

Additional safeguards and event handling to try to ensure a smoother shutdown.
2025-12-01 16:40:34 -05:00
Richard Stanway efca325c2c frontend, plugins: Set default bitrate to 6000 kbps
The default of 2500 kbps was chosen 10 years ago and times have changed.
Logs and forums posts show that many users of OBS for recording don't
change their bitrate and end up with a 2.5 mbps recording which looks
terrible.

Now that service bitrate enforcement exists, this will be automatically
capped to the maximum bitrate for streaming services, so the only time
this should result in a problem is if the user's upload speed is the
limiting factor, hopefully rarer these days with increasing internet
speeds.
2025-09-17 19:56:04 -04:00
derrod 2c65cb82ea frontend: Remove "BETA" from Hybrid MP4/MOV and make them the default 2025-09-12 15:45:57 -04:00
Sebastian Beckmann fca07b4ce4 frontend: Include OBSIdianPlayground MOC
Also puts the include in the correct place in OBSBasic_MainControls.
2025-09-04 14:17:02 -04:00
FiniteSingularity 23b67268e7 frontend: Provide UI for phase 1 of plugin manager
For phase 1 of the plugin manager, the ability to toggle off/on plugins
to be loaded at launch is provided.

This commit adds a new Plugin Manager dialog which can be accessed from
the Tools menu, which shows a list of all installed 3rd party plugins
with a checkbox to toggle them off or on.  If a change is made, the user
is prompted to restart OBS. To allow this, the plugin manager uses a
json based config file stored in the OBS config directory. Additionally
for sources in the source tree, a sample UI has been provided that
indicates any sources whose parent module is disabled, by turning its
title red.
2025-08-28 14:29:10 -04:00
PatTheMav c8ec906844 frontend: Change overflow texture rendering to be sRGB-aware
Current code assumes that the overflow texture and the render target
always share the same color format including transfer function.

This assumption is incorrect however as OBS might use a 16-bit floating
point texture with a linear gamma transfer function when a high-bitrate
format is selected. On top of that OBS Studio wants rendering code to
ensure that linear color blending is used throughout the application.

The DrawOverflow function had not been updated to reflect this. This
change brings it in line with other functions involved in preview
rendering, which enable automatic sRGB conversion for the framebuffer
and the texture used in the fragment shader.
2025-08-24 15:29:33 -04:00
tytan652 ffcc3acd9d frontend: Replace transition duration spinbox direct access 2025-08-22 16:48:23 -04:00
tytan652 d22ddfd395 frontend: Reduce reliance on transition indexes 2025-08-22 16:48:23 -04:00