From 774a33aae483e37d770e5247a7eecb018b759642 Mon Sep 17 00:00:00 2001 From: and3md Date: Sun, 25 Jun 2017 14:39:34 +0200 Subject: [PATCH] Support window resize/add scrollbars when content is too big on X11. --- src/dlangui/platforms/x11/x11app.d | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/dlangui/platforms/x11/x11app.d b/src/dlangui/platforms/x11/x11app.d index 97112a06..019b5d8f 100644 --- a/src/dlangui/platforms/x11/x11app.d +++ b/src/dlangui/platforms/x11/x11app.d @@ -428,8 +428,13 @@ class X11Window : DWindow { Log.d("Open GL support is disabled"); } } - if (_mainWidget) - _mainWidget.setFocus(); + if (_mainWidget) { + _mainWidget.measure(SIZE_UNSPECIFIED, SIZE_UNSPECIFIED); + _windowRect.right = _dx;// hack to set windowRect, remove when _windowRect will be full supported on X11 + _windowRect.bottom = _dy; + adjustWindowOrContentSize(_mainWidget.measuredWidth, _mainWidget.measuredHeight); + _mainWidget.setFocus(); + } } protected final void changeWindowState(int action, Atom firstProperty, Atom secondProperty = None) nothrow