From bde42ffb8b3de541b0ced5b5f46eac6dc441dda7 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Tue, 19 Sep 2017 08:47:03 +0200 Subject: Avoid window geometry jittering when changing geometry from JavaScript MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The QML API allowed only separate setting of geometry parameters which causes flickering when all parameters need to be changed. By exposing the setGeometry function it is possible to set all of these at once using an imperative setGeometry call from JavaScript. Note that bindings for x/y/width/height are still evaluated sequentially, resulting in four calls to the platform window's setGeometry. This patch only introduces an imperative workaround for that issue. Change-Id: Ie9b0d3c39434740e50757ba7cff0385ae80f47f4 Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qwindow.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/kernel/qwindow.h') diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 4a874caacb..44ff054fa3 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -218,8 +218,6 @@ public: void setBaseSize(const QSize &size); void setSizeIncrement(const QSize &size); - void setGeometry(int posx, int posy, int w, int h); - void setGeometry(const QRect &rect); QRect geometry() const; QMargins frameMargins() const; @@ -300,6 +298,8 @@ public Q_SLOTS: void setY(int arg); void setWidth(int arg); void setHeight(int arg); + void setGeometry(int posx, int posy, int w, int h); + void setGeometry(const QRect &rect); void setMinimumWidth(int w); void setMinimumHeight(int h); -- cgit v1.2.3