r31317 - in /packages/experimental/gnome-shell-extensions/debian: changelog patches/fix_alternate-tab_661281.diff patches/series

maniac-guest at users.alioth.debian.org maniac-guest at users.alioth.debian.org
Sat Nov 12 16:23:58 UTC 2011


Author: maniac-guest
Date: Sat Nov 12 16:23:56 2011
New Revision: 31317

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=31317
Log:
Add patch to fix alternate-tab from 661281 bug report.

Added:
    packages/experimental/gnome-shell-extensions/debian/patches/fix_alternate-tab_661281.diff
Modified:
    packages/experimental/gnome-shell-extensions/debian/changelog
    packages/experimental/gnome-shell-extensions/debian/patches/series

Modified: packages/experimental/gnome-shell-extensions/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell-extensions/debian/changelog?rev=31317&op=diff
==============================================================================
--- packages/experimental/gnome-shell-extensions/debian/changelog [utf-8] (original)
+++ packages/experimental/gnome-shell-extensions/debian/changelog [utf-8] Sat Nov 12 16:23:56 2011
@@ -25,6 +25,7 @@
       systemMonitor: Properly enable/disable
   * debian/patches
     - fix_dock_gnome-shell_version.diff
+    - fix_alternate-tab_661281.diff
   * debian/rules
     - EXTENSIONS_ENABLED, EXTENSIONS_DISABLED variables
     - disabled xrandr-indicator
@@ -39,4 +40,4 @@
   * debian/rules:
     - Include gnome-get-source.mk.
 
- -- Victor Seva <linuxmaniac at torreviejawireless.org>  Sat, 12 Nov 2011 13:51:35 +0100
+ -- Victor Seva <linuxmaniac at torreviejawireless.org>  Sat, 12 Nov 2011 17:07:04 +0100

