In #3988, @RytoEx mentioned that the recent Qt upgrade to 5.15.2
introduced a regression in which Qt begins returning DPI/scaling
aware resolutions for each screen. While this was fixed for
new profiles, this was not reflected in the choice for the
Canvas (Base) Resolution in the Settings screen yet.
This commits fixes this issue, and calculates the correct
physical screen size again, respecting per-screen DPI scaling.
This reverts commit 36ab7b97cf.
The fact that a transition is a composition of two scenes was not
factored into the merging of this PR. Thus, it would apply to the
underlying scenes when transitioning, making the effectiveness of this
feature cause inconsistent rendering of the underlying scenes when
transitions are activated versus when they're not.
This will be used by a new event filter, added only when running as a Wayland
client, to force creating the obs_display instance even when not exposed.
This is a dangerous operation on Wayland, and is crashing not only
OBS Studio but also the whole compositor. Let's disable it for now
when running as a native Wayland client.
Some compositors (GNOME Shell, Plasma) still allow setting this
option on the window menu.
The sizeChanged callback is connected to the screenChanged signal,
and evidently the naming doesn't match. Rename the callback to
match the signal name.
Right after showing the OBSQTDisplay widget, it may happen that a
wl_surface is not yet created and attached to the window. When this
happens, creating the OBS display results in a crash.
Make QTToGSWindow return a boolean, indicating success or failure, and
don't create the OBS display on failure.
When a window is made invisible, then visible again, the
obs_display is reused. Turns out, QT destroys the wl_surface
associated with the previewer on Wayland. However, the EGL
surface created on top of this wl_surface is not, and any
attempt to attach a new buffer to it will crash OBS.
Destroy the obs_display when becoming invisible, and when
running as a Wayland client. Also nullify the display
variable on destruction, to avoid subclasses double-freeing
the obs display.
On Wayland, we want to query the window's underlying
platform for the Wayland surface, instead of foolishly
retrieving the X11 display.
Pass QWindow instead of WId directly, and set the surface
as the platform data on Wayland systems.
This leads to a crash when the output is stopped, either by clicking the
stop button or when exiting OBS studio.
This crash is:
- intermittent in release builds
- reliable for me in debug builds
It is held by an `OBSData`, which, if not null, will automatically
call `obs_data_release()` on scope exit.
Move the OBS_USE_EGL environment variable check to obs-app.cpp,
and set the OBS platform to be either OBS_NIX_PLATFORM_X11_GLX
or OBS_NIX_PLATFORM_X11_EGL.
This is a Unix-specific code. The only available platforms
at this point are the X11/GLX and X11/EGL platforms.
The concept of a platform display is also introduced. Again,
the only display that is set right now is the X11 display.
After cleaning up the native flags in various places, and disabling
making sibling of native widgets native, BrowserDock was left in an
inconsistent state, since it requires being native for CEF to work
properly.
Make BrowserDock native.
Some widgets are marked as native unnecessarily. Native widgets are
a bit more involving than regular ones, so remove this flag.
Original patch by David Edmundson <kde@davidedmundson.co.uk>
Native windows really only make sense for previews. They can be a new
xcb_window or a wayland subsurface.
For historical reasons setting a widget to native will also affect
ancestors. Qt will still draw them as part of the parent as they are
never mapped, but a window is nonetheless created.
This is especially problematic on wayland as then the subsurface is
parented to an unmapped window.
This default behaviour can be turned off. Now only the native widgets
(the video previews) are actually native.
The "fullName" property was filled only in case of exceeding
TRUNCATE_TEXT_LENGTH. Also search function had worked only with
item->text() what was the reason of maximum search length in
Hotkeys Filter(Setting->Hotkeys).
The following changes allow to search in filter without
the length limit of string along with the current functionality.
This adds functions to the frontend api to start/stop the virtual
camera, to check if it is active and adds function to get the output
reference. It also adds api events for when the virtual camera is
started or stopped.
Fixes#4031
It seems Qt on various flavours of Linux behaves erratically when scaled,
and for the moment macOS doesn't require fractional scaling support.
This commit can be reverted when Qt fixes issues on their side.
This commit prevents a crash in, for example, Linux configurations
where PulseAudio is disabled, which leads into 'mod' being 'null',
which in turn leads into a segmentation fault when an ALSA source
is selected.
Closes https://github.com/obsproject/obs-studio/issues/3485