forked from AuroraMiddleware/gtk
Drop root coordinates from _gdk_device_query_state
Callers are not using them anyway. Update all callers.
This commit is contained in:
parent
641c8f3252
commit
3e06a9b1d2
@ -37,12 +37,10 @@ static void gdk_broadway_device_set_surface_cursor (GdkDevice *device,
|
||||
GdkSurface *surface,
|
||||
GdkCursor *cursor);
|
||||
static void gdk_broadway_device_query_state (GdkDevice *device,
|
||||
GdkSurface *surface,
|
||||
GdkSurface **child_surface,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkSurface *surface,
|
||||
GdkSurface **child_surface,
|
||||
double *win_x,
|
||||
double *win_y,
|
||||
GdkModifierType *mask);
|
||||
static GdkGrabStatus gdk_broadway_device_grab (GdkDevice *device,
|
||||
GdkSurface *surface,
|
||||
@ -123,14 +121,12 @@ gdk_broadway_device_set_surface_cursor (GdkDevice *device,
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_device_query_state (GdkDevice *device,
|
||||
gdk_broadway_device_query_state (GdkDevice *device,
|
||||
GdkSurface *surface,
|
||||
GdkSurface **child_surface,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask)
|
||||
double *win_x,
|
||||
double *win_y,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
@ -150,10 +146,6 @@ gdk_broadway_device_query_state (GdkDevice *device,
|
||||
&device_root_y,
|
||||
&mask32);
|
||||
|
||||
if (root_x)
|
||||
*root_x = device_root_x;
|
||||
if (root_y)
|
||||
*root_y = device_root_y;
|
||||
if (win_x)
|
||||
*win_x = device_root_x;
|
||||
if (win_y)
|
||||
@ -305,7 +297,7 @@ gdk_broadway_device_surface_at_position (GdkDevice *device,
|
||||
{
|
||||
GdkSurface *surface = NULL;
|
||||
|
||||
gdk_broadway_device_query_state (device, NULL, &surface, NULL, NULL, win_x, win_y, mask);
|
||||
gdk_broadway_device_query_state (device, NULL, &surface, win_x, win_y, mask);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
@ -667,7 +667,6 @@ gdk_broadway_surface_get_device_state (GdkSurface *surface,
|
||||
|
||||
GDK_DEVICE_GET_CLASS (device)->query_state (device, surface,
|
||||
&child,
|
||||
NULL, NULL,
|
||||
x, y, mask);
|
||||
return child != NULL;
|
||||
}
|
||||
|
@ -526,7 +526,7 @@ gdk_device_get_position (GdkDevice *device,
|
||||
g_return_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE ||
|
||||
gdk_display_device_is_grabbed (gdk_device_get_display (device), device));
|
||||
|
||||
_gdk_device_query_state (device, NULL, NULL, x, y, NULL, NULL, NULL);
|
||||
_gdk_device_query_state (device, NULL, NULL, x, y, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1508,8 +1508,6 @@ void
|
||||
_gdk_device_query_state (GdkDevice *device,
|
||||
GdkSurface *surface,
|
||||
GdkSurface **child_surface,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask)
|
||||
@ -1517,8 +1515,6 @@ _gdk_device_query_state (GdkDevice *device,
|
||||
GDK_DEVICE_GET_CLASS (device)->query_state (device,
|
||||
surface,
|
||||
child_surface,
|
||||
root_x,
|
||||
root_y,
|
||||
win_x,
|
||||
win_y,
|
||||
mask);
|
||||
|
@ -88,8 +88,6 @@ struct _GdkDeviceClass
|
||||
void (* query_state) (GdkDevice *device,
|
||||
GdkSurface *surface,
|
||||
GdkSurface **child_surface,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask);
|
||||
@ -162,8 +160,6 @@ void _gdk_device_remove_slave (GdkDevice *device,
|
||||
void _gdk_device_query_state (GdkDevice *device,
|
||||
GdkSurface *surface,
|
||||
GdkSurface **child_surface,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask);
|
||||
|
@ -551,15 +551,12 @@ static void
|
||||
gdk_wayland_device_query_state (GdkDevice *device,
|
||||
GdkSurface *surface,
|
||||
GdkSurface **child_surface,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
GdkWaylandPointerData *pointer;
|
||||
GList *children = NULL;
|
||||
int x_root, y_root;
|
||||
|
||||
if (surface == NULL)
|
||||
children = gdk_wayland_display_get_toplevel_surfaces (gdk_device_get_display (device));
|
||||
@ -576,24 +573,6 @@ gdk_wayland_device_query_state (GdkDevice *device,
|
||||
*win_x = pointer->surface_x;
|
||||
if (win_y)
|
||||
*win_y = pointer->surface_y;
|
||||
|
||||
if (pointer->focus)
|
||||
{
|
||||
gdk_surface_get_root_coords (pointer->focus,
|
||||
pointer->surface_x,
|
||||
pointer->surface_y,
|
||||
&x_root, &y_root);
|
||||
}
|
||||
else
|
||||
{
|
||||
x_root = pointer->surface_x;
|
||||
y_root = pointer->surface_y;
|
||||
}
|
||||
|
||||
if (root_x)
|
||||
*root_x = x_root;
|
||||
if (root_y)
|
||||
*root_y = y_root;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2859,7 +2859,6 @@ gdk_wayland_surface_get_device_state (GdkSurface *surface,
|
||||
|
||||
GDK_DEVICE_GET_CLASS (device)->query_state (device, surface,
|
||||
&child,
|
||||
NULL, NULL,
|
||||
x, y, mask);
|
||||
return_val = (child != NULL);
|
||||
}
|
||||
|
@ -116,8 +116,6 @@ static void
|
||||
gdk_device_virtual_query_state (GdkDevice *device,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask)
|
||||
@ -126,7 +124,6 @@ gdk_device_virtual_query_state (GdkDevice *device,
|
||||
|
||||
_gdk_device_query_state (virtual->active_device,
|
||||
window, child_window,
|
||||
root_x, root_y,
|
||||
win_x, win_y,
|
||||
mask);
|
||||
}
|
||||
|
@ -2440,7 +2440,7 @@ gdk_dnd_handle_key_event (GdkDrag *drag,
|
||||
/* The state is not yet updated in the event, so we need
|
||||
* to query it here.
|
||||
*/
|
||||
_gdk_device_query_state (pointer, NULL, NULL, NULL, NULL, NULL, NULL, &state);
|
||||
_gdk_device_query_state (pointer, NULL, NULL, NULL, NULL, &state);
|
||||
|
||||
if (dx != 0 || dy != 0)
|
||||
{
|
||||
|
@ -80,8 +80,6 @@ static void gdk_x11_device_xi2_set_surface_cursor (GdkDevice *device,
|
||||
static void gdk_x11_device_xi2_query_state (GdkDevice *device,
|
||||
GdkSurface *surface,
|
||||
GdkSurface **child_surface,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask);
|
||||
@ -259,7 +257,6 @@ gdk_x11_device_xi2_get_state (GdkDevice *device,
|
||||
gdk_x11_device_xi2_query_state (device, surface,
|
||||
NULL,
|
||||
NULL, NULL,
|
||||
NULL, NULL,
|
||||
mask);
|
||||
}
|
||||
|
||||
@ -289,8 +286,6 @@ static void
|
||||
gdk_x11_device_xi2_query_state (GdkDevice *device,
|
||||
GdkSurface *surface,
|
||||
GdkSurface **child_surface,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask)
|
||||
@ -324,7 +319,7 @@ gdk_x11_device_xi2_query_state (GdkDevice *device,
|
||||
|
||||
if (master)
|
||||
_gdk_device_query_state (master, surface, child_surface,
|
||||
root_x, root_y, win_x, win_y, mask);
|
||||
win_x, win_y, mask);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -366,12 +361,6 @@ gdk_x11_device_xi2_query_state (GdkDevice *device,
|
||||
if (child_surface)
|
||||
*child_surface = gdk_x11_surface_lookup_for_display (display, xchild_window);
|
||||
|
||||
if (root_x)
|
||||
*root_x = xroot_x / scale;
|
||||
|
||||
if (root_y)
|
||||
*root_y = xroot_y / scale;
|
||||
|
||||
if (win_x)
|
||||
*win_x = xwin_x / scale;
|
||||
|
||||
|
@ -2010,7 +2010,7 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
|
||||
|
||||
precache_target_list (drag);
|
||||
|
||||
gdk_device_get_position (device, &px, &py);
|
||||
_gdk_device_query_state (device, surface, NULL, &px, &py, NULL);
|
||||
|
||||
gdk_x11_surface_get_root_coords (surface,
|
||||
round (px) + dx,
|
||||
@ -2264,7 +2264,7 @@ gdk_dnd_handle_key_event (GdkDrag *drag,
|
||||
* to query it here. We could use XGetModifierMapping, but
|
||||
* that would be overkill.
|
||||
*/
|
||||
_gdk_device_query_state (pointer, NULL, NULL, NULL, NULL, NULL, NULL, &state);
|
||||
_gdk_device_query_state (pointer, NULL, NULL, NULL, NULL, &state);
|
||||
|
||||
if (dx != 0 || dy != 0)
|
||||
{
|
||||
|
@ -2589,7 +2589,6 @@ gdk_x11_surface_get_device_state (GdkSurface *surface,
|
||||
/*HIDPI: handle coords here?*/
|
||||
GDK_DEVICE_GET_CLASS (device)->query_state (device, surface,
|
||||
&child,
|
||||
NULL, NULL,
|
||||
x, y, mask);
|
||||
return child != NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user