mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-15 05:00:09 +00:00
widget: Use GtkNative
This commit is contained in:
parent
9059eee2f0
commit
5de06f47cf
@ -56,6 +56,8 @@
|
|||||||
#include "gtkprivate.h"
|
#include "gtkprivate.h"
|
||||||
#include "gtkrenderbackgroundprivate.h"
|
#include "gtkrenderbackgroundprivate.h"
|
||||||
#include "gtkrenderborderprivate.h"
|
#include "gtkrenderborderprivate.h"
|
||||||
|
#include "gtkrootprivate.h"
|
||||||
|
#include "gtknativeprivate.h"
|
||||||
#include "gtkscrollable.h"
|
#include "gtkscrollable.h"
|
||||||
#include "gtkselection.h"
|
#include "gtkselection.h"
|
||||||
#include "gtksettingsprivate.h"
|
#include "gtksettingsprivate.h"
|
||||||
@ -3635,7 +3637,7 @@ sync_widget_surface_transform (GtkWidget *widget)
|
|||||||
was_valid = surface_transform_data->cached_surface_transform_valid;
|
was_valid = surface_transform_data->cached_surface_transform_valid;
|
||||||
prev_transform = surface_transform_data->cached_surface_transform;
|
prev_transform = surface_transform_data->cached_surface_transform;
|
||||||
|
|
||||||
if (GTK_IS_ROOT (widget))
|
if (GTK_IS_NATIVE (widget))
|
||||||
{
|
{
|
||||||
gsk_transform_to_matrix (priv->transform,
|
gsk_transform_to_matrix (priv->transform,
|
||||||
&surface_transform_data->cached_surface_transform);
|
&surface_transform_data->cached_surface_transform);
|
||||||
@ -3645,11 +3647,6 @@ sync_widget_surface_transform (GtkWidget *widget)
|
|||||||
{
|
{
|
||||||
surface_transform_data->cached_surface_transform_valid = FALSE;
|
surface_transform_data->cached_surface_transform_valid = FALSE;
|
||||||
}
|
}
|
||||||
else if (gtk_widget_compute_transform (widget, GTK_WIDGET (priv->root),
|
|
||||||
&surface_transform_data->cached_surface_transform))
|
|
||||||
{
|
|
||||||
surface_transform_data->cached_surface_transform_valid = TRUE;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GtkWidget *native = GTK_WIDGET (gtk_widget_get_native (widget));
|
GtkWidget *native = GTK_WIDGET (gtk_widget_get_native (widget));
|
||||||
@ -13464,7 +13461,7 @@ gtk_widget_set_cursor (GtkWidget *widget,
|
|||||||
|
|
||||||
root = _gtk_widget_get_root (widget);
|
root = _gtk_widget_get_root (widget);
|
||||||
if (root)
|
if (root)
|
||||||
gtk_root_maybe_update_cursor (root, widget, NULL);
|
gtk_window_maybe_update_cursor (GTK_WINDOW (root), widget, NULL);
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_CURSOR]);
|
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_CURSOR]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user