mirror of
https://github.com/brl/mutter.git
synced 2025-08-02 06:34:40 +00:00
backends: Use graphene_point_t on meta_cursor_tracker_get_pointer()
It's nicer to propagate along. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1475
This commit is contained in:
@@ -8183,19 +8183,19 @@ window_focus_on_pointer_rest_callback (gpointer data)
|
||||
MetaDisplay *display = window->display;
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend);
|
||||
int root_x, root_y;
|
||||
graphene_point_t point;
|
||||
guint32 timestamp;
|
||||
|
||||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
|
||||
goto out;
|
||||
|
||||
meta_cursor_tracker_get_pointer (cursor_tracker, &root_x, &root_y, NULL);
|
||||
meta_cursor_tracker_get_pointer (cursor_tracker, &point, NULL);
|
||||
|
||||
if (root_x != focus_data->pointer_x ||
|
||||
root_y != focus_data->pointer_y)
|
||||
if ((int) point.x != focus_data->pointer_x ||
|
||||
(int) point.y != focus_data->pointer_y)
|
||||
{
|
||||
focus_data->pointer_x = root_x;
|
||||
focus_data->pointer_y = root_y;
|
||||
focus_data->pointer_x = point.x;
|
||||
focus_data->pointer_y = point.y;
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user