~darkxst/ubuntu/saucy/gnome-shell/upstart_log

« back to all changes in this revision

Viewing changes to js/ui/workspaceSwitcherPopup.js

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-31 12:01:12 UTC
  • mfrom: (1.1.49) (19.1.36 experimental)
  • Revision ID: package-import@ubuntu.com-20130531120112-ew91khxf051x9i2r
Tags: 3.8.2-1ubuntu1
* Merge with Debian (LP: #1185869, #1185721). Remaining changes:
  - debian/control.in:
    + Build-depend on libsystemd-login-dev & libsystemd-daemon-dev
    + Depend on gdm instead of gdm3
    + Don't recommend gnome-session-fallback
  - debian/patches/40_change-pam-name-to-match-gdm.patch:
  - debian/patches/revert-suspend-break.patch:
    + Disabled, not needed on Ubuntu
  - debian/patches/ubuntu-lightdm-user-switching.patch:
    + Allow user switching when using LightDM. Thanks Gerhard Stein
      for rebasing against gnome-shell 3.8!
  - debian/patches/ubuntu_lock_on_suspend.patch
    + Respect Ubuntu's lock-on-suspend setting.
      Disabled until it can be rewritten.
  - debian/patches/git_relock_screen_after_crash.patch:
    + Add Upstream fix for unlocked session after crash (LP: #1064584)
* Note that the new GNOME Classic mode (which requires installing
  gnome-shell-extensions) won't work until gnome-session 3.8 is
  available in Ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
 
56
56
    _getPreferredHeight : function (actor, forWidth, alloc) {
57
57
        let children = this._list.get_children();
58
 
        let primary = Main.layoutManager.primaryMonitor;
 
58
        let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
59
59
 
60
 
        let availHeight = primary.height;
61
 
        availHeight -= Main.panel.actor.height;
 
60
        let availHeight = workArea.height;
62
61
        availHeight -= this.actor.get_theme_node().get_vertical_padding();
63
62
        availHeight -= this._container.get_theme_node().get_vertical_padding();
64
63
        availHeight -= this._list.get_theme_node().get_vertical_padding();
67
66
        for (let i = 0; i < children.length; i++) {
68
67
            let [childMinHeight, childNaturalHeight] = children[i].get_preferred_height(-1);
69
68
            let [childMinWidth, childNaturalWidth] = children[i].get_preferred_width(childNaturalHeight);
70
 
            height += childNaturalHeight * primary.width / primary.height;
 
69
            height += childNaturalHeight * workArea.width / workArea.height;
71
70
        }
72
71
 
73
72
        let spacing = this._itemSpacing * (global.screen.n_workspaces - 1);
81
80
    },
82
81
 
83
82
    _getPreferredWidth : function (actor, forHeight, alloc) {
84
 
        let primary = Main.layoutManager.primaryMonitor;
85
 
        this._childWidth = Math.round(this._childHeight * primary.width / primary.height);
 
83
        let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
 
84
        this._childWidth = Math.round(this._childHeight * workArea.width / workArea.height);
86
85
 
87
86
        alloc.min_size = this._childWidth;
88
87
        alloc.natural_size = this._childWidth;
122
121
 
123
122
        }
124
123
 
125
 
        let primary = Main.layoutManager.primaryMonitor;
 
124
        let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
126
125
        let [containerMinHeight, containerNatHeight] = this._container.get_preferred_height(global.screen_width);
127
126
        let [containerMinWidth, containerNatWidth] = this._container.get_preferred_width(containerNatHeight);
128
 
        this._container.x = primary.x + Math.floor((primary.width - containerNatWidth) / 2);
129
 
        this._container.y = primary.y + Main.panel.actor.height +
130
 
                            Math.floor(((primary.height - Main.panel.actor.height) - containerNatHeight) / 2);
 
127
        this._container.x = workArea.x + Math.floor((workArea.width - containerNatWidth) / 2);
 
128
        this._container.y = workArea.y + Math.floor((workArea.height - containerNatHeight) / 2);
131
129
    },
132
130
 
133
131
    _show : function() {