mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 19:44:59 +00:00
修复bug
This commit is contained in:
parent
dee95e35da
commit
70a8aba930
3 changed files with 15 additions and 6 deletions
|
@ -404,7 +404,7 @@ bool InputConvertGame::processMouseMove(const QMouseEvent *from)
|
|||
|
||||
if (!m_mouseMoveLastPos.isNull()) {
|
||||
QPointF distance = from->localPos() - m_mouseMoveLastPos;
|
||||
distance /= 8;
|
||||
distance /= 10;
|
||||
|
||||
mouseMoveStartTouch(from);
|
||||
startMouseMoveTimer();
|
||||
|
|
|
@ -23,11 +23,13 @@ VideoForm::VideoForm(const QString& serial, QWidget *parent) :
|
|||
connect(&m_inputConvert, &InputConvertGame::grabCursor, this, [this](bool grab){
|
||||
#ifdef Q_OS_WIN32
|
||||
if(grab) {
|
||||
QRect rc(mapToGlobal(ui->videoWidget->pos())
|
||||
, ui->videoWidget->size());
|
||||
RECT mainRect;
|
||||
mainRect.left = (LONG)this->geometry().left();
|
||||
mainRect.right = (LONG)this->geometry().right();
|
||||
mainRect.top = (LONG)this->geometry().top();
|
||||
mainRect.bottom = (LONG)this->geometry().bottom();
|
||||
mainRect.left = (LONG)rc.left();
|
||||
mainRect.right = (LONG)rc.right();
|
||||
mainRect.top = (LONG)rc.top();
|
||||
mainRect.bottom = (LONG)rc.bottom();
|
||||
ClipCursor(&mainRect);
|
||||
} else {
|
||||
ClipCursor(Q_NULLPTR);
|
||||
|
@ -198,7 +200,8 @@ void VideoForm::keyReleaseEvent(QKeyEvent *event)
|
|||
|
||||
void VideoForm::on_fullScrcenbtn_clicked()
|
||||
{
|
||||
switchFullScreen();
|
||||
QKeySequence s =ui->fullScrcenbtn->shortcut();
|
||||
switchFullScreen();
|
||||
}
|
||||
|
||||
void VideoForm::on_returnBtn_clicked()
|
||||
|
|
|
@ -67,6 +67,9 @@
|
|||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
|
@ -99,6 +102,9 @@
|
|||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
|
|
Loading…
Add table
Reference in a new issue