This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gokdriveclient. commit 846012b67279c56ca0d8d9b52d8ab9339bd62400 Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Tue May 3 13:39:17 2022 -0500 normal mode: update window on focus events (MS Windows). --- client.cpp | 18 ++++++++++++++++++ client.h | 3 +++ debian/changelog | 1 + 3 files changed, 22 insertions(+) diff --git a/client.cpp b/client.cpp index 386787f..d605de5 100644 --- a/client.cpp +++ b/client.cpp @@ -2318,3 +2318,21 @@ void Client::reinitCaches() if(!rootless) displayArea->repaint(0, 0, displayArea->width(), displayArea->height()); } +#ifdef Q_OS_WIN +bool Client::nativeEvent(const QByteArray &eventType, void *message, long *result) +{ + if(eventType=="windows_generic_MSG" && !rootless) + { + MSG* ev = static_cast<MSG *>(message); + switch((ev->message)) + { + case WM_SETFOCUS: + case WM_KILLFOCUS: + //try to repaint the window to avoid update errors on Windows + QTimer::singleShot(500, displayArea, SLOT(repaint())); + break; + } + } + return QMainWindow::nativeEvent(eventType, message, result); +} +#endif //Q_OS_WIN diff --git a/client.h b/client.h index f53ca0b..05525c2 100644 --- a/client.h +++ b/client.h @@ -379,6 +379,9 @@ private: protected: void resizeEvent(QResizeEvent*); void moveEvent(QMoveEvent*); +#ifdef Q_OS_WIN + bool nativeEvent(const QByteArray &eventType, void *message, long *result); +#endif }; #endif // CLIENT_H diff --git a/debian/changelog b/debian/changelog index 0c174af..b096f7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -51,5 +51,6 @@ x2gokdriveclient (0.0.0.1-0x2go1) UNRELEASED; urgency=medium - bring rootless window on top if server requesting - rootless mode: if updated window not found, considering it as a new one. - rootless mode: update window on focus events. + - normal mode: update window on focus events (MS Windows). -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Tue, 04 Jun 2019 11:10:43 +0200 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdriveclient.git