appDisplay: Constrain dialog to primary display

Much like the overview controls themselves are tied to the
primary display, constrain the folder dialog to the primary
display as well.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
This commit is contained in:
Georges Basile Stavracas Neto 2020-06-04 01:37:48 -03:00
parent d8e6f654a3
commit 3a53b25873

View File

@ -8,6 +8,7 @@ const AppFavorites = imports.ui.appFavorites;
const DND = imports.ui.dnd; const DND = imports.ui.dnd;
const GrabHelper = imports.ui.grabHelper; const GrabHelper = imports.ui.grabHelper;
const IconGrid = imports.ui.iconGrid; const IconGrid = imports.ui.iconGrid;
const Layout = imports.ui.layout;
const Main = imports.ui.main; const Main = imports.ui.main;
const PageIndicators = imports.ui.pageIndicators; const PageIndicators = imports.ui.pageIndicators;
const ParentalControlsManager = imports.misc.parentalControlsManager; const ParentalControlsManager = imports.misc.parentalControlsManager;
@ -1434,6 +1435,11 @@ var AppFolderDialog = GObject.registerClass({
y_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.CENTER,
}); });
this.add_constraint(new Layout.MonitorConstraint({
primary: true,
work_area: true,
}));
this._source = source; this._source = source;
this._folder = folder; this._folder = folder;
this._view = source.view; this._view = source.view;