Skip to content

Desktop items with multi-screen setups #1753

Open
@tsujan

Description

@tsujan

In some multi-screen setups, like the following one, the screen heights are different.

screens

We use QScreen::availableVirtualGeometry() to put items on the screen. This function gives the union of all available geometries. In the above image, that union is a rectangle that contains screens 1 and 2. Therefore, some Desktop items might be put below the bottom side of the screen 1. Such items will be invisible, and that's bad.

There are three solutions:

  1. Theoretically, it may be possible to prevent items from going outside each screen, but that will need much more complex calculations, because Desktop isn't just about putting items on it. All the current calculations should be revisited, especially those about removing the gap below items and drag-and drop of items on Desktop. I guess it'll need a great amount of new codes, which will be really complex and will introduce new bugs.
  2. We can detect the above-mentioned scenario and put the Desktop items only on the primary screen and inside its available geometry — although we draw the Desktop background for all screens, like before. In that way, invisible items will be prevented, without needing a more complex code.
  3. We can always put Desktop items on the primary screen, regardless of the above-mentioned scenario. This is the simplest way. It also prevents unnecessary realignments after connecting or disconnecting the non-primary screens.

I can do 2 or 3 — 1 is beyond my time and interest.

I prefer 3, because not only it's simpler but also it prevents extra realignments. Any objection?

EDIT:

Another reason in favor of 3 is that setups like this are also possible:

screens1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions