[gnome-shell/gbsneto/folder-dialog-improvements: 4/20] appDisplay: Constrain dialog to primary display



commit 3a53b25873deb2d6ad83ea43fad4a4bec53fdffb
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Jun 4 01:37:48 2020 -0300

    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

 js/ui/appDisplay.js | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index ef36f8b675..3400ce1786 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -8,6 +8,7 @@ const AppFavorites = imports.ui.appFavorites;
 const DND = imports.ui.dnd;
 const GrabHelper = imports.ui.grabHelper;
 const IconGrid = imports.ui.iconGrid;
+const Layout = imports.ui.layout;
 const Main = imports.ui.main;
 const PageIndicators = imports.ui.pageIndicators;
 const ParentalControlsManager = imports.misc.parentalControlsManager;
@@ -1434,6 +1435,11 @@ var AppFolderDialog = GObject.registerClass({
             y_align: Clutter.ActorAlign.CENTER,
         });
 
+        this.add_constraint(new Layout.MonitorConstraint({
+            primary: true,
+            work_area: true,
+        }));
+
         this._source = source;
         this._folder = folder;
         this._view = source.view;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]