~x2go/x2go/x2goclient_build-baikal

« back to all changes in this revision

Viewing changes to onmainwindow.cpp

  • Committer: Mike Gabriel
  • Author(s): Oleksandr Shneyder
  • Date: 2014-01-24 11:15:32 UTC
  • Revision ID: git-v1:4954ff8b6269a7d6afb6feba8c1fbb48a09c4c40
set mod map from client to server on Mac, hide keyboard settings on Mac

Conflicts (resolved by Mike Gabriel):
        debian/changelog

Show diffs side-by-side

added added

removed removed

Lines of Context:
5468
5468
}
5469
5469
 
5470
5470
 
 
5471
#ifdef Q_OS_DARWIN
 
5472
void ONMainWindow::slotSetModMap()
 
5473
{
 
5474
    if(!nxproxy)
 
5475
    {
 
5476
        return;
 
5477
    }
 
5478
    if(kbMap.length()<=0)
 
5479
    {
 
5480
        x2goDebug<<"get keyboard map";
 
5481
        QProcess pr(this);
 
5482
        pr.start("xmodmap -pke");
 
5483
        pr.waitForFinished();
 
5484
        kbMap=pr.readAllStandardOutput();
 
5485
    }
 
5486
    sshConnection->executeCommand("export DISPLAY=:"+resumingSession.display+"; echo \\\""+kbMap+"\\\" | xmodmap -");
 
5487
}
 
5488
#endif
5471
5489
 
5472
5490
void ONMainWindow::slotProxyError ( QProcess::ProcessError )
5473
5491
{
5479
5497
{
5480
5498
 
5481
5499
#ifdef Q_OS_DARWIN
 
5500
    disconnect(modMapTimer, SIGNAL(timeout()), this, SLOT(slotSetModMap()));
 
5501
    delete modMapTimer;
 
5502
    modMapTimer=0;
 
5503
    kbMap=QString::null;
5482
5504
//fixes bug, when mainwindow inputs not accepting focus under mac
5483
5505
    setFocus();
5484
5506
#endif
5722
5744
            }
5723
5745
        }
5724
5746
        sbSusp->setToolTip ( tr ( "Suspend" ) );
 
5747
#ifdef Q_OS_DARWIN
 
5748
        modMapTimer=new QTimer(this);
 
5749
        connect(modMapTimer, SIGNAL(timeout()), this, SLOT (slotSetModMap()));
 
5750
        modMapTimer->start(30000);
 
5751
        slotSetModMap();
 
5752
#endif
5725
5753
        if ( newSession )
5726
5754
        {
5727
5755
            runCommand();