[polari] mainWindow: Work around a warning with recent GTK+
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] mainWindow: Work around a warning with recent GTK+
- Date: Thu, 29 Oct 2015 17:45:59 +0000 (UTC)
commit 07c11448f686e33369587551a696848f16af2015
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Oct 29 14:23:49 2015 +0100
mainWindow: Work around a warning with recent GTK+
Changing a widget's size request during the parent's allocation is
evil, and GTK+ (rightfully) started to complain - make the hack
slightly less evil by passing control back to the mainloop first.
src/mainWindow.js | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index c3f3c40..e6b8327 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -197,7 +197,11 @@ const MainWindow = new Lang.Class({
// Make sure user-list button is at least as wide as icon buttons
this._joinMenuButton.connect('size-allocate', Lang.bind(this,
function(w, rect) {
- this._showUserListButton.width_request = rect.width;
+ let width = rect.width;
+ Mainloop.idle_add(Lang.bind(this, function() {
+ this._showUserListButton.width_request = width;
+ return GLib.SOURCE_REMOVE;
+ }));
}));
let scroll = builder.get_object('room_list_scrollview');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]