mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 03:25:02 +00:00
fix: mousetap 位置错误
This commit is contained in:
parent
fb82d746cb
commit
841f0e5fc0
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
#include <Windows.h>
|
||||
#include <QWidget>
|
||||
#include <QDebug>
|
||||
|
||||
#include "winmousetap.h"
|
||||
|
||||
|
@ -29,7 +30,7 @@ void WinMouseTap::enableMouseEventTap(QWidget *widget, bool enabled)
|
|||
return;
|
||||
}
|
||||
if(enabled) {
|
||||
QRect rc(widget->mapToGlobal(widget->pos())
|
||||
QRect rc(widget->parentWidget()->mapToGlobal(widget->pos())
|
||||
, widget->size());
|
||||
RECT mainRect;
|
||||
mainRect.left = (LONG)rc.left();
|
||||
|
|
Loading…
Add table
Reference in a new issue