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

Desktop items with multi-screen setups #1753

Open
tsujan opened this issue Mar 27, 2023 · 0 comments
Open

Desktop items with multi-screen setups #1753

tsujan opened this issue Mar 27, 2023 · 0 comments

Comments

@tsujan
Copy link
Member

tsujan commented Mar 27, 2023

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

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

No branches or pull requests

1 participant