This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gokdriveclient. from efec14c fix server version checking new 8bc09a4 reduce window updates when moving windows in rootless mode new 79b3b22 remove resizeWinFromServer code The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: client.cpp | 4 ++-- debian/changelog | 2 ++ extwin.cpp | 24 +++++++++++++++++++----- extwin.h | 4 ++++ 4 files changed, 27 insertions(+), 7 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdriveclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gokdriveclient. commit 8bc09a4fac41d20611ac5a4a952abae4f0fdf78d Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Wed Apr 6 12:11:02 2022 +0200 reduce window updates when moving windows in rootless mode --- client.cpp | 8 ++++---- debian/changelog | 1 + extwin.cpp | 30 +++++++++++++++++++++++++----- extwin.h | 5 +++++ 4 files changed, 35 insertions(+), 9 deletions(-) diff --git a/client.cpp b/client.cpp index f14a488..0ed41da 100644 --- a/client.cpp +++ b/client.cpp @@ -1299,8 +1299,8 @@ void Client::getWinUpdateBuffer() win->setMinimumWidth(minw); win->setMinimumHeight(minh); } - win->resize(w,h); - win->move(win->kdriveToVirtualPosition(QPoint(x,y))); + win->resizeWinFromServer(w,h); + win->moveWinFromServer(win->kdriveToVirtualPosition(QPoint(x,y))); // Client::KDRStdErr()<<"new win pos: "<<x<<":"<<y<<" translated to "<< win->kdriveToVirtualPosition(QPoint(x,y)).x()<<":"<<win->kdriveToVirtualPosition(QPoint(x,y)).y()<<KDR_ENDL; win->showNormal(); win->raise(); @@ -1315,9 +1315,9 @@ void Client::getWinUpdateBuffer() QPoint adjustedWinPos=win->kdriveToVirtualPosition(QPoint(x,y)); // KDRStdErr()<<KDR_DEC<<name<<" "<<x<<":"<<y<<" "<<w<<"x"<<h<<" min size: "<<minw<<"x"<<minh<<" bw - "<<bw<<" "<<visibility<<KDR_ENDL; if(win->geometry().width() != w || win->geometry().height() != h) - win->resize(w,h); + win->resizeWinFromServer(w,h); if(win->geometry().x()!=adjustedWinPos.x() || win->geometry().y()!=adjustedWinPos.y()) - win->move(adjustedWinPos); + win->moveWinFromServer(adjustedWinPos); if(win->windowTitle()!=name) win->setWindowTitle(name); // win->raise(); diff --git a/debian/changelog b/debian/changelog index ccd1953..bb3faad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -46,5 +46,6 @@ x2gokdriveclient (0.0.0.1-0x2go1) UNRELEASED; urgency=medium - replace QByteArray::compare with operator ==. - include <xcb/xproto.h> in extwin.h to fix build on leap423 and co - fix server version checking + - reduce window updates when moving windows in rootless mode -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Tue, 04 Jun 2019 11:10:43 +0200 diff --git a/extwin.cpp b/extwin.cpp index ea61384..8aed559 100644 --- a/extwin.cpp +++ b/extwin.cpp @@ -28,6 +28,9 @@ ExtWin::ExtWin(uint32_t extWinId, Client *client, QWidget* parent, uint8_t wt, Qt::WindowFlags flags): QMainWindow(parent, flags) { + changeTimer=new QTimer(this); + changeTimer->setSingleShot(true); + connect(changeTimer, SIGNAL(timeout()), this, SLOT(slotChangeWin())); displayArea=new DisplayArea((Client*)client,this); displayArea->setObjectName("DisplayArea"); displayArea->setStyleSheet("QFrame#DisplayArea{background-color:black;}"); @@ -83,12 +86,30 @@ void ExtWin::setWinSize(int w, int h) displayArea->resize(w,h); } +void ExtWin::moveWinFromServer(QPoint p) +{ + ignoreGeometryChangeEvent=true; + move(p); + ignoreGeometryChangeEvent=false; +} + +void ExtWin::slotChangeWin() +{ + client->changeWindow(this); +} + +void ExtWin::resizeWinFromServer(int w, int h) +{ + ignoreGeometryChangeEvent=true; + resize(w,h); + ignoreGeometryChangeEvent=false; +} + void ExtWin::moveEvent(QMoveEvent* ev) { - if((windowType == WINDOW_TYPE_NORMAL)||(windowType == WINDOW_TYPE_DIALOG)) + if(((windowType == WINDOW_TYPE_NORMAL)||(windowType == WINDOW_TYPE_DIALOG))&&(!ignoreGeometryChangeEvent)) { -// Client::KDRStdErr()<<"Move "<<Client::QRectToStr(geometry())<<KDR_ENDL; - client->changeWindow(this); + changeTimer->start(50); } QMainWindow::moveEvent(ev); } @@ -107,8 +128,7 @@ void ExtWin::resizeEvent(QResizeEvent* ev) { if((windowType == WINDOW_TYPE_NORMAL)||(windowType == WINDOW_TYPE_DIALOG)) { -// Client::KDRStdErr()<<"Resize "<<Client::QRectToStr(geometry())<<KDR_ENDL; - client->changeWindow(this); + slotChangeWin(); } QMainWindow::resizeEvent(ev); } diff --git a/extwin.h b/extwin.h index db37947..4d22f23 100644 --- a/extwin.h +++ b/extwin.h @@ -53,6 +53,8 @@ public: QPoint kdriveToVirtualPosition(QPoint kdrPos); void setHasFocus( bool f){focus=f;} uint8_t getHasFocus(){return focus;} + void moveWinFromServer(QPoint pos); + void resizeWinFromServer(int w, int h); private: #ifdef Q_OS_LINUX @@ -76,8 +78,11 @@ private: int zOrderInd; int modality=MOD_NONE; bool focus=0; + bool ignoreGeometryChangeEvent=false; + QTimer* changeTimer; private slots: + void slotChangeWin(); void slotCheckStackOrder(); #ifdef Q_OS_WIN void slotSetTaskbar(); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdriveclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gokdriveclient. commit 79b3b22188366bea9dd1b306c14565f5ea99f732 Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Wed Apr 6 12:22:09 2022 +0200 remove resizeWinFromServer code --- client.cpp | 4 ++-- debian/changelog | 1 + extwin.cpp | 6 ------ extwin.h | 1 - 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/client.cpp b/client.cpp index 0ed41da..554075a 100644 --- a/client.cpp +++ b/client.cpp @@ -1299,7 +1299,7 @@ void Client::getWinUpdateBuffer() win->setMinimumWidth(minw); win->setMinimumHeight(minh); } - win->resizeWinFromServer(w,h); + win->resize(w,h); win->moveWinFromServer(win->kdriveToVirtualPosition(QPoint(x,y))); // Client::KDRStdErr()<<"new win pos: "<<x<<":"<<y<<" translated to "<< win->kdriveToVirtualPosition(QPoint(x,y)).x()<<":"<<win->kdriveToVirtualPosition(QPoint(x,y)).y()<<KDR_ENDL; win->showNormal(); @@ -1315,7 +1315,7 @@ void Client::getWinUpdateBuffer() QPoint adjustedWinPos=win->kdriveToVirtualPosition(QPoint(x,y)); // KDRStdErr()<<KDR_DEC<<name<<" "<<x<<":"<<y<<" "<<w<<"x"<<h<<" min size: "<<minw<<"x"<<minh<<" bw - "<<bw<<" "<<visibility<<KDR_ENDL; if(win->geometry().width() != w || win->geometry().height() != h) - win->resizeWinFromServer(w,h); + win->resize(w,h); if(win->geometry().x()!=adjustedWinPos.x() || win->geometry().y()!=adjustedWinPos.y()) win->moveWinFromServer(adjustedWinPos); if(win->windowTitle()!=name) diff --git a/debian/changelog b/debian/changelog index bb3faad..798137b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,5 +47,6 @@ x2gokdriveclient (0.0.0.1-0x2go1) UNRELEASED; urgency=medium - include <xcb/xproto.h> in extwin.h to fix build on leap423 and co - fix server version checking - reduce window updates when moving windows in rootless mode + - remove resizeWinFromServer code -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Tue, 04 Jun 2019 11:10:43 +0200 diff --git a/extwin.cpp b/extwin.cpp index 8aed559..1aadaa4 100644 --- a/extwin.cpp +++ b/extwin.cpp @@ -98,12 +98,6 @@ void ExtWin::slotChangeWin() client->changeWindow(this); } -void ExtWin::resizeWinFromServer(int w, int h) -{ - ignoreGeometryChangeEvent=true; - resize(w,h); - ignoreGeometryChangeEvent=false; -} void ExtWin::moveEvent(QMoveEvent* ev) { diff --git a/extwin.h b/extwin.h index 4d22f23..a0f6bdd 100644 --- a/extwin.h +++ b/extwin.h @@ -54,7 +54,6 @@ public: void setHasFocus( bool f){focus=f;} uint8_t getHasFocus(){return focus;} void moveWinFromServer(QPoint pos); - void resizeWinFromServer(int w, int h); private: #ifdef Q_OS_LINUX -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdriveclient.git