Merge branch 'for-main' into 'main'
surface: Add debug spew for color states See merge request GNOME/gtk!7924
This commit is contained in:
@@ -928,6 +928,10 @@ preferred_changed (GdkWaylandColorSurface *color,
|
||||
{
|
||||
GdkWaylandSurface *self = GDK_WAYLAND_SURFACE (data);
|
||||
|
||||
GDK_DISPLAY_DEBUG (gdk_surface_get_display (GDK_SURFACE (self)), EVENTS,
|
||||
"preferred color state, surface %p color state %s",
|
||||
self, gdk_color_state_get_name (color_state));
|
||||
|
||||
gdk_surface_set_color_state (GDK_SURFACE (self), color_state);
|
||||
|
||||
self->color_state_changed = TRUE;
|
||||
|
@@ -183,8 +183,13 @@ update_allocation (GtkWidget *w,
|
||||
char *size_label;
|
||||
GEnumClass *class;
|
||||
GEnumValue *value;
|
||||
GtkWidget *target;
|
||||
|
||||
if (!gtk_widget_compute_bounds (w, gtk_widget_get_parent (w), &bounds))
|
||||
target = gtk_widget_get_parent (w);
|
||||
if (target == NULL)
|
||||
target = w;
|
||||
|
||||
if (!gtk_widget_compute_bounds (w, target, &bounds))
|
||||
graphene_rect_init (&bounds, 0, 0, 0, 0);
|
||||
|
||||
size_label = g_strdup_printf ("%g × %g +%g +%g",
|
||||
|
@@ -45,6 +45,7 @@
|
||||
#include "gtklabel.h"
|
||||
#include "gtklistitem.h"
|
||||
#include "gtkpopover.h"
|
||||
#include "gtknative.h"
|
||||
#include "gtksettings.h"
|
||||
#include "gtksingleselection.h"
|
||||
#include "gtksignallistitemfactory.h"
|
||||
@@ -132,6 +133,37 @@ object_tree_widget_get_children (GObject *object)
|
||||
return G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list)));
|
||||
}
|
||||
|
||||
static GObject *
|
||||
object_tree_window_get_parent (GObject *object)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GListModel *
|
||||
object_tree_native_get_children (GObject *object)
|
||||
{
|
||||
GtkNative *native = GTK_NATIVE (object);
|
||||
GListStore *list;
|
||||
GListModel *sublist;
|
||||
|
||||
list = g_list_store_new (G_TYPE_LIST_MODEL);
|
||||
|
||||
sublist = G_LIST_MODEL (g_list_store_new (G_TYPE_OBJECT));
|
||||
|
||||
if (gtk_native_get_surface (native))
|
||||
g_list_store_append (G_LIST_STORE (sublist), gtk_native_get_surface (native));
|
||||
if (gtk_native_get_renderer (native))
|
||||
g_list_store_append (G_LIST_STORE (sublist), gtk_native_get_renderer (native));
|
||||
g_list_store_append (list, sublist);
|
||||
g_object_unref (sublist);
|
||||
|
||||
sublist = object_tree_widget_get_children (object);
|
||||
g_list_store_append (list, sublist);
|
||||
g_object_unref (sublist);
|
||||
|
||||
return G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list)));
|
||||
}
|
||||
|
||||
static GListModel *
|
||||
object_tree_tree_model_sort_get_children (GObject *object)
|
||||
{
|
||||
@@ -518,6 +550,16 @@ static const ObjectTreeClassFuncs object_tree_class_funcs[] = {
|
||||
object_tree_widget_get_parent,
|
||||
object_tree_combo_box_get_children
|
||||
},
|
||||
{
|
||||
gtk_window_get_type,
|
||||
object_tree_window_get_parent,
|
||||
object_tree_native_get_children,
|
||||
},
|
||||
{
|
||||
gtk_popover_get_type,
|
||||
object_tree_widget_get_parent,
|
||||
object_tree_native_get_children,
|
||||
},
|
||||
{
|
||||
gtk_widget_get_type,
|
||||
object_tree_widget_get_parent,
|
||||
|
Reference in New Issue
Block a user