~jbicha/ubuntu/oneiric/gnome-shell/oneiric-3.2.2.1

« back to all changes in this revision

Viewing changes to js/ui/windowManager.js

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2011-09-07 09:09:05 UTC
  • mfrom: (1.1.29 upstream)
  • Revision ID: package-import@ubuntu.com-20110907090905-kbo4fewcg12zt99u
Tags: 3.1.90.1-0ubuntu1
* New upstream release.
* debian/control: Bump build-depends on new mutter
* debian/patches/01_favorite_apps.patch: Updated
* debian/patches/03_remove-glx-dependency-on-armel.patch: Refreshed
* debian/patches/04_build-without-caribou.patch
  - Build without caribou since Ubuntu uses onboard and our System 
    Settings doesn't support choosing a different screen keyboard yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
239
239
    _hasAttachedDialogs: function(window, ignoreWindow) {
240
240
        var count = 0;
241
241
        window.foreach_transient(function(win) {
242
 
            if (win != ignoreWindow && win.get_window_type() == Meta.WindowType.MODAL_DIALOG)
 
242
            if (win != ignoreWindow && win.is_attached_dialog())
243
243
                count++;
244
244
            return false;
245
245
        });
247
247
    },
248
248
 
249
249
    _checkDimming: function(window, ignoreWindow) {
250
 
        let shouldDim = Meta.prefs_get_attach_modal_dialogs() && this._hasAttachedDialogs(window, ignoreWindow);
 
250
        let shouldDim = this._hasAttachedDialogs(window, ignoreWindow);
251
251
 
252
252
        if (shouldDim && !window._dimmed) {
253
253
            window._dimmed = true;
309
309
 
310
310
            actor._windowType = type;
311
311
        }));
312
 
        if (actor.meta_window.get_window_type() == Meta.WindowType.MODAL_DIALOG
313
 
            && Meta.prefs_get_attach_modal_dialogs()
314
 
            && actor.get_meta_window().get_transient_for()) {
 
312
        if (actor.meta_window.is_attached_dialog()) {
315
313
            this._checkDimming(actor.get_meta_window().get_transient_for());
316
314
            if (this._shouldAnimate()) {
317
315
                actor.set_scale(1.0, 0.0);
373
371
 
374
372
    _destroyWindow : function(shellwm, actor) {
375
373
        let window = actor.meta_window;
376
 
        let parent = window.get_transient_for();
377
374
        if (actor._notifyWindowTypeSignalId) {
378
375
            window.disconnect(actor._notifyWindowTypeSignalId);
379
376
            actor._notifyWindowTypeSignalId = 0;
383
380
                                                                 return win != window;
384
381
                                                             });
385
382
        }
386
 
        while (window.get_window_type() == Meta.WindowType.MODAL_DIALOG
387
 
               && parent) {
 
383
        if (window.is_attached_dialog()) {
 
384
            let parent = window.get_transient_for();
388
385
            this._checkDimming(parent, window);
389
 
            if (!Meta.prefs_get_attach_modal_dialogs()
390
 
                || !this._shouldAnimate())
391
 
                break;
 
386
            if (!this._shouldAnimate()) {
 
387
                shellwm.completed_destroy(actor);
 
388
                return;
 
389
            }
 
390
 
392
391
            actor.set_scale(1.0, 1.0);
393
392
            actor.show();
394
393
            this._destroying.push(actor);