Skip to content

Commit

Permalink
FreeRDP::Rail: add CRailManageWindows
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Dec 26, 2024
1 parent 19580e6 commit ff122c2
Show file tree
Hide file tree
Showing 9 changed files with 542 additions and 460 deletions.
6 changes: 3 additions & 3 deletions Client/ConnectDesktop.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public Q_SLOTS:
*/
virtual void slotClipBoardChanged() = 0;

private:
int SetConnecter(CConnecter* pConnecter);
Q_INVOKABLE int SetViewer(CFrmViewer* pView, bool bDirectConnection);
protected:
virtual int SetConnecter(CConnecter* pConnecter);
virtual int SetViewer(CFrmViewer* pView, bool bDirectConnection);

Q_SIGNALS:
void sigSetDesktopSize(int width, int height);
Expand Down
2 changes: 2 additions & 0 deletions Plugins/FreeRDP/Client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SET(FreeRDP_SOURCE_FILES
DlgDesktopSize.cpp
Rail.cpp
RailWindow.cpp
RailManageWindows.cpp
)

SET(FreeRDP_HEADER_FILES
Expand All @@ -36,6 +37,7 @@ SET(FreeRDP_HEADER_FILES
DlgDesktopSize.h
Rail.h
RailWindow.h
RailManageWindows.h
)

SET(FreeRDP_UI_FILES
Expand Down
28 changes: 28 additions & 0 deletions Plugins/FreeRDP/Client/ConnectFreeRDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1667,6 +1667,34 @@ BOOL CConnectFreeRDP::cb_keyboard_set_ime_status(
return TRUE;
}

int CConnectFreeRDP::SetConnecter(CConnecter *pConnecter)
{
bool check = false;
CConnecterFreeRDP* pConnecterFreeRDP
= qobject_cast<CConnecterFreeRDP*>(pConnecter);
if(pConnecterFreeRDP) {
check = connect(
this, SIGNAL(sigRailWindow(const WINDOW_ORDER_INFO*,
const WINDOW_STATE_ORDER*)),
&pConnecterFreeRDP->m_RailManageWindows,
SLOT(slotWindow(const WINDOW_ORDER_INFO*,
const WINDOW_STATE_ORDER*)));
Q_ASSERT(check);
check = connect(
this,
SIGNAL(sigWindowDelete(const WINDOW_ORDER_INFO *),
&pConnecterFreeRDP->m_RailManageWindows,
SLOT(slotWindowDelete(const WINDOW_ORDER_INFO*));
Q_ASSERT(check);
}
return CConnectDesktop::SetConnecter(pConnecter);
}

int CConnectFreeRDP::SetViewer(CFrmViewer *pView, bool bDirectConnection)
{
return CConnectDesktop::SetViewer(pView, bDirectConnection);
}

int CConnectFreeRDP::WakeUp()
{
//qDebug(log) << Q_FUNC_INFO;
Expand Down
14 changes: 10 additions & 4 deletions Plugins/FreeRDP/Client/ConnectFreeRDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public Q_SLOTS:
virtual void slotClipBoardChanged() override;

protected:
virtual int SetConnecter(CConnecter* pConnecter);
virtual int SetViewer(CFrmViewer* pView, bool bDirectConnection);
virtual void mousePressEvent(QMouseEvent* event) override;
virtual void mouseReleaseEvent(QMouseEvent* event) override;
virtual void mouseMoveEvent(QMouseEvent* event) override;
Expand Down Expand Up @@ -165,17 +167,21 @@ public Q_SLOTS:

CClipboardFreeRDP m_ClipBoard;

CRail* m_pRail;
friend class CRail;
int InitRemoteApp();

HANDLE m_writeEvent;

#ifdef HAVE_LIBSSH
CSSHTunnelThread* m_pThread;
#endif
private Q_SLOTS:
void slotConnectProxyServer(QString szHost, quint16 nPort);

CRail* m_pRail;

Check failure on line 178 in Plugins/FreeRDP/Client/ConnectFreeRDP.h

View workflow job for this annotation

GitHub Actions / android / build_android (Release, android_arm64_v8a, 6.8.1)

Not a signal or slot declaration

Check failure on line 178 in Plugins/FreeRDP/Client/ConnectFreeRDP.h

View workflow job for this annotation

GitHub Actions / android / build_android (Release, android_x86_64, 6.8.1)

Not a signal or slot declaration
friend class CRail;
int InitRemoteApp();
Q_SIGNALS:
void sigRailWindow(const WINDOW_ORDER_INFO *orderInfo,
const WINDOW_STATE_ORDER *windowState);
void sigWindowDelete(const WINDOW_ORDER_INFO *orderInfo);
};

#endif // CCONNECTFREERDP_H
9 changes: 8 additions & 1 deletion Plugins/FreeRDP/Client/ConnecterFreeRDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "ConnecterThread.h"
#include "ParameterFreeRDP.h"

#include "RailManageWindows.h"

class CConnecterFreeRDP : public CConnecterThread
{
Q_OBJECT
Expand All @@ -17,7 +19,7 @@ class CConnecterFreeRDP : public CConnecterThread
virtual qint16 Version() override;
virtual int Initial() override;
virtual int Clean() override;

protected:
virtual QDialog *OnOpenDialogSettings(QWidget *parent) override;

Expand All @@ -27,6 +29,11 @@ class CConnecterFreeRDP : public CConnecterThread
//! [Initialize parameter]
CParameterFreeRDP m_ParameterFreeRdp;
//! [Initialize parameter]

private:
CRailManageWindows m_RailManageWindows;
friend class CConnectFreeRDP;

};

#endif // CCONNECTERFREERDP_H
Loading

0 comments on commit ff122c2

Please sign in to comment.