|
|
|
@ -23,11 +23,13 @@ VideoForm::VideoForm(const QString& serial, QWidget *parent) :
|
|
|
|
connect(&m_inputConvert, &InputConvertGame::grabCursor, this, [this](bool grab){
|
|
|
|
connect(&m_inputConvert, &InputConvertGame::grabCursor, this, [this](bool grab){
|
|
|
|
#ifdef Q_OS_WIN32
|
|
|
|
#ifdef Q_OS_WIN32
|
|
|
|
if(grab) {
|
|
|
|
if(grab) {
|
|
|
|
|
|
|
|
QRect rc(mapToGlobal(ui->videoWidget->pos())
|
|
|
|
|
|
|
|
, ui->videoWidget->size());
|
|
|
|
RECT mainRect;
|
|
|
|
RECT mainRect;
|
|
|
|
mainRect.left = (LONG)this->geometry().left();
|
|
|
|
mainRect.left = (LONG)rc.left();
|
|
|
|
mainRect.right = (LONG)this->geometry().right();
|
|
|
|
mainRect.right = (LONG)rc.right();
|
|
|
|
mainRect.top = (LONG)this->geometry().top();
|
|
|
|
mainRect.top = (LONG)rc.top();
|
|
|
|
mainRect.bottom = (LONG)this->geometry().bottom();
|
|
|
|
mainRect.bottom = (LONG)rc.bottom();
|
|
|
|
ClipCursor(&mainRect);
|
|
|
|
ClipCursor(&mainRect);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
ClipCursor(Q_NULLPTR);
|
|
|
|
ClipCursor(Q_NULLPTR);
|
|
|
|
@ -198,6 +200,7 @@ void VideoForm::keyReleaseEvent(QKeyEvent *event)
|
|
|
|
|
|
|
|
|
|
|
|
void VideoForm::on_fullScrcenbtn_clicked()
|
|
|
|
void VideoForm::on_fullScrcenbtn_clicked()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
QKeySequence s =ui->fullScrcenbtn->shortcut();
|
|
|
|
switchFullScreen();
|
|
|
|
switchFullScreen();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|