add keybinding to toggle mouse support on the fly

This commit is contained in:
Andrzej Rybczak
2009-06-05 11:52:17 +02:00
parent cd3180d265
commit a6e4f9cdd7
5 changed files with 15 additions and 3 deletions

View File

@@ -194,11 +194,9 @@ int main(int argc, char *argv[])
gettimeofday(&now, 0);
MEVENT mouse_event;
mouseinterval(0);
if (Config.mouse_support)
{
mousemask(ALL_MOUSE_EVENTS, 0);
mouseinterval(0);
}
while (!main_exit)
{
@@ -1766,6 +1764,12 @@ int main(int argc, char *argv[])
Config.ncmpc_like_songs_adding = !Config.ncmpc_like_songs_adding;
ShowMessage("Add mode: %s", Config.ncmpc_like_songs_adding ? "Add item to playlist, remove if already added" : "Always add item to playlist");
}
else if (Keypressed(input, Key.ToggleMouse))
{
Config.mouse_support = !Config.mouse_support;
mousemask(Config.mouse_support ? ALL_MOUSE_EVENTS : 0, 0);
ShowMessage("Mouse support %s", Config.mouse_support ? "enabled" : "disabled");
}
else if (Keypressed(input, Key.SwitchTagTypeList))
{
if (myScreen == myPlaylist)