Date: Thursday, March 16, 2017 @ 06:50:06
  Author: felixonmars
Revision: 216604

upgpkg: deepin-wm 1.9.7-2

Added:
  deepin-wm/trunk/switcher-fix.patch
Modified:
  deepin-wm/trunk/PKGBUILD

--------------------+
 PKGBUILD           |   16 ++++++++-----
 switcher-fix.patch |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2017-03-16 06:49:50 UTC (rev 216603)
+++ PKGBUILD    2017-03-16 06:50:06 UTC (rev 216604)
@@ -5,7 +5,7 @@
 
 pkgname=deepin-wm
 pkgver=1.9.7
-pkgrel=1
+pkgrel=2
 pkgdesc='Deepin Window Manager'
 arch=('i686' 'x86_64')
 url="https://github.com/linuxdeepin/deepin-wm";
@@ -13,16 +13,20 @@
 depends=('bamf' 'clutter-gtk' 'deepin-desktop-schemas' 'granite'
          'deepin-mutter' 'gnome-desktop' 'libgee')
 makedepends=('gnome-common' 'intltool' 'vala' 'git')
-source=("git+https://cr.deepin.io/deepin-wm.git#tag=$pkgver";)
-sha256sums=('SKIP')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-wm/archive/$pkgver.tar.gz";
+        switcher-fix.patch)
+sha512sums=('f2664d7fdd23e1824e6575ec5ae7051cd70eec7785ea4d16bdad1e8c9c84e6363180d5b4266666c92ad1073637fe4859398eec58e4738215eb8f39cc057806c1'
+            
'ad798edea74e9e985a4f286fb0a43dfaf00cd7d642af6214b706613abbd1e920517dccec2e728ed44d2ab43d7c4fb325f05fce20053462c5e553ab98bb7ec070')
 
 prepare() {
-  cd "${pkgname}"
+  cd $pkgname-$pkgver
+  patch -p1 -i ../switcher-fix.patch
+
   export CFLAGS="$CFLAGS -DWNCK_I_KNOW_THIS_IS_UNSTABLE"
 }
 
 build() {
-  cd "${pkgname}"
+  cd $pkgname-$pkgver
   ./autogen.sh \
     --prefix='/usr' \
     --disable-schemas-compile
@@ -30,6 +34,6 @@
 }
 
 package() {
-  cd "${pkgname}"
+  cd $pkgname-$pkgver
   make DESTDIR="${pkgdir}" install
 }

Added: switcher-fix.patch
===================================================================
--- switcher-fix.patch                          (rev 0)
+++ switcher-fix.patch  2017-03-16 06:50:06 UTC (rev 216604)
@@ -0,0 +1,62 @@
+From 618814966d67a2681999e1d7391ffac6114d5366 Mon Sep 17 00:00:00 2001
+From: Sian Cao <yinshui...@gmail.com>
+Date: Thu, 16 Mar 2017 10:04:39 +0800
+Subject: [PATCH] winswitcher: Counting tabbing
+
+Use counter to differentiate holding from tabbing
+
+Change-Id: Ia20943a84fd1a67d4937c93e0dc8e2b4f441f04c
+---
+ src/Deepin/DeepinWindowSwitcher.vala | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/src/Deepin/DeepinWindowSwitcher.vala 
b/src/Deepin/DeepinWindowSwitcher.vala
+index e1deb0b..3a80c21 100644
+--- a/src/Deepin/DeepinWindowSwitcher.vala
++++ b/src/Deepin/DeepinWindowSwitcher.vala
+@@ -26,7 +26,8 @@ namespace Gala
+               const int POPUP_DELAY_TIMEOUT = 150;
+ 
+               // milliseconds, repeat key pressing minimum delta
+-              const int MIN_DELTA = 400;
++              const int TAB_MIN_DELTA = 100;
++              const int HOLDING_MIN_DELTA = 400;
+ 
+               // time after popup shown
+               const int POPUP_SCREEN_PADDING = 40;
+@@ -50,6 +51,7 @@ namespace Gala
+ 
+               uint modifier_mask;
+               int64 last_switch_time = 0;
++        int holding_count = 0;
+               bool closing = false;
+               ModalProxy modal_proxy;
+ 
+@@ -294,8 +296,9 @@ namespace Gala
+               {
+                       if ((get_current_modifiers () & modifier_mask) == 0) {
+                               close (event.time);
+-                      }
++            }
+ 
++            holding_count = 0;
+                       return true;
+               }
+ 
+@@ -315,10 +318,13 @@ namespace Gala
+             if ((wm as WindowManagerGala).hiding_windows) 
+                 return;
+ 
++            holding_count++;
+                       var now = get_monotonic_time () / 1000;
+-                      if (now - last_switch_time < MIN_DELTA) {
+-                              return;
+-                      }
++                      if (holding_count > 1 && now - last_switch_time < 
HOLDING_MIN_DELTA) {
++                return;
++                      } else if (holding_count <= 1 && now - last_switch_time 
< TAB_MIN_DELTA) {
++                return;
++            }
+ 
+                       // if we were still closing while the next invocation 
comes in, we need to cleanup
+                       // things right away

Reply via email to