Skip to content
Snippets Groups Projects
Commit 93b9abd3 authored by Brian Tarricone's avatar Brian Tarricone
Browse files

Implement new multi-monitor support for the file icon manager

This was originally supposed to be more than one commit, but I think I
messed up somewhere.

This sets things up so the file icon manager creates a new icon view
and holder for each desktop.

The rest of it is the per-monitor position tracking code.  Icons are now
tracked in a YAML file, represented by XfdesktopIconPositionConfig
structs.  These structs list the monitor identifiers that are definite
matches for that particular configuration, as well as the geometry that
more or less should or could match.  In most cases xfdesktop should be
able to pick a configuration by itself, but sometimes when it might see
a new monitor, but also have configurations that aren't assigned to any
connected monitor, it might ask the user what to do (and then remember
it for that monitor in the future).

One potentially interesting thing is that each config has a "level",
which is one of primary, secondary, or "other".  The level allows for
"overlapping" or "overriding" or "overlaying" configurations depending
on which monitors are plugged in.  For example, if you have a laptop,
you might have all your desktop icons arranged in a certain way when you
have no other monitors connected.  But then you connect an external
monitor, and move some icons over to that other monitor.  You disconnect
that monitor, and those icons should move back to the laptop screen, but
-- importantly -- back to the saved original positions from when you
originally were only using one screen (that is, the icons on the second
monitor shouldn't just reappear in some default positions on the laptop
screen).  And then when you reconnect that external monitor, those icons
will move back to the saved locations on the external monitor.  This is
fairly easy to track for people who have either one or two monitors, but
as we add a third monitor (and fourth, and fifth...) it becomes more
difficult to know which configuration/monitor's positions should
"overlay" which other configuration/monitor's positions.  For now we
just lump the third+ monitor's configuration at the "other" level, and
hopefully that will work well enough.

Things that aren't done yet:

* Migration code: the old configuration for icon placement is just
  ignored right now.  I need to figure out a decent way to migrate the
  configuration from old to new.
* A configuration "editor": I probably won't write a full-blown editor,
  but will at least build a UI into the settings dialog (perhaps hidden
  behind an "Advanced" button) to users can manually reassign
  configurations to monitors, and delete configurations they don't care
  about anymore.
parent 3521123b
No related branches found
No related tags found
1 merge request!126Use a separate XfceDesktop widget/window per monitor
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment