[arch-commits] Commit in gnome-shell/repos (5 files)

Jan Steffens heftig at archlinux.org
Fri Aug 2 10:07:39 UTC 2019


    Date: Friday, August 2, 2019 @ 10:07:38
  Author: heftig
Revision: 358885

archrelease: copy trunk to testing-x86_64

Added:
  gnome-shell/repos/testing-x86_64/
  gnome-shell/repos/testing-x86_64/0001-js-ui-Use-captured-event-nonmotion.patch
    (from rev 358884, gnome-shell/trunk/0001-js-ui-Use-captured-event-nonmotion.patch)
  gnome-shell/repos/testing-x86_64/0001-tweener-Remove-handlers-on-target.patch
    (from rev 358884, gnome-shell/trunk/0001-tweener-Remove-handlers-on-target.patch)
  gnome-shell/repos/testing-x86_64/PKGBUILD
    (from rev 358884, gnome-shell/trunk/PKGBUILD)
  gnome-shell/repos/testing-x86_64/gnome-shell.install
    (from rev 358884, gnome-shell/trunk/gnome-shell.install)

-----------------------------------------------+
 0001-js-ui-Use-captured-event-nonmotion.patch |   87 ++++++++++++++++++++
 0001-tweener-Remove-handlers-on-target.patch  |  101 ++++++++++++++++++++++++
 PKGBUILD                                      |   63 ++++++++++++++
 gnome-shell.install                           |    7 +
 4 files changed, 258 insertions(+)

