Skip to content
Snippets Groups Projects

pavuapplication: allow one window per server

Open Tanu Kaskinen requested to merge tanuk/pavucontrol:allow-multiple-windows into master
2 unresolved threads

It was reported[1] that some users want to use multipe pavucontrol instances simultaneously to control multiple remote servers. Since pavucontrol 4.0 we have allowed only one window at a time, however. This patch relaxes the one window rule so that there can be one window per server (or per PULSE_SERVER value, to be precise).

This is implemented by appending the PULSE_SERVER value to the application ID if PULSE_SERVER is set (otherwise the normal ID is used). This works, because Gtk::Application uses the application ID to detect already running application instances. It's pretty ugly to mangle the application ID, because there's supposed to be only one ID per application, but I'm not aware of anything that would break or misbehave because of this.

[1] https://lists.freedesktop.org/archives/pulseaudio-discuss/2019-March/030929.html

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • It's pretty ugly to mangle the application ID

      I suppose the proper way of doing this would be to handle Application's command-line signal to either present an existing window or open a new one, depending on the environment provided.

      This would mean having all windows in a single process, with a different pulse client for each window.

      Edited by Jan Alexander Steffens
    • Yes, this would probably be better. I'll probably try to implement this, although I'm a bit worried that it might be a relatively big project.

    • Please register or sign in to reply
    • The recommendation from GNOME developers is to use . rather than - as the separator between the application name and the server address. Apparently this makes flatpak packaging easier.

    • I'm not using - as the separator, I'm using _. Does that change things? Also, _ is used also for replacing characters that aren't allowed in application IDs, and using . for that has the problem that application IDs must not have two consecutive periods in them, and they must not end with a period.

      I doubt this has any effect on flatpak packaging, because the mangled application ID doesn't show up in any files, it's only used in the D-Bus name (and only when PULSE_SERVER is set). Does flatpak care about the application's D-Bus name?

    • Please register or sign in to reply
Please register or sign in to reply
Loading