static HHOOK keyboard_hook = NULL;
static UINT aerosnap_message;
+static gboolean pen_touch_input;
+static POINT pen_touch_cursor_position;
+
static void
track_mouse_event (DWORD dwFlags,
HWND hwnd)
return cur_tick = suggested_tick;
}
+BOOL
+_gdk_win32_get_cursor_pos (LPPOINT lpPoint)
+{
+ if (pen_touch_input)
+ {
+ *lpPoint = pen_touch_cursor_position;
+ return TRUE;
+ }
+ else
+ return GetCursorPos (lpPoint);
+}
+
static void
generate_focus_event (GdkDeviceManagerWin32 *device_manager,
GdkSurface *window,
g_print (" (%d,%d)",
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
+ pen_touch_input = FALSE;
+
g_set_object (&window, find_window_for_mouse_event (window, msg));
/* TODO_CSW?: there used to some synthesize and propagate */
if (GDK_SURFACE_DESTROYED (window))
g_print (" (%d,%d)",
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
+ pen_touch_input = FALSE;
+
g_set_object (&window, find_window_for_mouse_event (window, msg));
if (pointer_grab == NULL && implicit_grab_surface != NULL)
(gpointer) msg->wParam,
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
+ pen_touch_input = FALSE;
+
new_window = window;
if (pointer_grab != NULL)
GDK_NOTE (EVENTS, g_print (" %d (%ld,%ld)",
HIWORD (msg->wParam), msg->pt.x, msg->pt.y));
+ pen_touch_input = FALSE;
+
new_window = NULL;
hwnd = WindowFromPoint (msg->pt);
ignore_leave = FALSE;
break;
}
+ if (IS_POINTER_PRIMARY_WPARAM (msg->wParam))
+ {
+ current_root_x = pen_touch_cursor_position.x = GET_X_LPARAM (msg->lParam);
+ current_root_y = pen_touch_cursor_position.y = GET_Y_LPARAM (msg->lParam);
+ pen_touch_input = TRUE;
+ }
+
if (pointer_grab != NULL &&
!pointer_grab->implicit &&
!pointer_grab->owner_events)
break;
}
+ if (IS_POINTER_PRIMARY_WPARAM (msg->wParam))
+ {
+ current_root_x = pen_touch_cursor_position.x = GET_X_LPARAM (msg->lParam);
+ current_root_y = pen_touch_cursor_position.y = GET_Y_LPARAM (msg->lParam);
+ pen_touch_input = TRUE;
+ }
+
if (pointer_grab != NULL &&
!pointer_grab->implicit &&
!pointer_grab->owner_events)
break;
}
+ if (IS_POINTER_PRIMARY_WPARAM (msg->wParam))
+ {
+ current_root_x = pen_touch_cursor_position.x = GET_X_LPARAM (msg->lParam);
+ current_root_y = pen_touch_cursor_position.y = GET_Y_LPARAM (msg->lParam);
+ pen_touch_input = TRUE;
+ }
+
if (pointer_grab != NULL &&
!pointer_grab->implicit &&
!pointer_grab->owner_events)
break;
}
+ if (IS_POINTER_PRIMARY_WPARAM (msg->wParam))
+ {
+ current_root_x = pen_touch_cursor_position.x = GET_X_LPARAM (msg->lParam);
+ current_root_y = pen_touch_cursor_position.y = GET_Y_LPARAM (msg->lParam);
+ pen_touch_input = TRUE;
+ }
+
if (IS_POINTER_PRIMARY_WPARAM (msg->wParam) &&
!IS_POINTER_INCONTACT_WPARAM (msg->wParam) &&
mouse_window != NULL)
{
make_crossing_event(event_device,
NULL,
- &msg->pt,
+ &pen_touch_cursor_position,
event_time);
}
}
break;
}
+ if (IS_POINTER_PRIMARY_WPARAM (msg->wParam))
+ {
+ current_root_x = pen_touch_cursor_position.x = GET_X_LPARAM (msg->lParam);
+ current_root_y = pen_touch_cursor_position.y = GET_Y_LPARAM (msg->lParam);
+ pen_touch_input = TRUE;
+ }
+
if (pointer_grab != NULL &&
!pointer_grab->implicit &&
!pointer_grab->owner_events)
break;
}
+ if (IS_POINTER_PRIMARY_WPARAM (msg->wParam))
+ {
+ current_root_x = pen_touch_cursor_position.x = GET_X_LPARAM (msg->lParam);
+ current_root_y = pen_touch_cursor_position.y = GET_Y_LPARAM (msg->lParam);
+ pen_touch_input = TRUE;
+ }
+
if (!IS_POINTER_INRANGE_WPARAM (msg->wParam))
{
gdk_winpointer_input_events (window, NULL, msg);
{
make_crossing_event(event_device,
NULL,
- &msg->pt,
+ &pen_touch_cursor_position,
event_time);
}
}