[gnome-shell] modalDialog: constrain container to the size of the stage



commit 133b854f1bb657df55b709cad6df3e8ce103765d
Author: Maxim Ermilov <zaspire rambler ru>
Date:   Thu Mar 17 01:57:05 2011 +0300

    modalDialog: constrain container to the size of the stage
    
    The lightbox will be sized to the size of its parent container,
    so we need to make the parent container reliably the size of the
    stage, instead of letting it be auto-sized to the size of its contents.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644889

 js/ui/modalDialog.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js
index cba0b72..4b891f5 100644
--- a/js/ui/modalDialog.js
+++ b/js/ui/modalDialog.js
@@ -45,6 +45,11 @@ ModalDialog.prototype = {
                                      x: 0,
                                      y: 0 });
         Main.uiGroup.add_actor(this._group);
+
+        let constraint = new Clutter.BindConstraint({ source: global.stage,
+                                                      coordinate: Clutter.BindCoordinate.POSITION | Clutter.BindCoordinate.SIZE });
+        this._group.add_constraint(constraint);
+
         global.focus_manager.add_group(this._group);
         this._initialKeyFocus = this._group;
         this._savedKeyFocus = null;



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