From 9fab5b8a216e283e563f3457315715672bc8b55a Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 13 Dec 2009 06:26:27 +0000 Subject: Update to Trinity 3.5.11 Will need to watch for commit warnings and rebuild test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1061808 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- krdc/rdp/krdpview.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'krdc/rdp/krdpview.cpp') diff --git a/krdc/rdp/krdpview.cpp b/krdc/rdp/krdpview.cpp index dc388e29..720293c3 100644 --- a/krdc/rdp/krdpview.cpp +++ b/krdc/rdp/krdpview.cpp @@ -19,6 +19,7 @@ For any questions, comments or whatever, you may mail me at: arend@auton.nl */ +#include #include #include #include @@ -38,6 +39,7 @@ #include "rdphostpref.h" #include "rdpprefs.h" +bool launch_Fullscreen_rdp = false; bool rdpAppDataConfigured = false; extern KWallet::Wallet *wallet; @@ -188,6 +190,7 @@ bool KRdpView::editPreferences( HostPrefPtr host ) wv = prefs->rdpWidth(); hv = prefs->rdpHeight(); + kl = int2keymap( prefs->kbLayout() ); hp->setAskOnConnect( prefs->showPrefs() ); hp->setWidth(wv); @@ -206,6 +209,8 @@ bool KRdpView::start() SmartPtr hp, rdpDefaults; bool useKWallet = false; + QWidget *desktop = QApplication::desktop(); + if(!rdpAppDataConfigured) { HostPreferences *hps = HostPreferences::instance(); @@ -225,7 +230,19 @@ bool KRdpView::start() m_process = new KProcess(m_container); *m_process << "rdesktop"; - *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(hp->height())); + // Check for fullscreen mode + if ((hp->width() == 0) && (hp->height() == 0)) { + launch_Fullscreen_rdp = true; + *m_process << "-g" << (QString::number(desktop->width()) + "x" + QString::number((desktop->height()-2))); + } + else { + if ((hp->height() > (desktop->height()-2)) && (hp->height() <= (desktop->height()))) { + *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(desktop->height()-2)); + } + else { + *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(hp->height())); + } + } *m_process << "-k" << hp->layout(); if(!m_user.isEmpty()) { *m_process << "-u" << m_user; } @@ -311,6 +328,11 @@ bool KRdpView::viewOnly() return m_container->m_viewOnly; } +bool KRdpView::startFullscreen() +{ + return launch_Fullscreen_rdp; +} + void KRdpView::setViewOnly(bool s) { m_container->m_viewOnly = s; -- cgit v1.2.1