|
|
@@ -134,15 +134,11 @@ get_pointer(int device) const {
|
|
|
|
|
|
// We recheck this immediately to get the most up-to-date value.
|
|
|
POINT cpos;
|
|
|
- if (device == 0 && GetCursorPos(&cpos) && ScreenToClient(_hWnd, &cpos)) {
|
|
|
+ if (device == 0 && result._in_window && GetCursorPos(&cpos) && ScreenToClient(_hWnd, &cpos)) {
|
|
|
double time = ClockObject::get_global_clock()->get_real_time();
|
|
|
- RECT view_rect;
|
|
|
- if (GetClientRect(_hWnd, &view_rect)) {
|
|
|
- result._in_window = PtInRect(&view_rect, cpos);
|
|
|
- result._xpos = cpos.x;
|
|
|
- result._ypos = cpos.y;
|
|
|
- ((GraphicsWindowInputDevice &)_input_devices[0]).set_pointer(result._in_window, result._xpos, result._ypos, time);
|
|
|
- }
|
|
|
+ result._xpos = cpos.x;
|
|
|
+ result._ypos = cpos.y;
|
|
|
+ ((GraphicsWindowInputDevice &)_input_devices[0]).set_pointer(result._in_window, result._xpos, result._ypos, time);
|
|
|
}
|
|
|
}
|
|
|
return result;
|