Skip to content

Commit

Permalink
CHANGE(client): Don't hard block shortcuts on Wayland
Browse files Browse the repository at this point in the history
In mumble-voip#5307 we disabled global shortcuts on Wayland, but we did it in a way
that would prevent anyone from re-enabling the support.

Since we have received reports of some users actually making use of the
shortcut system on Wayland, even without proper Wayland support, we
decided to remove the hard-lock and allow these users to re-enable the
shortcuts, if they so want.

Fixes mumble-voip#5454

(cherry picked from commit 49cc697)
  • Loading branch information
Krzmbrzl committed Aug 10, 2022
1 parent 00ba5f3 commit fb0e941
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/mumble/GlobalShortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,6 @@ GlobalShortcutConfig::GlobalShortcutConfig(Settings &st) : ConfigWidget(st) {
if (EnvUtils::waylandIsUsed()) {
// Our global shortcut system doesn't work with Wayland
qlWaylandNote->setVisible(true);

qgbShortcuts->setEnabled(false);
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/mumble/GlobalShortcut.ui
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<item>
<widget class="QLabel" name="qlWaylandNote">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Mumble's Global Shortcuts system does currently not work in combination with the Wayland protocol. For more information, visit &lt;a href=&quot;https://github.com/mumble-voip/mumble/issues/5257&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0057ae;&quot;&gt;https://github.com/mumble-voip/mumble/issues/5257&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Mumble's Global Shortcuts system does currently not work properly in combination with the Wayland protocol. For more information, visit &lt;a href=&quot;https://github.com/mumble-voip/mumble/issues/5257&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0057ae;&quot;&gt;https://github.com/mumble-voip/mumble/issues/5257&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand Down
7 changes: 0 additions & 7 deletions src/mumble/GlobalShortcut_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "GlobalShortcut_unix.h"

#include "EnvUtils.h"
#include "Settings.h"
#include "Global.h"

Expand Down Expand Up @@ -63,12 +62,6 @@ GlobalShortcutX::GlobalShortcutX() {
}

#ifdef Q_OS_LINUX
if (EnvUtils::waylandIsUsed()) {
qWarning("GlobalShortcutX: Global shortcuts don't work on Wayland (see "
"https://github.com/mumble-voip/mumble/issues/5257)");
return;
}

if (Global::get().s.bEnableEvdev) {
QString dir = QLatin1String("/dev/input");
QFileSystemWatcher *fsw = new QFileSystemWatcher(QStringList(dir), this);
Expand Down
8 changes: 1 addition & 7 deletions src/mumble/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ Settings::Settings() {

#ifdef Q_OS_LINUX
if (EnvUtils::waylandIsUsed()) {
// Due to the issues we're currently having on Wayland, we disable shortcuts by default
bShortcutEnable = false;
}
#endif
Expand Down Expand Up @@ -1007,13 +1008,6 @@ void Settings::load(QSettings *settings_ptr) {
LOAD(bEnableXboxInput, "shortcut/windows/xbox/enable");
LOAD(bEnableUIAccess, "shortcut/windows/uiaccess/enable");

#ifdef Q_OS_LINUX
if (EnvUtils::waylandIsUsed()) {
// Global shortcuts don't work on Wayland
bShortcutEnable = false;
}
#endif

// Search options
LOAD(searchForUsers, "search/search_for_users");
LOAD(searchForChannels, "search/search_for_channels");
Expand Down

0 comments on commit fb0e941

Please sign in to comment.