Group resize is not deferred until adjustments are completed by a
mouseReleaseEvent in certain cases, resulting in unexpected movement of
sources that are part of a group as they are resized or stretched
beyond group bounds.
The bug can be described/reproduced as follow:
1. The user selects within a group in the sources dock
2. The user moves their mouse over the selected source such that the
cursor would change.
- This results in a cursor update and a call to GetStrechHandle()
- as the source is part of a group, stretchGroup will be set to the
group of the source
3. The user clicks on the canvas without touching a stretch/rotation
handle
- A mouseReleaseEvent is fired
- obs_sceneitem_defer_group_resize_end is called on the group as
stretchGroup is still defined from earlier
- the defer_group_resize member of the group will become negative
- The deferal check in resize_group (obs-scene.c) will always pass
now
4. When scaling or rotating the source close to the group bounds, the
group bounds will now dynamically update causing the source in to fly
off the canvas.
Resolves: https://github.com/obsproject/obs-studio/issues/9754
Loading these PNGs in libpng 1.6+ results in the warning:
libpng warning: iCCP: known incorrect sRGB profile
This is probably caused by saving an ICC Profile with the program used
to make the image, and that ICC Profile is considered invalid by libpng.
Removing the iCCP data resolves this.
Didn't realize OBS could output both program and preview views at the
same time with multiple devices.
Also remove render callbacks earlier on stop to avoid use-after-free.
Fixes an issue where if no filters had previously been copied and the
user copies a filter from either the scene tree or the audio mixer, the
"Paste Filters" action would not be available until the Edit menu
reloads (e.g., by selecting another source in the source tree).
The YouTubeAppDock uses its own cookie manager and thus requires a
running CEF instance before creating the dock. Unfortunately creation
of the dock itself and launching the associated browser instance are
coupled in the code.
The UI code to restore browser dock states runs _after_ this code and
unfortunately this is also the only way to ensure that if the user
has closed the YouTubeAppDock before that it stays closed on app
launch (the dock needs to exist in the Widget hierarchy for its state
to be restored).
Alas, outside of Windows, InitBrowserPanelSafeBlock uses a separate
local QEventLoop to block the main thread while still allowing UI
events to be processed to launch a CEF instance.
By this point in the code execution, the primary event loop has not
been started yet, so the event loop launched by
InitBrowserPanelSafeBlock temporarily becomes the main application
event loop, which initializes all Widgets, finds no active window
state for the widgets, and thus treats them as "visible", calls the
showEvent method on every browser dock, which thus loads the associated
websites.
The dock state is restored after all that, which leads to each browser
dock being "shown" (even though the main QApplication hasn't even
started yet), the associated sites are running (including audio and
video output) but then hidden again, which leads to surprising audio
output seemingly coming from "nowhere".
All browser docks call the browser initialization methods synchronously,
which has the benefit of not spinning up a premature event loop, and does
not trigger Qt view state changes before all Widgets have been
initialized. Having the YouTubeAppDock behave the same does thus not
negatively impact UX.
Some errors include HTML links directing users to e.g. driver updates
or further information. Using a raw newline instead of <br> causes Qt to
skip parsing the HTML, resulting in an ugly mess of HTML displayed to
the user instead of the intended links.
The native popup has the problem that it doesn't work for links, leaving
us with an unclickable text where a link should be. Qt 6.6 has an option
to disable the native dialog, so let's add this to make the link
clickable again.
Co-authored-by: derrod <dennis@obsproject.com>
Moving the cleanup to OBS_FRONTEND_EVENT_EXIT in #8735 only handled the
cleanup from the dockable window, as the regular stats window is deleted
on close when the UI is shut down. This caused an event handler leak
each time the window is manually closed, resulting in crashes. This code
looks a bit wrong since we delete the same handler in multiple places,
but this is due to the code being used by both the dock (non-closable)
and the window (closable). The OBS_FRONTEND_EVENT_EXIT handler handles
cleanup from the dockable stats window, and the window close handler now
handles cleanup from the non-dockable stats window.
ExpandCheckBox was introduced in 88b6c63, but the seemingly replaced by
SourceTreeSubItemCheckBox during development. This means that it became
completely unused.
Like many IDEs, Xcode has this feature where it shows the declaration of
the method currently being worked in. However it gets confused by scopes
starting inside of preprocessor guards and ending outside them,
resulting in the declaration of OBSBasic::ReceivedIntroJson always being
shown in window-basic-main.cpp from that method downwards. We can work
around that by starting and ending the if-scope outside of the ifdefs.
The current regex pattern will successfully match if the cache variable
contains the pattern anywhere inside the string. Let's restrict the
regex pattern such that it requires the pattern to be precisely between
the beginning and end of the string with no other characters in between
those anchor points.
The OBS client side timeout for the YouTube API is too short. New
changes proposed to the YouTube API will cause this to fail for
creating a broadcast. Increase to a minimum of 60.
In the settings window, when the user chooses to use a stream key
instead of connecting their account, it switches widgets to show the
stream key UI. However, when opening the settings window again after
having done that, it's supposed to continue to show the stream key UI,
and that functionality was broken by obsproject/obs-studio#9272. It did
this because OBSBasicSettings::ServiceChanged() no longer called
reset_service_ui_fields() because the lastService member variable was no
longer set to empty in OBSBasicSettings::LoadStream1Settings().
This fixes it by just adding a parameter to
OBSBasicSettings::ServiceChanged() to make it forcibly reset the fields
when loading stream settings.
Some hardware encoders fail in indecipherable ways if you try to at
certain low resolutions such as 17x17 or 19x19, but works at 20x20.
However, there is no good way to determine what the minimum working
resolution is for every possible encoder. There isn't that much
difference between 8x8 and 32x32, except that the latter will reduce or
eliminate such odd failure cases, so let's increase the minimum required
output resolution by just a little bit.
YoutubeAuth::chat is a raw pointer that is uninitialized. Most of the
time it doesn't matter, since the object it points to is created at the
application start. However, in case of Wayland (Linux), CEF is not
initialized (because it's not supported) and the chat object will never
get created.
This patch fixes crash on Wayland by initializing `chat` to `nullptr`.
Co-authored-by: Roman Podoliaka <roman.podoliaka@gmail.com>
This reverts commit aeed4a3aa1.
The source type `browser_source` is now available for all supported
platforms so we don't need to fallback to `linuxbrowser-source`.
The status bar message was not vertically aligned properly to
other widgets in the status bar. We have to implement our own
message system here, as the default status bar in Qt has hardcoded
paddings.