Added: packages/experimental/gnome-shell-extensions/debian/patches/fix_alternate-tab_661281.diff
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell-extensions/debian/patches/fix_alternate-tab_661281.diff?rev=31317&op=file
==============================================================================
--- packages/experimental/gnome-shell-extensions/debian/patches/fix_alternate-tab_661281.diff (added)
+++ packages/experimental/gnome-shell-extensions/debian/patches/fix_alternate-tab_661281.diff [utf-8] Sat Nov 12 16:23:56 2011
@@ -1,0 +1,144 @@
+From 37c96f6a8a6898c56c633c3a0e158e5b5ecd774b Mon Sep 17 00:00:00 2001
+From: Joachim Bargsten <jw at bargsten.org>
+Date: Tue, 4 Oct 2011 00:40:59 +0200
+Subject: [PATCH 1/3] alternate-tab: workspace and icons part 3.2 ready
+
+The workspace and icons switcher is now gnome 3.2 ready.
+--- a/extensions/alternate-tab/extension.js
++++ b/extensions/alternate-tab/extension.js
+@@ -23,21 +23,26 @@
+ const _ = Gettext.gettext;
+ const N_ = function(e) { return e };
+ 
+-const POPUP_FADE_TIME = 0.1; // seconds
++const POPUP_DELAY_TIMEOUT = 150; // milliseconds
+ 
+ const SETTINGS_SCHEMA = 'org.gnome.shell.extensions.alternate-tab';
+ const SETTINGS_BEHAVIOUR_KEY = 'behaviour';
+ const SETTINGS_FIRST_TIME_KEY = 'first-time';
+ 
+ const MODES = {
+-    native: function() {
+-            Main.wm._startAppSwitcher();
++    native: function(shellwm, binding, mask, window, backwards) {
++            shellwm._startAppSwitcher(shellwm, binding, mask, window, backwards);
+     },
+     all_thumbnails: function() {
+             new AltTabPopup2();
+     },
+-    workspace_icons: function() {
+-            new AltTabPopupW().show();
++    workspace_icons: function(shellwm, binding, mask, window, backwards) {
++        if (shellwm._workspaceSwitcherPopup != null)
++            shellwm._workspaceSwitcherPopup.actor.hide();
++
++        let tabPopup = new AltTabPopupW();
++        if (!tabPopup.show(backwards, binding, mask))
++            tabPopup.destroy();
+     }
+ };
+ 
+@@ -68,7 +73,9 @@
+ AltTabPopupW.prototype = {
+     __proto__ : AltTab.AltTabPopup.prototype,
+ 
+-    show : function(backward, switch_group) {
++    _windowActivated : function(thumbnailList, n) { },
++
++    show : function(backward, binding, mask) {
+         let appSys = Shell.AppSystem.get_default();
+         let apps = appSys.get_running ();
+ 
+@@ -78,6 +85,7 @@
+         if (!Main.pushModal(this.actor))
+             return false;
+         this._haveModal = true;
++        this._modifierMask = AltTab.primaryModifier(mask);
+ 
+         this.actor.connect('key-press-event', Lang.bind(this, this._keyPressEvent));
+         this.actor.connect('key-release-event', Lang.bind(this, this._keyReleaseEvent));
+@@ -92,16 +100,22 @@
+ 
+         this._appIcons = this._appSwitcher.icons;
+ 
++        // Need to force an allocation so we can figure out whether we
++        // need to scroll when selecting
++        this.actor.opacity = 0;
++        this.actor.show();
++        this.actor.get_allocation_box();
++
+         // Make the initial selection
+-        if (switch_group) {
+-            if (backward) {
+-                this._select(0, this._appIcons[0].cachedWindows.length - 1);
+-            } else {
+-                if (this._appIcons[0].cachedWindows.length > 1)
+-                    this._select(0, 1);
+-                else
+-                    this._select(0, 0);
+-            }
++        if (binding == 'switch_group') {
++            //see AltTab.AltTabPopup.show function
++            //cached windows are always of length one, so select first app and the window
++            //the direction doesn't matter, so ignore backward
++            this._select(0, 0);
++        } else if (binding == 'switch_group_backward') {
++            this._select(0, 0);
++        } else if (binding == 'switch_windows_backward') {
++            this._select(this._appIcons.length - 1);
+         } else if (this._appIcons.length == 1) {
+             this._select(0);
+         } else if (backward) {
+@@ -110,24 +124,25 @@
+             this._select(1);
+         }
+ 
++
+         // There's a race condition; if the user released Alt before
+         // we got the grab, then we won't be notified. (See
+         // https://bugzilla.gnome.org/show_bug.cgi?id=596695 for
+         // details.) So we check now. (Have to do this after updating
+         // selection.)
+         let [x, y, mods] = global.get_pointer();
+-        if (!(mods & Gdk.ModifierType.MOD1_MASK)) {
++        if (!(mods & this._modifierMask)) {
+             this._finish();
+             return false;
+         }
+ 
+-        this.actor.opacity = 0;
+-        this.actor.show();
+-        Tweener.addTween(this.actor,
+-                         { opacity: 255,
+-                           time: POPUP_FADE_TIME,
+-                           transition: 'easeOutQuad'
+-                         });
++        // We delay showing the popup so that fast Alt+Tab users aren't
++        // disturbed by the popup briefly flashing.
++        this._initialDelayTimeoutId = Mainloop.timeout_add(POPUP_DELAY_TIMEOUT,
++                                                           Lang.bind(this, function () {
++                                                               this.actor.opacity = 255;
++                                                               this._initialDelayTimeoutId = 0;
++                                                           }));
+ 
+         return true;
+     },
+@@ -545,15 +560,16 @@
+     imports.gettext.bindtextdomain('gnome-shell-extensions', metadata.localedir);
+ }
+ 
+-function doAltTab(shellwm, binding, window, backwards) {
++function doAltTab(shellwm, binding, mask, window, backwards) {
+     let settings = new Gio.Settings({ schema: SETTINGS_SCHEMA });
+ 
++
+     if(settings.get_boolean(SETTINGS_FIRST_TIME_KEY)) {
+         new AltTabSettingsDialog().open();
+     } else {
+         let behaviour = settings.get_string(SETTINGS_BEHAVIOUR_KEY);
+         if(behaviour in MODES) {
+-            MODES[behaviour](binding, backwards);
++            MODES[behaviour](shellwm, binding, mask, window, backwards);
+         }
+     }
+ }

Modified: packages/experimental/gnome-shell-extensions/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gnome-shell-extensions/debian/patches/series?rev=31317&op=diff
==============================================================================
--- packages/experimental/gnome-shell-extensions/debian/patches/series [utf-8] (original)
+++ packages/experimental/gnome-shell-extensions/debian/patches/series [utf-8] Sat Nov 12 16:23:56 2011
@@ -3,3 +3,4 @@
 upstream/patch_4c5a36e4c0cbe38f2e26b6b3c8b02e88b4b939f7.diff
 upstream/patch_2bba98d6214cffae2eb5cecb9d7c1f6b6d244052.diff
 fix_dock_gnome-shell_version.diff
+fix_alternate-tab_661281.diff




More information about the pkg-gnome-commits mailing list