Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speaker control replaced by mic control when mic open #154

Open
cmadamsgit opened this issue Feb 22, 2020 · 6 comments
Open

Speaker control replaced by mic control when mic open #154

cmadamsgit opened this issue Feb 22, 2020 · 6 comments

Comments

@cmadamsgit
Copy link

Expected behaviour

When the mic is opened, add a separate mic level control to the panel, like how it worked with the old notification-area control.

Actual behaviour

When the mic is opened, the mic level control replaces the speaker level control, so there is no direct way to control the speaker volume.

Steps to reproduce the behaviour

Use anything that opens the mic and see the speaker volume control replaced.

MATE general version

Fedora 31, MATE 1.22

Package version

mate-media-1.22.2-2.fc31.x86_64

Linux Distribution

Fedora 31

Link to downstream report of your Distribution

https://bugzilla.redhat.com/show_bug.cgi?id=1794568

@lukefromdc
Copy link
Member

From your description I assume this is with the panel applet in the panel and the tray icon not used/started?

@lukefromdc
Copy link
Member

lukefromdc commented Feb 24, 2020

I just tested this with mate-media 1.24.0 on Debian Unstable, using Audacity to bring up the microphone. I got the mic icon showing just to the left of the speaker icon, side by side. Note that other applets do have to slide over to make room for this, and at least on my setup (should be all installations) will do so even if locked to the panel

EDIT: this is with the panel applet (not the tray icon) in use, a 4K monitor and hidpi scaling in use, the pulseaudio backend and motherboard on-board sound.

@cmadamsgit
Copy link
Author

Yes, this is the panel applet, not the old notification area icon. But "beside" is the key word here... I usually have the audio control on a vertical panel at the right side of my desktop. If I move it to a horizontal panel, both icons appear (when the mic is open). So the issue appears to be that the applet doesn't handle a vertical panel (need to detect and switch to above/below rather than left/right).

@lukefromdc
Copy link
Member

OK, I just confirmed that: the speaker (right icon) is not displayed on a VERTICAL panel.

If you resize the panel fast enough (by clicking and holding the + icon in the Panel Properties dialog's General tab's size spinbox)while the mic is displayed, you can see the left side of the speaker icon. Clearly the applet is attempting to render off the right edge of a vertical panel. Making the panel larger also enlarges the mic and speaker icons, so you can only see that left edge of the speaker before the rendering "catches up" with a panel being expanded quickly.

@lukefromdc
Copy link
Member

I just traced this to orientation not being correctly sent to the applet. In gvc-applet.c we initialize the applet's icon box with
applet->priv->box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
and the icons only work together on a horizontal panel. If I change this to
applet->priv->box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
this is reversed, and the mic renders above the speaker(which is pushed down) on a vertical panel while on a horizontal panel it then replaces the speaker.
Thus the box never gets its initialized orientation updated, I will see if I can fix that.

@lukefromdc
Copy link
Member

Try
#157
it should fix the icon rendering except in the case of dragging the icon from a horizontal to a vertical panel or vice versa, or changing the whole panel from horizontal to vertical or vice-versa. Restart the panel or remove and re-add the icon to fix that situation with the PR version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants