Skip to content

Commit

Permalink
FreeRDP: add remote application
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Dec 31, 2024
1 parent 2b34dfb commit 7101c40
Show file tree
Hide file tree
Showing 25 changed files with 1,973 additions and 231 deletions.
3 changes: 2 additions & 1 deletion App/Client/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,8 @@ void MainWindow::slotSystemTrayIconTypeChanged()
if(m_TrayIcon)
m_TrayIcon.reset();

m_TrayIcon = QSharedPointer<QSystemTrayIcon>(new QSystemTrayIcon(this));
m_TrayIcon = QSharedPointer<QSystemTrayIcon>(
new QSystemTrayIcon(this->windowIcon(), this));
if(QSystemTrayIcon::isSystemTrayAvailable())
{
bool check = connect(
Expand Down
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
qt6 use wayland by default. qt5 use xcb default.
So that prefix 'qputenv("QT_QPA_PLATFORM", "xcb")'
at the beginning of the main function.
- FreeRDP
- Add remote application

### v0.0.30
- Client: fix CFrmParameterClient don't save parameters
Expand Down
2 changes: 2 additions & 0 deletions ChangeLog_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
由于没有坐标系统,导致无边框窗体无法拖动和定位(即 QWidge::move 失效)。
(Qt6 开始强制默认优先用 wayland ,Qt5 默认有 xcb 则优先用 xcb),
所以需要在 main 函数最前面加一行 `qputenv("QT_QPA_PLATFORM", "xcb")`;
- FreeRDP
- 增加远程应用

### v0.0.30
- 客户端: 修复 CFrmParameterClient 不保存参数错误
Expand Down
2 changes: 1 addition & 1 deletion Client/ConnectDesktop.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public Q_SLOTS:
*/
virtual void slotClipBoardChanged() = 0;

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

Expand Down
6 changes: 4 additions & 2 deletions Client/FrmViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ CFrmViewer::CFrmViewer(QWidget *parent)
setFocus();

// When the connecter is not connected, don't accept keyboard and mouse event
// When the CConnecter::sigConnected() set true. accept keyboard and mouse event
// \see CConnecter::sigConnected()
// When the CConnect::sigConnected() set true. accept keyboard and mouse event
// \see CConnect::sigConnected()
// CConnectDesktop::SetViewer
// CFrmViewer::slotConnected()
setEnabled(false);
}

Expand Down
5 changes: 3 additions & 2 deletions Client/FrmViewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ class CLIENT_EXPORT CFrmViewer : public QWidget
Q_ENUM(LED_STATE)

public Q_SLOTS:
void slotSetAdaptWindows(CFrmViewer::ADAPT_WINDOWS aw = ADAPT_WINDOWS::Original);
void slotSetAdaptWindows(
CFrmViewer::ADAPT_WINDOWS aw = ADAPT_WINDOWS::Original);
int slotSetZoomFactor(double newZoomFactor);

/*================== Internal calls ==================*/
Expand Down Expand Up @@ -165,7 +166,7 @@ public Q_SLOTS:

int ReSize(int width, int height);
void paintDesktop();
int TranslationMousePoint(QPointF inPos, QPointF &outPos);
virtual int TranslationMousePoint(QPointF inPos, QPointF &outPos);
QRectF GetAspectRationRect();

public:
Expand Down
7 changes: 6 additions & 1 deletion Plugins/FreeRDP/Client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ SET(FreeRDP_SOURCE_FILES
ClipboardMimeData.cpp
DlgGetUserPasswordFreeRDP.cpp
DlgDesktopSize.cpp
Rail.cpp
RailWindow.cpp
RailManageWindows.cpp
)

SET(FreeRDP_HEADER_FILES
Expand All @@ -32,6 +35,9 @@ SET(FreeRDP_HEADER_FILES
ClipboardMimeData.h
DlgGetUserPasswordFreeRDP.h
DlgDesktopSize.h
Rail.h
RailWindow.h
RailManageWindows.h
)

SET(FreeRDP_UI_FILES
Expand Down Expand Up @@ -71,4 +77,3 @@ ADD_PLUGIN_TARGET(NAME PluginClient${PROJECT_NAME}
INSTALL_RPATH ${INSTALL_RPATH}
VERSION ${RabbitRemoteControl_VERSION}
)

2 changes: 1 addition & 1 deletion Plugins/FreeRDP/Client/ClipboardFreeRDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int CClipboardFreeRDP::Init(CliprdrClientContext *context, bool bEnable)
return 0;
}

int CClipboardFreeRDP::UnInit(CliprdrClientContext *context, bool bEnable)
int CClipboardFreeRDP::Clean(CliprdrClientContext *context, bool bEnable)
{
context->custom = nullptr;
m_pCliprdrClientContext = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion Plugins/FreeRDP/Client/ClipboardFreeRDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CClipboardFreeRDP : public QObject
virtual ~CClipboardFreeRDP();

int Init(CliprdrClientContext *context, bool bEnable);
int UnInit(CliprdrClientContext* context, bool bEnable);
int Clean(CliprdrClientContext* context, bool bEnable);

static UINT cb_cliprdr_server_capabilities(CliprdrClientContext* context,
const CLIPRDR_CAPABILITIES* capabilities);
Expand Down
Loading

0 comments on commit 7101c40

Please sign in to comment.