Skip to content

Commit

Permalink
UI: Disable browser docks on Wayland
Browse files Browse the repository at this point in the history
When running on Wayland, the browser docks look broken and sometimes
they crash OBS Studio. Interestingly, browser sources seem to work
just fine. Ideally we'd be able to dig into the issue and find the
root cause, but time is short for the 27 release and disabling the
docks until this is figured out seems to be the best alternative for
now.

Of course this is a temporary workaround, and eventually this commit
will be reverted, and browser docks will work just fine, flowers and
rainbows and happy unicorns.

Disable browser docks on Wayland, which includes both the manually
added docks, and the docks OBS Studio creates for authentication for
Twitch and Restream.io.

Related: obsproject/obs-browser#279
  • Loading branch information
GeorgesStavracas committed Apr 4, 2021
1 parent b479d60 commit 9e408fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UI/window-basic-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,7 @@ void OBSBasic::OBSInit()
/* add custom browser docks */

#ifdef BROWSER_AVAILABLE
if (cef) {
if (cef && !isWayland) {
QAction *action = new QAction(QTStr("Basic.MainMenu."
"View.Docks."
"CustomBrowserDocks"),
Expand Down
14 changes: 13 additions & 1 deletion UI/window-basic-settings-stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
#include "url-push-button.hpp"

#ifdef BROWSER_AVAILABLE

#ifdef ENABLE_WAYLAND
#include <obs-nix-platform.h>
#endif

#include <browser-panel.hpp>
#include "auth-oauth.hpp"
#endif
Expand Down Expand Up @@ -375,7 +380,14 @@ void OBSBasicSettings::on_service_currentIndexChanged(int)
ui->twitchAddonLabel->setVisible(false);

#ifdef BROWSER_AVAILABLE
if (cef) {

#ifdef ENABLE_WAYLAND
bool isWayland = obs_get_nix_platform() == OBS_NIX_PLATFORM_WAYLAND;
#else
bool isWayland = false;
#endif

if (cef && !isWayland) {
if (lastService != service.c_str()) {
QString key = ui->key->text();
bool can_auth = is_auth_service(service);
Expand Down

0 comments on commit 9e408fe

Please sign in to comment.