This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch feature/rootless-mode in repository x2gokdriveclient. from 972ee17 transition between kdrive and virtual desktop coordinates. new 7146a6f Show in Windows taskbar only normal and dialog windows. The 1 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 | 5 ++--- extwin.cpp | 22 ++++++++++++++++++++-- extwin.h | 6 ++++-- 3 files changed, 26 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 feature/rootless-mode in repository x2gokdriveclient. commit 7146a6f77a3df917693adfe8fee645bd97b9a3fd Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Wed Feb 16 14:11:29 2022 -0600 Show in Windows taskbar only normal and dialog windows. --- client.cpp | 5 ++--- extwin.cpp | 22 ++++++++++++++++++++-- extwin.h | 6 ++++-- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/client.cpp b/client.cpp index b19b3fd..40bdbc7 100644 --- a/client.cpp +++ b/client.cpp @@ -1252,7 +1252,7 @@ void Client::getWinUpdateBuffer() if(parId==0) { // KDRStdErr()<<"win is top window: "<<KDR_HEX<<parId; - win=new ExtWin(extWinId,this, 0, flags); + win=new ExtWin(extWinId,this, 0, winType, flags); win->setParent(0); } else @@ -1264,7 +1264,7 @@ void Client::getWinUpdateBuffer() KDRStdErr()<<"parent Win not found in list: "<<KDR_HEX<<parId; parentWin=(ExtWin*) this; } - win=new ExtWin(extWinId,this, 0,flags); + win=new ExtWin(extWinId,this, 0, winType, flags); win->setParent(0); } if(transWinId) @@ -1288,7 +1288,6 @@ void Client::getWinUpdateBuffer() } // KDRStdErr()<<"my Geometry: "<<KDR_HEX<<QRectToStr(win->geometry()); - win->setWindowType(winType); win->setParentId(parId); // KDRStdErr()<<"Place above"<<KDR_HEX<<nextSibPtr; diff --git a/extwin.cpp b/extwin.cpp index dab59d6..14c3e24 100644 --- a/extwin.cpp +++ b/extwin.cpp @@ -26,7 +26,7 @@ #include <QScreen> -ExtWin::ExtWin(uint32_t extWinId, Client *client, QWidget* parent, Qt::WindowFlags flags): QMainWindow(parent, flags) +ExtWin::ExtWin(uint32_t extWinId, Client *client, QWidget* parent, uint8_t wt, Qt::WindowFlags flags): QMainWindow(parent, flags) { displayArea=new DisplayArea((Client*)client,this); displayArea->setObjectName("DisplayArea"); @@ -36,7 +36,11 @@ ExtWin::ExtWin(uint32_t extWinId, Client *client, QWidget* parent, Qt::WindowFla setWindowIcon(QIcon(":res/x2goclient.png")); this->extWinId=extWinId; this->client=client; -// QTimer::singleShot(10,this,SLOT(update())); + windowType=wt; +#ifdef Q_OS_WIN + if((windowType!=WINDOW_TYPE_NORMAL) && (windowType!=WINDOW_TYPE_DIALOG)) + QTimer::singleShot(10,this,SLOT(slotSetTaskbar())); +#endif #ifdef Q_OS_LINUX switch(windowType) { @@ -60,6 +64,20 @@ ExtWin::ExtWin(uint32_t extWinId, Client *client, QWidget* parent, Qt::WindowFla setFocusPolicy(Qt::NoFocus); } +#ifdef Q_OS_WIN +void ExtWin::slotSetTaskbar() +{ + HWND hWnd=(HWND)winId(); +// Client::KDRStdErr()<<"HWND "<<hWnd<<KDR_ENDL; + if(hWnd) + { + long style= GetWindowLong(hWnd, GWL_EXSTYLE); + style |= WS_EX_TOOLWINDOW; + SetWindowLong(hWnd, GWL_EXSTYLE, style); + } +} +#endif + void ExtWin::setWinSize(int w, int h) { displayArea->resize(w,h); diff --git a/extwin.h b/extwin.h index 7bf6c4f..c87b982 100644 --- a/extwin.h +++ b/extwin.h @@ -34,7 +34,7 @@ class ExtWin : public QMainWindow Q_OBJECT public: enum {MOD_NONE,MOD_SINGLE, MOD_GROUP}; - ExtWin(uint32_t extWinId, Client *client, QWidget* parent, Qt::WindowFlags flags = Qt::WindowFlags()); + ExtWin(uint32_t extWinId, Client *client, QWidget* parent, uint8_t wt, Qt::WindowFlags flags = Qt::WindowFlags()); uint32_t getPtr(){return extWinId;} void setWinSize(int w, int h); void setParentId(uint32_t id){parentId=id;} @@ -78,7 +78,9 @@ private: private slots: void slotCheckStackOrder(); - +#ifdef Q_OS_WIN + void slotSetTaskbar(); +#endif protected: void closeEvent(QCloseEvent*); void resizeEvent(QResizeEvent*); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdriveclient.git