···227227228228 crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f];
229229230230- # List difference, xs - ys. Removes elements of ys from xs.
231231- difference = xs: ys: filter (y: !(builtins.elem y ys)) xs;
232230}
+4
nixos/modules/config/system-path.nix
···135135 if [ -x $out/bin/glib-compile-schemas -a -w $out/share/glib-2.0/schemas ]; then
136136 $out/bin/glib-compile-schemas $out/share/glib-2.0/schemas
137137 fi
138138+139139+ if [ -x $out/bin/update-desktop-database -a -w $out/share/applications ]; then
140140+ $out/bin/update-desktop-database $out/share/applications
141141+ fi
138142 '';
139143 };
140144
···11+commit 831bd07b0d6b7055fea8317f2cdf8fd4a408c36d
22+Author: Jasper St. Pierre <jstpierre@mecheye.net>
33+Date: Thu Nov 7 17:14:47 2013 -0500
44+55+ layout: Fix several issues with the background management code
66+77+ If monitor-changed fires at startup, it will destroy all of the
88+ backgrounds, but since this._isStartup is true, won't recreate any
99+ of them. Additionally, since _bgManagers is indexed by monitor index,
1010+ if the primary index is not 0, it could become a sparse array (e.g.
1111+ [undefined, undefined, primaryBackground]), and our for loop will
1212+ crash trying to access properties of undefined.
1313+1414+ Fix both of these issues by always creating background managers for
1515+ every monitor, hiding them on startup but only showing them after
1616+ the startup animation is complete.
1717+1818+ One thing we need to watch out for is that while LayoutManager is
1919+ constructing, Main.uiGroup / Main.layoutManager will be undefined,
2020+ so addBackgroundMenu will fail. Fix this by passing down the uiGroup
2121+ to the background menu code.
2222+2323+ https://bugzilla.gnome.org/show_bug.cgi?id=709313
2424+2525+diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js
2626+index 06e698c..dcbbb39 100644
2727+--- a/js/ui/backgroundMenu.js
2828++++ b/js/ui/backgroundMenu.js
2929+@@ -13,7 +13,7 @@ const BackgroundMenu = new Lang.Class({
3030+ Name: 'BackgroundMenu',
3131+ Extends: PopupMenu.PopupMenu,
3232+3333+- _init: function(source) {
3434++ _init: function(source, layoutManager) {
3535+ this.parent(source, 0, St.Side.TOP);
3636+3737+ this.addSettingsAction(_("Settings"), 'gnome-control-center.desktop');
3838+@@ -22,17 +22,17 @@ const BackgroundMenu = new Lang.Class({
3939+4040+ this.actor.add_style_class_name('background-menu');
4141+4242+- Main.uiGroup.add_actor(this.actor);
4343++ layoutManager.uiGroup.add_actor(this.actor);
4444+ this.actor.hide();
4545+ }
4646+ });
4747+4848+-function addBackgroundMenu(actor) {
4949++function addBackgroundMenu(actor, layoutManager) {
5050+ let cursor = new St.Bin({ opacity: 0 });
5151+- Main.uiGroup.add_actor(cursor);
5252++ layoutManager.uiGroup.add_actor(cursor);
5353+5454+ actor.reactive = true;
5555+- actor._backgroundMenu = new BackgroundMenu(cursor);
5656++ actor._backgroundMenu = new BackgroundMenu(cursor, layoutManager);
5757+ actor._backgroundManager = new PopupMenu.PopupMenuManager({ actor: actor });
5858+ actor._backgroundManager.addMenu(actor._backgroundMenu);
5959+6060+diff --git a/js/ui/layout.js b/js/ui/layout.js
6161+index 17073a6..80bae9d 100644
6262+--- a/js/ui/layout.js
6363++++ b/js/ui/layout.js
6464+@@ -352,26 +352,26 @@ const LayoutManager = new Lang.Class({
6565+ this.emit('hot-corners-changed');
6666+ },
6767+6868+- _createBackground: function(monitorIndex) {
6969++ _addBackgroundMenu: function(bgManager) {
7070++ BackgroundMenu.addBackgroundMenu(bgManager.background.actor, this);
7171++ },
7272++
7373++ _createBackgroundManager: function(monitorIndex) {
7474+ let bgManager = new Background.BackgroundManager({ container: this._backgroundGroup,
7575+ layoutManager: this,
7676+ monitorIndex: monitorIndex });
7777+- BackgroundMenu.addBackgroundMenu(bgManager.background.actor);
7878+-
7979+- bgManager.connect('changed', Lang.bind(this, function() {
8080+- BackgroundMenu.addBackgroundMenu(bgManager.background.actor);
8181+- }));
8282+8383+- this._bgManagers[monitorIndex] = bgManager;
8484++ bgManager.connect('changed', Lang.bind(this, this._addBackgroundMenu));
8585++ this._addBackgroundMenu(bgManager);
8686+8787+- return bgManager.background;
8888++ return bgManager;
8989+ },
9090+9191+- _createSecondaryBackgrounds: function() {
9292++ _showSecondaryBackgrounds: function() {
9393+ for (let i = 0; i < this.monitors.length; i++) {
9494+ if (i != this.primaryIndex) {
9595+- let background = this._createBackground(i);
9696+-
9797++ let background = this._bgManagers[i].background;
9898++ background.actor.show();
9999+ background.actor.opacity = 0;
100100+ Tweener.addTween(background.actor,
101101+ { opacity: 255,
102102+@@ -381,10 +381,6 @@ const LayoutManager = new Lang.Class({
103103+ }
104104+ },
105105+106106+- _createPrimaryBackground: function() {
107107+- this._createBackground(this.primaryIndex);
108108+- },
109109+-
110110+ _updateBackgrounds: function() {
111111+ let i;
112112+ for (i = 0; i < this._bgManagers.length; i++)
113113+@@ -395,11 +391,12 @@ const LayoutManager = new Lang.Class({
114114+ if (Main.sessionMode.isGreeter)
115115+ return;
116116+117117+- if (this._startingUp)
118118+- return;
119119+-
120120+ for (let i = 0; i < this.monitors.length; i++) {
121121+- this._createBackground(i);
122122++ let bgManager = this._createBackgroundManager(i);
123123++ this._bgManagers.push(bgManager);
124124++
125125++ if (i != this.primaryIndex && this._startingUp)
126126++ bgManager.background.actor.hide();
127127+ }
128128+ },
129129+130130+@@ -595,7 +592,7 @@ const LayoutManager = new Lang.Class({
131131+ if (Main.sessionMode.isGreeter) {
132132+ this.panelBox.translation_y = -this.panelBox.height;
133133+ } else {
134134+- this._createPrimaryBackground();
135135++ this._updateBackgrounds();
136136+137137+ // We need to force an update of the regions now before we scale
138138+ // the UI group to get the coorect allocation for the struts.
139139+@@ -673,7 +670,7 @@ const LayoutManager = new Lang.Class({
140140+ this.keyboardBox.show();
141141+142142+ if (!Main.sessionMode.isGreeter) {
143143+- this._createSecondaryBackgrounds();
144144++ this._showSecondaryBackgrounds();
145145+ global.window_group.remove_clip();
146146+ }
147147+