[gnome-shell] layout: really queue region update before redraw
- From: Daniel Drake <dsd src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] layout: really queue region update before redraw
- Date: Fri, 14 Mar 2014 12:24:06 +0000 (UTC)
commit 29485ff24b60a7ec1a95f311642994d11cae7227
Author: Daniel Drake <drake endlessm com>
Date: Thu Mar 13 14:46:34 2014 -0600
layout: really queue region update before redraw
This code may have worked when written in 2009, but later gjs commit
b5e467d89aea43a8e32a1138d232c8a32e6b0785 removed the priority
parameter from idle_add.
Now, when running a constantly-updating client (es2gears) on an
embedded platform, _updateRegions() does not get called and I see
unresponsive window decorations.
Update the code to use meta_later_add() like other parts of the
shell, which is actually slightly better in this case anyway.
Solves the unresponsiveness problem.
https://bugzilla.gnome.org/show_bug.cgi?id=585500
js/ui/layout.js | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 82d848a..7b3647c 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -4,7 +4,6 @@ const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const Lang = imports.lang;
-const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const Signals = imports.signals;
@@ -907,8 +906,8 @@ const LayoutManager = new Lang.Class({
return;
if (!this._updateRegionIdle)
- this._updateRegionIdle = Mainloop.idle_add(Lang.bind(this, this._updateRegions),
- Meta.PRIORITY_BEFORE_REDRAW);
+ this._updateRegionIdle = Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
+ Lang.bind(this, this._updateRegions));
},
_getWindowActorsForWorkspace: function(workspace) {
@@ -939,7 +938,7 @@ const LayoutManager = new Lang.Class({
let rects = [], struts = [], i;
if (this._updateRegionIdle) {
- Mainloop.source_remove(this._updateRegionIdle);
+ Meta.later_remove(this._updateRegionIdle);
delete this._updateRegionIdle;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]