forked from AuroraMiddleware/gtk
a11y: Don't support changing widget size and position
This does not make sense.
This commit is contained in:
parent
d45996c728
commit
f7d3815fa8
@ -625,39 +625,7 @@ gtk_widget_accessible_set_extents (AtkComponent *component,
|
||||
gint height,
|
||||
AtkCoordType coord_type)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
|
||||
if (widget == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (!gtk_widget_is_toplevel (widget))
|
||||
return FALSE;
|
||||
|
||||
if (coord_type == ATK_XY_WINDOW)
|
||||
{
|
||||
gint x_current, y_current;
|
||||
GdkSurface *surface = gtk_widget_get_surface (widget);
|
||||
|
||||
gdk_surface_get_origin (surface, &x_current, &y_current);
|
||||
x_current += x;
|
||||
y_current += y;
|
||||
if (x_current < 0 || y_current < 0)
|
||||
return FALSE;
|
||||
else
|
||||
{
|
||||
gtk_window_move (GTK_WINDOW (widget), x_current, y_current);
|
||||
gtk_widget_set_size_request (widget, width, height);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (coord_type == ATK_XY_SCREEN)
|
||||
{
|
||||
gtk_window_move (GTK_WINDOW (widget), x, y);
|
||||
gtk_widget_set_size_request (widget, width, height);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -666,37 +634,7 @@ gtk_widget_accessible_set_position (AtkComponent *component,
|
||||
gint y,
|
||||
AtkCoordType coord_type)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
|
||||
if (widget == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (gtk_widget_is_toplevel (widget))
|
||||
{
|
||||
if (coord_type == ATK_XY_WINDOW)
|
||||
{
|
||||
gint x_current, y_current;
|
||||
GdkSurface *surface = gtk_widget_get_surface (widget);
|
||||
|
||||
gdk_surface_get_origin (surface, &x_current, &y_current);
|
||||
x_current += x;
|
||||
y_current += y;
|
||||
if (x_current < 0 || y_current < 0)
|
||||
return FALSE;
|
||||
else
|
||||
{
|
||||
gtk_window_move (GTK_WINDOW (widget), x_current, y_current);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (coord_type == ATK_XY_SCREEN)
|
||||
{
|
||||
gtk_window_move (GTK_WINDOW (widget), x, y);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -704,18 +642,6 @@ gtk_widget_accessible_set_size (AtkComponent *component,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
|
||||
if (widget == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (gtk_widget_is_toplevel (widget))
|
||||
{
|
||||
gtk_widget_set_size_request (widget, width, height);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user