diff options
author | David Robillard <d@drobilla.net> | 2020-04-26 21:44:51 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-04-26 21:44:51 +0200 |
commit | 7b728fc201269cfcad91ad4d9fdcd949483c3485 (patch) | |
tree | 6a8061faadfa7e323ab6f914316522d5fe2de1b7 /src | |
parent | eee62b7f32e4ef7aaca09565fa53b54ad0815970 (diff) | |
download | suil-7b728fc201269cfcad91ad4d9fdcd949483c3485.tar.gz suil-7b728fc201269cfcad91ad4d9fdcd949483c3485.tar.bz2 suil-7b728fc201269cfcad91ad4d9fdcd949483c3485.zip |
Implement resize for X11 in Qt5
Diffstat (limited to 'src')
-rw-r--r-- | src/x11_in_qt5.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/x11_in_qt5.cpp b/src/x11_in_qt5.cpp index 229a98d..aae6863 100644 --- a/src/x11_in_qt5.cpp +++ b/src/x11_in_qt5.cpp @@ -16,6 +16,7 @@ */ #include <QCloseEvent> +#include <QResizeEvent> #include <QTimerEvent> #include <QWidget> #include <QX11Info> @@ -81,6 +82,18 @@ public: } protected: + void resizeEvent(QResizeEvent* event) override + { + QWidget::resizeEvent(event); + + if (_window) { + XResizeWindow(QX11Info::display(), + _window, + event->size().width(), + event->size().height()); + } + } + void timerEvent(QTimerEvent* event) override { if (event->timerId() == _ui_timer && _idle_iface) { |