Merge pull request #2560 from akshettrj/mpris-click-fix

This commit is contained in:
Alexis Rouillard 2023-10-15 21:26:33 +02:00 committed by GitHub
commit 44d8245605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -126,12 +126,12 @@ The *mpris* module displays currently playing media via libplayerctl.
default: play-pause ++ default: play-pause ++
Overwrite default action toggles. Overwrite default action toggles.
*on-middle-click*: ++ *on-click-middle*: ++
typeof: string ++ typeof: string ++
default: previous track ++ default: previous track ++
Overwrite default action toggles. Overwrite default action toggles.
*on-right-click*: ++ *on-click-right*: ++
typeof: string ++ typeof: string ++
default: next track ++ default: next track ++
Overwrite default action toggles. Overwrite default action toggles.

View File

@ -587,13 +587,13 @@ bool Mpris::handleToggle(GdkEventButton* const& e) {
playerctl_player_play_pause(player, &error); playerctl_player_play_pause(player, &error);
break; break;
case 2: // middle-click case 2: // middle-click
if (config_["on-middle-click"].isString()) { if (config_["on-click-middle"].isString()) {
return ALabel::handleToggle(e); return ALabel::handleToggle(e);
} }
playerctl_player_previous(player, &error); playerctl_player_previous(player, &error);
break; break;
case 3: // right-click case 3: // right-click
if (config_["on-right-click"].isString()) { if (config_["on-click-right"].isString()) {
return ALabel::handleToggle(e); return ALabel::handleToggle(e);
} }
playerctl_player_next(player, &error); playerctl_player_next(player, &error);