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
Showing
- .gitignore 2 additions, 0 deletions.gitignore
- common/xfdesktop-marshal.list 1 addition, 1 deletioncommon/xfdesktop-marshal.list
- src/Makefile.am 14 additions, 0 deletionssrc/Makefile.am
- src/main.c 8 additions, 0 deletionssrc/main.c
- src/meson.build 9 additions, 0 deletionssrc/meson.build
- src/xfdesktop-file-icon-manager.c 464 additions, 407 deletionssrc/xfdesktop-file-icon-manager.c
- src/xfdesktop-file-icon-model-filter.c 63 additions, 8 deletionssrc/xfdesktop-file-icon-model-filter.c
- src/xfdesktop-file-icon-model-filter.h 4 additions, 0 deletionssrc/xfdesktop-file-icon-model-filter.h
- src/xfdesktop-file-icon-model.c 7 additions, 5 deletionssrc/xfdesktop-file-icon-model.c
- src/xfdesktop-icon.c 39 additions, 11 deletionssrc/xfdesktop-icon.c
- src/xfdesktop-icon.h 8 additions, 3 deletionssrc/xfdesktop-icon.h
- src/xfdesktop-monitor-chooser-ui.glade 151 additions, 0 deletionssrc/xfdesktop-monitor-chooser-ui.glade
- src/xfdesktop-monitor-chooser-ui.gresource.xml 6 additions, 0 deletionssrc/xfdesktop-monitor-chooser-ui.gresource.xml
Loading