mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Check for mouse button before applying skin rotation (#4279)
This commit is contained in:
commit
f3bc2f0e9f
1 changed files with 6 additions and 0 deletions
|
|
@ -75,6 +75,12 @@ void SkinOpenGLWindow::mousePressEvent(QMouseEvent* e)
|
|||
|
||||
void SkinOpenGLWindow::mouseMoveEvent(QMouseEvent* event)
|
||||
{
|
||||
// Prevents mouse sticking on Wayland compositors
|
||||
if (!(event->buttons() & Qt::MouseButton::LeftButton)) {
|
||||
m_isMousePressed = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_isMousePressed) {
|
||||
int dx = event->position().x() - m_mousePosition.x();
|
||||
int dy = event->position().y() - m_mousePosition.y();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue