Adventures in primary display land

As some may have noticed I have lately patched “Primary Display” support into a few of our components. It all started with the display settings dialog… But let me start right at the beginning.

“Primary” is a setting of X11’s RandR extension that “is expected to be used by desktop environments to mark the screen that should hold the primary menu bar or panel” (quoted from the specification). So in short: the “Primary Display” should hold your panels, your desktop icons, your notifications, potentially your presenter’s screen (if you use LibreOffice) etc. in a multi-display setup.

In 2016 I started by introducing a hidden setting in xfce4-notifyd. This meant your notifications wouldn’t pop up during presentations on external displays anymore (because the default setting before was to follow the mouse pointer’s location). I personally needed/wanted this and it felt like an easy fix.

In 2017 I added the feature to xfce4-panel. Before that you had to either hard-code the location of the panels or use the “Automatic” setting, which always puts your panels at the left top part of the screen (x=0, y=0). In combination with the display settings option this provided an easy way of moving the panel around and keeping it on certain displays even when connecting new additional ones.

In late 2018 I started working on the big missing piece of the puzzle, which is xfdesktop. At the time of writing, my patches are still in review in this bugreport (testing welcome!), but things work ok or at least well enough to give me hope that we will see this in the next development release.

Display Settings Primary information

In parallel to the xfdesktop patch I also picked up the display settings dialog again after gathering some input from friends at work and decided to pull in all the information about the usage and configuration of the “Primary Display”, as its settings are spread across several components and dialogs. The point of this popover is to show the current configuration status as well as adding a shorthand for accessing all those settings dialogs.

I also went with a new way of highlighting which display is configured as “Primary Display” that is hopefully more easily understandable than the panel I added in the 4.13.5 release. The star is shown both in the displays widget as well as in the properties list of each display, so users can easily visually match which display is primary and what that means.

Enjoy!

15 thoughts on “Adventures in primary display land”

  1. Great news!

    Does this also mean that XFCE git (with your primary display patches) will now save and restore XFCE (/xrandr) display configs or is that not covered by your patches?

    The main reason I use MATE instead of XFCE is because it doesn’t save and restore display configs – instead I have to configure my displays every time I change their config (ie when (un)plugging an external display) and that has been a showstopper for me. Hence my Linux desktop comprises of MATE but using Thunar as file manager, which I find to be the most complete and stable of the Linux GUI file managers.

    PS Whats the easiest way t test the latest XFCE desktop? Under Arch, for example? xfce4-meta in the AUR doesn’t seem to fetch the very latest git XFCE but thats the nearest thing I’ve found to an easy way to test the latest XFCE.

  2. It’s so close! But it doesn’t work the magic it is supposed to if you have a pair of display port monitors like the Philips Momentum 326M6FJSB 32”… that I just bought.
    When they wake from sleep mode they cause xrandr to recognize them as a new monitor, which should trigger your code to set the default, but instead it comes up mirrored, or one monitor doesn’t come up at all, etc. I can set it to load the pop up and I can click all I want on the correct choice but it doesn’t do anything useful.
    I’m on a desktop so I don’t ever plug or unplug I just want it to stay put.
    So I resorted to recompiling and forcing xsettingsd to not use xrandr. It completely breaks your utility but it does the right thing (nothing) when my monitors come out of sleep.
    The downside is that my key-combo to switch keyboard layouts also broke (and who knows what else.) I had to work around that with scripts.

    Any idea what exactly it is (where in the code) that causes everything to revert to mirrored after a new monitor (or sleeping display port monitor) comes up?

    Here’s the hack I did to disable xrandr:
    https://forum.xfce.org/viewtopic.php?id=12179

Leave a Reply

Your email address will not be published. Required fields are marked *