summaryrefslogtreecommitdiffstats
path: root/krdc/rdp/krdpview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-13 06:26:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-13 06:26:27 +0000
commit9fab5b8a216e283e563f3457315715672bc8b55a (patch)
treec1251952e4e0e28fad0bca829d49335ff15b6e98 /krdc/rdp/krdpview.cpp
parentbcb704366cb5e333a626c18c308c7e0448a8e69f (diff)
downloadtdenetwork-9fab5b8a216e283e563f3457315715672bc8b55a.tar.gz
tdenetwork-9fab5b8a216e283e563f3457315715672bc8b55a.zip
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
Diffstat (limited to 'krdc/rdp/krdpview.cpp')
-rw-r--r--krdc/rdp/krdpview.cpp24
1 files changed, 23 insertions, 1 deletions
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 <kapplication.h>
#include <kdialogbase.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -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<RdpHostPref> 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;