mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-18 00:11:39 +03:00
work around for bug with mouse driver on lombard powerbook.
This commit is contained in:
parent
a16e7217ce
commit
4f418e015e
@ -187,8 +187,20 @@ CXWindowsPrimaryScreen::run()
|
|||||||
} while (!xevent.xmotion.send_event);
|
} while (!xevent.xmotion.send_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
// warp mouse back to center
|
// warp mouse back to center. my lombard (powerbook
|
||||||
if (x != 0 || y != 0) {
|
// g3) using the adbmouse driver has two problems:
|
||||||
|
// first, the driver only sends motions of +/-2
|
||||||
|
// pixels and, second, it seems to discard some
|
||||||
|
// physical input after a warp. the former isn't a
|
||||||
|
// big deal (we're just limited to every other
|
||||||
|
// pixel) but the latter is a PITA. to work around
|
||||||
|
// it we only warp when the mouse has moved more
|
||||||
|
// than s_size pixels from the center.
|
||||||
|
static const SInt32 s_size = 32;
|
||||||
|
if (xevent.xmotion.x_root - m_xCenter < -s_size ||
|
||||||
|
xevent.xmotion.x_root - m_xCenter > s_size ||
|
||||||
|
xevent.xmotion.y_root - m_yCenter < -s_size ||
|
||||||
|
xevent.xmotion.y_root - m_yCenter > s_size) {
|
||||||
CDisplayLock display(this);
|
CDisplayLock display(this);
|
||||||
// send an event that we can recognize before
|
// send an event that we can recognize before
|
||||||
// the mouse warp.
|
// the mouse warp.
|
||||||
|
Loading…
Reference in New Issue
Block a user