[sushi/wip/cosimoc/no-clutter: 37/67] mainWindow: resize window on size-allocate
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi/wip/cosimoc/no-clutter: 37/67] mainWindow: resize window on size-allocate
- Date: Mon, 30 Apr 2018 15:16:45 +0000 (UTC)
commit 457542d2e656a63e78e037b0a002a3ff1e1b4a75
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Apr 3 12:46:23 2017 -0700
mainWindow: resize window on size-allocate
Whenever we get a new allocation for the window contents, we should also
recompute the window size.
src/js/ui/mainWindow.js | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index 8214a90..28f58ea 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -84,6 +84,8 @@ const MainWindow = new Lang.Class({
Lang.bind(this, this._onMotionNotifyEvent));
this._gtkWindow.connect('realize',
Lang.bind(this, this._onRealize));
+ this._gtkWindow.connect('size-allocate',
+ Lang.bind(this, this._onSizeAllocate));
this._embed = new Gtk.Overlay();
this._gtkWindow.add(this._embed);
@@ -103,6 +105,13 @@ const MainWindow = new Lang.Class({
Gdk.WMFunction.CLOSE);
},
+ _onSizeAllocate: function() {
+ if (!this._renderer)
+ return;
+
+ this._positionTexture();
+ },
+
_onKeyPressEvent : function(widget, event) {
let key = event.get_keyval()[1];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]