Made absolute mouse coordinates work under Windows as well
This commit is contained in:
@@ -246,7 +246,6 @@ main(int argc, char *argv[])
|
||||
auto rawInputFilter = WindowsRawInputFilter::Register(main_window);
|
||||
if (rawInputFilter) {
|
||||
app.installNativeEventFilter(rawInputFilter.get());
|
||||
QObject::disconnect(main_window, &MainWindow::pollMouse, 0, 0);
|
||||
QObject::connect(main_window, &MainWindow::pollMouse, (WindowsRawInputFilter *) rawInputFilter.get(), &WindowsRawInputFilter::mousePoll, Qt::DirectConnection);
|
||||
main_window->setSendKeyboardInput(false);
|
||||
}
|
||||
|
@@ -144,6 +144,11 @@ qt_mouse_capture(int on)
|
||||
void
|
||||
RendererStack::mousePoll()
|
||||
{
|
||||
#ifdef Q_OS_WINDOWS
|
||||
mouse_x_abs = mousedata.x_abs;
|
||||
mouse_y_abs = mousedata.y_abs;
|
||||
return;
|
||||
#endif
|
||||
#ifndef __APPLE__
|
||||
mouse_x = mousedata.deltax;
|
||||
mouse_y = mousedata.deltay;
|
||||
|
Reference in New Issue
Block a user