[GH-ISSUE #310] Volume Mixer icon isn't changed back after connecting to RDP session #269

Closed
opened 2026-02-26 11:57:30 +03:00 by kerem · 17 comments
Owner

Originally created by @Gameniti on GitHub (Oct 30, 2022).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/310

Originally assigned to: @VShawn on GitHub.

Describe the bug
In the Windows Audio Mixer the PRemoteM fader keeps showing the icon of the first connection you have made with rdp instead of changing back to PRemoteM icon/Icon of another RDP session.

To Reproduce
Steps to reproduce the behavior:

  1. Completly close PRemoteM (Taskbar icon -> exit)
  2. Open PRemoteM
  3. Open Windows Audio Mixer
  4. Start an RDP Session with a saved icon. You should now see a slider called "<session name> - PRemoteM" with the icon of your connected session.
  5. Disconnect session. You should now see the PRemoteM Slider called "PRemoteM" still with the icon of your previously connected RDP Session.
  6. Connect to another client via RDP (best if it has some other icon). You should now see the name "<session name> - PRemoteM" but with the icon of your first rdp session.
  7. Do that as much as you like but the icon of your first rdp session after opening PRemoteM stays until completely exiting the program and start it again.

Expected behavior
When changing RDP session the name AND the icon should change correspondingly.

Screenshots
grafik

Desktop (please complete the following information):

  • OS: Windows 10 Pro 21H2
  • PRemoteM Version 0.7.1.6

Additional context
I also think it's weird that you only get the volume fader when you start a session and not when opening the program. I mean you still have it if you close every session but it only shows when you start connecting to a client.

Originally created by @Gameniti on GitHub (Oct 30, 2022). Original GitHub issue: https://github.com/1Remote/1Remote/issues/310 Originally assigned to: @VShawn on GitHub. **Describe the bug** In the Windows Audio Mixer the PRemoteM fader keeps showing the icon of the first connection you have made with rdp instead of changing back to PRemoteM icon/Icon of another RDP session. **To Reproduce** Steps to reproduce the behavior: 1. Completly close PRemoteM (Taskbar icon -> exit) 2. Open PRemoteM 3. Open Windows Audio Mixer 4. Start an RDP Session with a saved icon. You should now see a slider called "\<session name> - PRemoteM" with the icon of your connected session. 5. Disconnect session. You should now see the PRemoteM Slider called "PRemoteM" still with the icon of your previously connected RDP Session. 6. Connect to another client via RDP (best if it has some other icon). You should now see the name "\<session name> - PRemoteM" but with the icon of your **first** rdp session. 7. Do that as much as you like but the icon of your first rdp session after opening PRemoteM stays until completely exiting the program and start it again. **Expected behavior** When changing RDP session the name AND the icon should change correspondingly. **Screenshots** ![grafik](https://user-images.githubusercontent.com/26071510/198891959-3e67813e-aa57-4a76-8e22-f908799843c2.png) **Desktop (please complete the following information):** - OS: Windows 10 Pro 21H2 - PRemoteM Version 0.7.1.6 **Additional context** I also think it's weird that you only get the volume fader when you start a session and not when opening the program. I mean you still have it if you close every session but it only shows when you start connecting to a client.
Author
Owner

@VShawn commented on GitHub (Nov 1, 2022):

Hi thanks for the report, I know this bug for the first time 😂

<!-- gh-comment-id:1298420003 --> @VShawn commented on GitHub (Nov 1, 2022): Hi thanks for the report, I know this bug for the first time :joy:
Author
Owner

@VShawn commented on GitHub (Nov 3, 2022):

failed to find a solution :(

<!-- gh-comment-id:1301946803 --> @VShawn commented on GitHub (Nov 3, 2022): failed to find a solution :(
Author
Owner

@itagagaki commented on GitHub (Dec 7, 2024):

While trying to find a workaround for this issue, I noticed something odd.

On the "Release / Any CPU" build, if I run it with "Start Without Debugging" and the option "Show current session icon instead of the app icon when connected" is checked, the icon that appears in the Volume Mixer is the icon of that session icon.
However, if I run it with "Start Debugging" on the same build, the icon in the taskbar is the icon of the session icon, but the icon that appears in the Volume Mixer is the 1Remote app icon.

<!-- gh-comment-id:2524981680 --> @itagagaki commented on GitHub (Dec 7, 2024): While trying to find a workaround for this issue, I noticed something odd. On the "Release / Any CPU" build, if I run it with "Start Without Debugging" and the option "Show current session icon instead of the app icon when connected" is checked, the icon that appears in the Volume Mixer is the icon of that session icon. However, if I run it with "Start Debugging" on the same build, the icon in the taskbar is the icon of the session icon, but the icon that appears in the Volume Mixer is the 1Remote app icon.
Author
Owner

@itagagaki commented on GitHub (Dec 7, 2024):

Initially there is no 1Remote on the Volume Mixer.
It will appear when we start an RDP session. Good.
But it stays there when the RDP session ends. This is the first thing that annoys me.
I still don't know why.

<!-- gh-comment-id:2525165016 --> @itagagaki commented on GitHub (Dec 7, 2024): Initially there is no 1Remote on the Volume Mixer. It will appear when we start an RDP session. Good. But it stays there when the RDP session ends. This is the first thing that annoys me. I still don't know why.
Author
Owner

@VShawn commented on GitHub (Dec 9, 2024):

Yes, when I started investigating, I had no clue and I still haven't been able to find the cause. I didn't even find a Windows API to control the Volume Mixer icon.

<!-- gh-comment-id:2526604508 --> @VShawn commented on GitHub (Dec 9, 2024): Yes, when I started investigating, I had no clue and I still haven't been able to find the cause. I didn't even find a Windows API to control the Volume Mixer icon.
Author
Owner

@itagagaki commented on GitHub (Dec 9, 2024):

This seems to be a quirk of the Volume Mixer.
If you restart the Volume Mixer instead of restarting 1Remote, it will show an icon for the current RDP session. This suggests that Volume Mixer does not expect the application's icon to change and will continue to use the one it has. As there seems to be no way of notifying the Volume Mixer of the icon change, there is probably nothing that can be done on the 1Remote side.
By the way, should the Volume Mixer icon change when you switch the active RDP session? In the first place, should the Volume Mixer display an icon for each RDP session? I think not. Because this fader changes the volume coming from all sessions of 1Remote. So I think it is right that there should be no session icon, just the 1Remote app icon. The Volume Mixer is a bit odd in that respect too.
There is an alternative: an alternative app for the Volume Mixer is available from the Windows Store. Examples are 'EarTrumpet' and 'Volumey'. I have tried both and they both just show the 1Remote app icon. I think that is fine. And I found Volumey better. Both have source code available on GitHub.

<!-- gh-comment-id:2527344347 --> @itagagaki commented on GitHub (Dec 9, 2024): This seems to be a quirk of the Volume Mixer. If you restart the Volume Mixer instead of restarting 1Remote, it will show an icon for the current RDP session. This suggests that Volume Mixer does not expect the application's icon to change and will continue to use the one it has. As there seems to be no way of notifying the Volume Mixer of the icon change, there is probably nothing that can be done on the 1Remote side. By the way, should the Volume Mixer icon change when you switch the active RDP session? In the first place, should the Volume Mixer display an icon for each RDP session? I think not. Because this fader changes the volume coming from all sessions of 1Remote. So I think it is right that there should be no session icon, just the 1Remote app icon. The Volume Mixer is a bit odd in that respect too. There is an alternative: an alternative app for the Volume Mixer is available from the Windows Store. Examples are 'EarTrumpet' and 'Volumey'. I have tried both and they both just show the 1Remote app icon. I think that is fine. And I found Volumey better. Both have source code available on GitHub.
Author
Owner

@VShawn commented on GitHub (Dec 10, 2024):

By the way, should the Volume Mixer icon change when you switch the active RDP session? In the first place, should the Volume Mixer display an icon for each RDP session?

Nope

<!-- gh-comment-id:2529898201 --> @VShawn commented on GitHub (Dec 10, 2024): > By the way, should the Volume Mixer icon change when you switch the active RDP session? In the first place, should the Volume Mixer display an icon for each RDP session? Nope
Author
Owner

@itagagaki commented on GitHub (Dec 13, 2024):

The subject says “Taskbar icon”, but it looks like it should be changed to "Volume Mixer icon".

<!-- gh-comment-id:2540807382 --> @itagagaki commented on GitHub (Dec 13, 2024): The subject says “Taskbar icon”, but it looks like it should be changed to "Volume Mixer icon".
Author
Owner

@itagagaki commented on GitHub (Feb 5, 2025):

I noticed that when I launch 1Remote from Explorer and start an RDP session, the volume mixer shows the RDP session icon, but when I launch it from Visual Studio, the volume mixer shows the 1Remote icon. Same exe and same settings. Mysterious.

<!-- gh-comment-id:2636762779 --> @itagagaki commented on GitHub (Feb 5, 2025): I noticed that when I launch 1Remote from Explorer and start an RDP session, the volume mixer shows the RDP session icon, but when I launch it from Visual Studio, the volume mixer shows the 1Remote icon. Same exe and same settings. Mysterious.
Author
Owner

@itagagaki commented on GitHub (Feb 11, 2025):

As I wrote in the previous comment, when I do "Start Debugging" or "Attach to Process... (=1Remote)" in Visual Studio, the Volume Mixer shows the 1Remote application icon when the RDP session starts, but when I do "Start Without Debugging" or simply launch 1Remote from another shell, the Volume Mixer shows the RDP session icon.

If the reason for this difference can be determined, I think this issue could be solved. But so far I have no idea.

P.S.

When start without debugging:
Image

then run RDP:
Image

Volume Mixer displays the RDP session icon.

When start debugging:
Image

then run RDP:
Image

All of 1Remote windows are doubled, and all but one are 1Remote app icons. The only one is the RDP session icon.
Volume Mixer displays the 1Remote app icon.

<!-- gh-comment-id:2650545970 --> @itagagaki commented on GitHub (Feb 11, 2025): As I wrote in the previous comment, when I do "Start Debugging" or "Attach to Process... (=1Remote)" in Visual Studio, the Volume Mixer shows the 1Remote application icon when the RDP session starts, but when I do "Start Without Debugging" or simply launch 1Remote from another shell, the Volume Mixer shows the RDP session icon. If the reason for this difference can be determined, I think this issue could be solved. But so far I have no idea. P.S. When start without debugging: <img width="1640" alt="Image" src="https://github.com/user-attachments/assets/9d47d5ab-f15b-4cb4-9522-6207184fa0d6" /> then run RDP: <img width="1640" alt="Image" src="https://github.com/user-attachments/assets/69d993bb-9553-41c5-a385-8d7139fb2fdd" /> Volume Mixer displays the RDP session icon. When start debugging: <img width="1640" alt="Image" src="https://github.com/user-attachments/assets/56d45753-dee7-494a-93f6-e89d4636ef68" /> then run RDP: <img width="1640" alt="Image" src="https://github.com/user-attachments/assets/c49e0c9d-5185-4771-8451-618293afdbd4" /> All of 1Remote windows are doubled, and all but one are 1Remote app icons. The only one is the RDP session icon. Volume Mixer displays the 1Remote app icon.
Author
Owner

@VShawn commented on GitHub (Mar 10, 2025):

I edit the code to to avoid copy the voice file to the output folder when build by set dummy.wav as a resource.

Image

<!-- gh-comment-id:2710648934 --> @VShawn commented on GitHub (Mar 10, 2025): I edit the code to to avoid copy the voice file to the output folder when build by set dummy.wav as a resource. ![Image](https://github.com/user-attachments/assets/13c3106d-97a1-4f22-a86c-ad1f822977e4)
Author
Owner

@itagagaki commented on GitHub (Mar 10, 2025):

I edit the code to to avoid copy the voice file to the output folder when build by set dummy.wav as a resource.

Hmmm, apparently not quite the same thing.
As for the 1Remote icon being added to the volume mixer by playing dummy.wav when starting 1Remote, both codes give the same result. However, when I launched the Volume Mixer after running 1Remote and connecting to the RDP host, it became the 1Remote icon if it was a real file, but using GetResourceStream turned it into an RDP session icon.

<!-- gh-comment-id:2710801789 --> @itagagaki commented on GitHub (Mar 10, 2025): > I edit the code to to avoid copy the voice file to the output folder when build by set dummy.wav as a resource. Hmmm, apparently not quite the same thing. As for the 1Remote icon being added to the volume mixer by playing dummy.wav when starting 1Remote, both codes give the same result. However, when I launched the Volume Mixer after running 1Remote and connecting to the RDP host, it became the 1Remote icon if it was a real file, but using `GetResourceStream` turned it into an RDP session icon.
Author
Owner

@VShawn commented on GitHub (Mar 10, 2025):

Image

but it passed my test before I pushed the code. as the screenshoot shows I played some sound on RPD and the icon did not changed.

<!-- gh-comment-id:2710850686 --> @VShawn commented on GitHub (Mar 10, 2025): ![Image](https://github.com/user-attachments/assets/52e2230c-57b7-4234-baa7-5e332f1a2e61) but it passed my test before I pushed the code. as the screenshoot shows I played some sound on RPD and the icon did not changed.
Author
Owner

@itagagaki commented on GitHub (Mar 10, 2025):

Have you run it from Visual Studio? If so, I got the same results. But not when I ran the generated exe.

<!-- gh-comment-id:2710910207 --> @itagagaki commented on GitHub (Mar 10, 2025): Have you run it from Visual Studio? If so, I got the same results. But not when I ran the generated exe.
Author
Owner

@VShawn commented on GitHub (Mar 10, 2025):

Based on your suggestion, I downloaded and ran the nightly version 1Remote-1.1.1-net6-x64-nightly-20250310-0228fc.zip, and the icon is still OK.

Image

<!-- gh-comment-id:2711011099 --> @VShawn commented on GitHub (Mar 10, 2025): Based on your suggestion, I downloaded and ran the nightly version [1Remote-1.1.1-net6-x64-nightly-20250310-0228fc.zip](https://github.com/1Remote/1Remote/releases/download/Nightly/1Remote-1.1.1-net6-x64-nightly-20250310-0228fc.zip), and the icon is still OK. ![Image](https://github.com/user-attachments/assets/51ecc0b4-d370-457f-b883-0baedceee4d3)
Author
Owner

@itagagaki commented on GitHub (Mar 10, 2025):

Sorry. I tested again and the result of the icon being a session icon happened in the previous revision as well.

Steps:

  1. Make sure the 1Remote and Volume Mixer are not running
  2. Run 1Remote
  3. Open RDP session
  4. Run Volume Mixer

So, I think your modification is OK. My bad.

I thought I had passed the above test as well, but there may have been a mistake. Anyway, I now know that if the Volume Mixer is launched while an RDP session window has the focus, it will become the RDP session icon. As for that, well, it seems a bit impossible to deal with and I don't think it's an issue we should be spending so much effort on, but if I can find a way to deal with it, I'll PR again.

<!-- gh-comment-id:2711254074 --> @itagagaki commented on GitHub (Mar 10, 2025): Sorry. I tested again and the result of the icon being a session icon happened in the previous revision as well. Steps: 1. Make sure the 1Remote and Volume Mixer are not running 2. Run 1Remote 3. Open RDP session 4. Run Volume Mixer So, I think your modification is OK. My bad. I thought I had passed the above test as well, but there may have been a mistake. Anyway, I now know that if the Volume Mixer is launched while an RDP session window has the focus, it will become the RDP session icon. As for that, well, it seems a bit impossible to deal with and I don't think it's an issue we should be spending so much effort on, but if I can find a way to deal with it, I'll PR again.
Author
Owner

@VShawn commented on GitHub (Mar 11, 2025):

agree, no need to put more effort into this

<!-- gh-comment-id:2712163599 --> @VShawn commented on GitHub (Mar 11, 2025): agree, no need to put more effort into this
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#269
No description provided.