Copied: gnome-shell/repos/testing-x86_64/0001-js-ui-Use-captured-event-nonmotion.patch (from rev 358884, gnome-shell/trunk/0001-js-ui-Use-captured-event-nonmotion.patch)
===================================================================
--- testing-x86_64/0001-js-ui-Use-captured-event-nonmotion.patch	                        (rev 0)
+++ testing-x86_64/0001-js-ui-Use-captured-event-nonmotion.patch	2019-08-02 10:07:38 UTC (rev 358885)
@@ -0,0 +1,87 @@
+From 81c17e5993001cf30d706642d67e09812136adf2 Mon Sep 17 00:00:00 2001
+From: Daniel van Vugt <daniel.van.vugt at canonical.com>
+Date: Fri, 2 Nov 2018 17:58:37 +0800
+Subject: [PATCH] js/ui: Use captured-event::nonmotion
+
+Cherry picked from commit 297a18f29a423da26fd86417e6c1fe82349d8f98.
+
+This new detail filters out mouse motion events so we don't waste CPU
+translating them all into JavaScript handlers that don't care about them.
+
+This helps with https://gitlab.gnome.org/GNOME/mutter/issues/283
+---
+ js/ui/padOsd.js        | 2 +-
+ js/ui/panel.js         | 2 +-
+ js/ui/status/system.js | 2 +-
+ js/ui/viewSelector.js  | 2 +-
+ js/ui/windowManager.js | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js
+index a4af47297..6bff40849 100644
+--- a/js/ui/padOsd.js
++++ b/js/ui/padOsd.js
+@@ -615,7 +615,7 @@ var PadOsd = class {
+         this._settings = settings;
+         this._imagePath = imagePath;
+         this._editionMode = editionMode;
+-        this._capturedEventId = global.stage.connect('captured-event', this._onCapturedEvent.bind(this));
++        this._capturedEventId = global.stage.connect('captured-event::nonmotion', this._onCapturedEvent.bind(this));
+         this._padChooser = null;
+ 
+         let deviceManager = Clutter.DeviceManager.get_default();
+diff --git a/js/ui/panel.js b/js/ui/panel.js
+index 16484850a..57f0778b1 100644
+--- a/js/ui/panel.js
++++ b/js/ui/panel.js
+@@ -473,7 +473,7 @@ class ActivitiesButton extends PanelMenu.Button {
+ 
+         this.actor.label_actor = this._label;
+ 
+-        this.actor.connect('captured-event', this._onCapturedEvent.bind(this));
++        this.actor.connect('captured-event::nonmotion', this._onCapturedEvent.bind(this));
+         this.actor.connect_after('key-release-event', this._onKeyRelease.bind(this));
+ 
+         Main.overview.connect('showing', () => {
+diff --git a/js/ui/status/system.js b/js/ui/status/system.js
+index 1b0d10d8c..b25a6bf32 100644
+--- a/js/ui/status/system.js
++++ b/js/ui/status/system.js
+@@ -23,7 +23,7 @@ var AltSwitcher = class {
+             this._alternate.connect('clicked',
+                                     () => { this._clickAction.release(); });
+ 
+-        this._capturedEventId = global.stage.connect('captured-event', this._onCapturedEvent.bind(this));
++        this._capturedEventId = global.stage.connect('captured-event::nonmotion', this._onCapturedEvent.bind(this));
+ 
+         this._flipped = false;
+ 
+diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
+index 77146552d..092ff8f1c 100644
+--- a/js/ui/viewSelector.js
++++ b/js/ui/viewSelector.js
+@@ -44,7 +44,7 @@ function getTermsForSearchString(searchString) {
+ 
+ var TouchpadShowOverviewAction = class {
+     constructor(actor) {
+-        actor.connect('captured-event', this._handleEvent.bind(this));
++        actor.connect('captured-event::nonmotion', this._handleEvent.bind(this));
+     }
+ 
+     _handleEvent(actor, event) {
+diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
+index b9f5fef46..97d980940 100644
+--- a/js/ui/windowManager.js
++++ b/js/ui/windowManager.js
+@@ -461,7 +461,7 @@ var TouchpadWorkspaceSwitchAction = class {
+         this._dx = 0;
+         this._dy = 0;
+         this._enabled = true;
+-        actor.connect('captured-event', this._handleEvent.bind(this));
++        actor.connect('captured-event::nonmotion', this._handleEvent.bind(this));
+ 	this._touchpadSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.peripherals.touchpad'});
+     }
+ 
+-- 
+2.22.0
+

Copied: gnome-shell/repos/testing-x86_64/0001-tweener-Remove-handlers-on-target.patch (from rev 358884, gnome-shell/trunk/0001-tweener-Remove-handlers-on-target.patch)
===================================================================
--- testing-x86_64/0001-tweener-Remove-handlers-on-target.patch	                        (rev 0)
+++ testing-x86_64/0001-tweener-Remove-handlers-on-target.patch	2019-08-02 10:07:38 UTC (rev 358885)
@@ -0,0 +1,101 @@
+From 5cd8acebe8461850667215b4c6b19e9ebf4c82f2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail at 3v1n0.net>
+Date: Tue, 5 Dec 2017 02:41:50 +0100
+Subject: [PATCH] tweener: Save handlers on target and remove them on destroy
+
+Cherry picked from commit 28ac564b568e4546d32728b426e9d0414e95d30d.
+
+A tweener onComplete handler could be called when the target actor has already
+been destroyed, and this could lead accessing to invalid properties of it.
+
+So, wrap the handlers with lambda functions that we delete them when the object
+state so that they are not called anymore after this point.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=791233
+https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/4
+---
+ js/ui/tweener.js | 56 +++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 44 insertions(+), 12 deletions(-)
+
+diff --git a/js/ui/tweener.js b/js/ui/tweener.js
+index bb9ea557c..25338367d 100644
+--- a/js/ui/tweener.js
++++ b/js/ui/tweener.js
+@@ -63,30 +63,62 @@ function _getTweenState(target) {
+     return target.__ShellTweenerState;
+ }
+ 
++function _ensureHandlers(target) {
++    if (!target.__ShellTweenerHandlers)
++        target.__ShellTweenerHandlers = new Map();
++    return target.__ShellTweenerHandlers;
++}
++
+ function _resetTweenState(target) {
+     let state = target.__ShellTweenerState;
+ 
+     if (state) {
+-        if (state.destroyedId)
++        if (state.destroyedId) {
+             state.actor.disconnect(state.destroyedId);
++            delete state.destroyedId;
++        }
+     }
+ 
++    _removeHandler(target, 'onComplete', _tweenCompleted);
+     target.__ShellTweenerState = {};
+ }
+ 
+ function _addHandler(target, params, name, handler) {
+-    if (params[name]) {
+-        let oldHandler = params[name];
+-        let oldScope = params[name + 'Scope'];
+-        let oldParams = params[name + 'Params'];
+-        let eventScope = oldScope ? oldScope : target;
++    let wrapperNeeded = false;
++    let tweenerHandlers = _ensureHandlers(target);
+ 
+-        params[name] = () => {
+-            oldHandler.apply(eventScope, oldParams);
+-            handler(target);
+-        };
+-    } else
+-        params[name] = () => { handler(target); };
++    if (!tweenerHandlers.has(name)) {
++        tweenerHandlers.set(name, []);
++        wrapperNeeded = true;
++    }
++
++    let handlers = tweenerHandlers.get(name);
++    handlers.push(handler);
++
++    if (wrapperNeeded) {
++        if (params[name]) {
++            let oldHandler = params[name];
++            let oldScope = params[`${name}Scope`];
++            let oldParams = params[`${name}Params`];
++            let eventScope = oldScope ? oldScope : target;
++
++            params[name] = () => {
++                oldHandler.apply(eventScope, oldParams);
++                handlers.forEach(h => h(target));
++            };
++        } else {
++            params[name] = () => handlers.forEach(h => h(target));
++        }
++    }
++}
++
++function _removeHandler(target, name, handler) {
++    let tweenerHandlers = _ensureHandlers(target);
++
++    if (tweenerHandlers.has(name)) {
++        let handlers = tweenerHandlers.get(name).filter(h => h != handler);
++        tweenerHandlers.set(name, handlers);
++    }
+ }
+ 
+ function _actorDestroyed(target) {
+-- 
+2.22.0
+

Copied: gnome-shell/repos/testing-x86_64/PKGBUILD (from rev 358884, gnome-shell/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2019-08-02 10:07:38 UTC (rev 358885)
@@ -0,0 +1,63 @@
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+# Contributor: Ionut Biru <ibiru at archlinux.org>
+# Contributor: Flamelab <panosfilip at gmail.com
+
+pkgname=gnome-shell
+pkgver=3.32.2+11+g1c6abf378
+pkgrel=1
+epoch=1
+pkgdesc="Next generation desktop shell"
+url="https://wiki.gnome.org/Projects/GnomeShell"
+arch=(x86_64)
+license=(GPL2)
+depends=(accountsservice gcr gjs gnome-bluetooth upower gnome-session gnome-settings-daemon
+         gnome-themes-extra gsettings-desktop-schemas libcanberra-pulse libcroco libgdm libsecret
+         mutter nm-connection-editor unzip gstreamer libibus)
+makedepends=(gtk-doc gnome-control-center evolution-data-server gobject-introspection git meson
+             sassc)
+optdepends=('gnome-control-center: System settings'
+            'evolution-data-server: Evolution calendar integration')
+groups=(gnome)
+install=gnome-shell.install
+_commit=1c6abf37855cd4f834569b6db32d32c1d8876f2a  # gnome-3-32
+source=("git+https://gitlab.gnome.org/GNOME/gnome-shell.git#commit=$_commit"
+        "git+https://gitlab.gnome.org/GNOME/libgnome-volume-control.git"
+        0001-tweener-Remove-handlers-on-target.patch
+        0001-js-ui-Use-captured-event-nonmotion.patch)
+sha256sums=('SKIP'
+            'SKIP'
+            '241bea1273982bc97a58d0e25d610c6cbbc3e3be72a203015826dc599b3303c0'
+            '27b0e188bc25e59a4907e326bf890ac3e5164c660cf67366394d91000d5cee0c')
+
+pkgver() {
+  cd $pkgname
+  git describe --tags | sed 's/-/+/g'
+}
+
+prepare() {
+  cd $pkgname
+
+  # fix gjs errors
+  git apply -3 ../0001-tweener-Remove-handlers-on-target.patch   # !4
+  git cherry-pick -n aec015d5ca14c7e28355f3ef9520b0f01280a51f    # !190
+  git cherry-pick -n 2ef883dcada125bd8d5e54d7020c26cc3ec7e4f7    # !190
+
+  # reduce overhead moving cursor or windows
+  git apply -3 ../0001-js-ui-Use-captured-event-nonmotion.patch  # !276
+
+  git submodule init
+  git config --local submodule.subprojects/gvc.url "$srcdir/libgnome-volume-control"
+  git submodule update
+}
+  
+build() {
+  arch-meson $pkgname build -D gtk_doc=true
+  ninja -C build
+}
+
+package() {
+  DESTDIR="$pkgdir" meson install -C build
+
+  # https://bugs.archlinux.org/task/37412
+  mkdir "$pkgdir/usr/share/gnome-shell/modes"
+}

Copied: gnome-shell/repos/testing-x86_64/gnome-shell.install (from rev 358884, gnome-shell/trunk/gnome-shell.install)
===================================================================
--- testing-x86_64/gnome-shell.install	                        (rev 0)
+++ testing-x86_64/gnome-shell.install	2019-08-02 10:07:38 UTC (rev 358885)
@@ -0,0 +1,7 @@
+post_install() {
+  setcap cap_sys_nice+ep usr/bin/gnome-shell
+}
+
+post_upgrade() {
+  post_install
+}


More information about the arch-commits mailing list