mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 09:40:10 +00:00
Merge branch 'matthiasc/for-main' into 'main'
gdk: Make a warning more useful See merge request GNOME/gtk!6712
This commit is contained in:
commit
8418e4276a
@ -71,7 +71,7 @@ gdk_draw_context_default_surface_resized (GdkDrawContext *context)
|
||||
static void
|
||||
gdk_draw_context_default_empty_frame (GdkDrawContext *context)
|
||||
{
|
||||
g_warning ("FIXME: Implement");
|
||||
g_warning ("FIXME: Implement GdkDrawContext.empty_frame in %s", G_OBJECT_TYPE_NAME (context));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -39,9 +39,17 @@
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (GdkX11GLContext, gdk_x11_gl_context, GDK_TYPE_GL_CONTEXT)
|
||||
|
||||
static void
|
||||
gdk_x11_gl_context_empty_frame (GdkDrawContext *draw_context)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_x11_gl_context_class_init (GdkX11GLContextClass *klass)
|
||||
{
|
||||
GdkDrawContextClass *draw_context_class = GDK_DRAW_CONTEXT_CLASS (klass);
|
||||
|
||||
draw_context_class->empty_frame = gdk_x11_gl_context_empty_frame;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -83,9 +83,15 @@ struct _GtkInspectorGeneral
|
||||
GtkWidget *version_box;
|
||||
GtkWidget *env_box;
|
||||
GtkWidget *display_box;
|
||||
GtkWidget *display_extensions_row;
|
||||
GtkWidget *display_extensions_box;
|
||||
GtkWidget *monitor_box;
|
||||
GtkWidget *gl_box;
|
||||
GtkWidget *gl_extensions_row;
|
||||
GtkWidget *gl_extensions_box;
|
||||
GtkWidget *vulkan_box;
|
||||
GtkWidget *vulkan_extensions_row;
|
||||
GtkWidget *vulkan_extensions_box;
|
||||
GtkWidget *device_box;
|
||||
GtkWidget *gtk_version;
|
||||
GtkWidget *gdk_backend;
|
||||
@ -124,7 +130,6 @@ struct _GtkInspectorGeneral
|
||||
GtkWidget *display_name;
|
||||
GtkWidget *display_rgba;
|
||||
GtkWidget *display_composited;
|
||||
GtkSizeGroup *labels;
|
||||
|
||||
GdkDisplay *display;
|
||||
};
|
||||
@ -240,8 +245,6 @@ add_check_row (GtkInspectorGeneral *gen,
|
||||
|
||||
gtk_widget_set_hexpand (box, FALSE);
|
||||
gtk_list_box_insert (list, row, -1);
|
||||
|
||||
gtk_size_group_add_widget (gen->labels, label);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -280,8 +283,6 @@ add_label_row (GtkInspectorGeneral *gen,
|
||||
|
||||
gtk_widget_set_hexpand (box, FALSE);
|
||||
gtk_list_box_insert (GTK_LIST_BOX (list), row, -1);
|
||||
|
||||
gtk_size_group_add_widget (gen->labels, label);
|
||||
}
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
@ -290,7 +291,7 @@ append_glx_extension_row (GtkInspectorGeneral *gen,
|
||||
Display *dpy,
|
||||
const char *ext)
|
||||
{
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->gl_box), ext, epoxy_has_glx_extension (dpy, 0, ext), 0);
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->gl_extensions_box), ext, epoxy_has_glx_extension (dpy, 0, ext), 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -301,7 +302,7 @@ append_wgl_extension_row (GtkInspectorGeneral *gen,
|
||||
{
|
||||
HDC hdc = 0;
|
||||
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->gl_box), ext, epoxy_has_wgl_extension (hdc, ext), 0);
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->gl_extensions_box), ext, epoxy_has_wgl_extension (hdc, ext), 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -311,7 +312,7 @@ append_egl_extension_row (GtkInspectorGeneral *gen,
|
||||
EGLDisplay dpy,
|
||||
const char *ext)
|
||||
{
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->gl_box), ext, epoxy_has_egl_extension (dpy, ext), 0);
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->gl_extensions_box), ext, epoxy_has_egl_extension (dpy, ext), 0);
|
||||
}
|
||||
|
||||
static EGLDisplay
|
||||
@ -354,6 +355,7 @@ init_gl (GtkInspectorGeneral *gen)
|
||||
gtk_widget_set_visible (gen->gl_vendor_row, FALSE);
|
||||
gtk_widget_set_visible (gen->gl_full_version_row, FALSE);
|
||||
gtk_widget_set_visible (gen->glsl_version_row, FALSE);
|
||||
gtk_widget_set_visible (gen->gl_extensions_row, FALSE);
|
||||
gtk_label_set_text (GTK_LABEL (gen->gl_error), error->message);
|
||||
g_error_free (error);
|
||||
return;
|
||||
@ -527,18 +529,18 @@ init_vulkan (GtkInspectorGeneral *gen)
|
||||
g_free (api_version);
|
||||
g_free (driver_version);
|
||||
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->vulkan_box), VK_KHR_SURFACE_EXTENSION_NAME, TRUE, 0);
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->vulkan_extensions_box), VK_KHR_SURFACE_EXTENSION_NAME, TRUE, 0);
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (GDK_IS_X11_DISPLAY (gen->display))
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->vulkan_box), "VK_KHR_xlib_surface", TRUE, 0);
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->vulkan_extensions_box), "VK_KHR_xlib_surface", TRUE, 0);
|
||||
#endif
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (GDK_IS_WAYLAND_DISPLAY (gen->display))
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->vulkan_box), "VK_KHR_wayland_surface", TRUE, 0);
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->vulkan_extensions_box), "VK_KHR_wayland_surface", TRUE, 0);
|
||||
#endif
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->vulkan_box), VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->vulkan_extensions_box), VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
|
||||
has_debug_extension (context), 0);
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->vulkan_box), "VK_LAYER_KHRONOS_validation",
|
||||
add_check_row (gen, GTK_LIST_BOX (gen->vulkan_extensions_box), "VK_LAYER_KHRONOS_validation",
|
||||
has_validation_layer (context), 0);
|
||||
|
||||
g_object_unref (context);
|
||||
@ -625,7 +627,7 @@ append_wayland_protocol_row (GtkInspectorGeneral *gen,
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
list = GTK_LIST_BOX (gen->display_box);
|
||||
list = GTK_LIST_BOX (gen->display_extensions_box);
|
||||
|
||||
id = wl_proxy_get_class (proxy);
|
||||
version = wl_proxy_get_version (proxy);
|
||||
@ -675,7 +677,6 @@ populate_display (GdkDisplay *display, GtkInspectorGeneral *gen)
|
||||
GtkWidget *child;
|
||||
GtkListBox *list;
|
||||
|
||||
gtk_widget_set_visible (gen->display_composited, TRUE);
|
||||
list = GTK_LIST_BOX (gen->display_box);
|
||||
children = NULL;
|
||||
for (child = gtk_widget_get_first_child (GTK_WIDGET (list));
|
||||
@ -690,7 +691,8 @@ populate_display (GdkDisplay *display, GtkInspectorGeneral *gen)
|
||||
child = l->data;
|
||||
if (gtk_widget_is_ancestor (gen->display_name, child) ||
|
||||
gtk_widget_is_ancestor (gen->display_rgba, child) ||
|
||||
gtk_widget_is_ancestor (gen->display_composited, child))
|
||||
gtk_widget_is_ancestor (gen->display_composited, child) ||
|
||||
child == gen->display_extensions_row)
|
||||
continue;
|
||||
|
||||
gtk_list_box_remove (list, child);
|
||||
@ -704,9 +706,16 @@ populate_display (GdkDisplay *display, GtkInspectorGeneral *gen)
|
||||
gtk_widget_set_visible (gen->display_composited,
|
||||
gdk_display_is_composited (display));
|
||||
|
||||
list = GTK_LIST_BOX (gen->display_extensions_box);
|
||||
while ((child = gtk_widget_get_first_child (GTK_WIDGET (list))) != NULL)
|
||||
gtk_list_box_remove (list, child);
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
add_wayland_protocols (display, gen);
|
||||
#endif
|
||||
|
||||
gtk_widget_set_visible (gen->display_extensions_row,
|
||||
gtk_widget_get_first_child (gen->display_extensions_box) != NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1125,16 +1134,16 @@ keynav_failed (GtkWidget *widget, GtkDirectionType direction, GtkInspectorGenera
|
||||
else if (direction == GTK_DIR_DOWN && widget == gen->display_box)
|
||||
next = gen->monitor_box;
|
||||
else if (direction == GTK_DIR_DOWN && widget == gen->monitor_box)
|
||||
next = gen->device_box;
|
||||
else if (direction == GTK_DIR_DOWN && widget == gen->device_box)
|
||||
next = gen->gl_box;
|
||||
else if (direction == GTK_DIR_DOWN && widget == gen->gl_box)
|
||||
next = gen->vulkan_box;
|
||||
else if (direction == GTK_DIR_DOWN && widget == gen->vulkan_box)
|
||||
next = gen->device_box;
|
||||
else if (direction == GTK_DIR_UP && widget == gen->device_box)
|
||||
next = gen->vulkan_box;
|
||||
else if (direction == GTK_DIR_UP && widget == gen->vulkan_box)
|
||||
next = gen->gl_box;
|
||||
else if (direction == GTK_DIR_UP && widget == gen->gl_box)
|
||||
next = gen->device_box;
|
||||
else if (direction == GTK_DIR_UP && widget == gen->device_box)
|
||||
next = gen->monitor_box;
|
||||
else if (direction == GTK_DIR_UP && widget == gen->monitor_box)
|
||||
next = gen->display_box;
|
||||
@ -1206,9 +1215,15 @@ gtk_inspector_general_class_init (GtkInspectorGeneralClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, version_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, env_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, display_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, display_extensions_row);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, display_extensions_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, monitor_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, gl_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, gl_extensions_row);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, gl_extensions_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, vulkan_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, vulkan_extensions_row);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, vulkan_extensions_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, gtk_version);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, gdk_backend);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, gsk_renderer);
|
||||
@ -1243,7 +1258,6 @@ gtk_inspector_general_class_init (GtkInspectorGeneralClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, gtk_exe_prefix);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, gtk_data_prefix);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, gsettings_schema_dir);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, labels);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, display_name);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, display_composited);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorGeneral, display_rgba);
|
||||
|
@ -528,6 +528,31 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="display_extensions_row">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkExpander">
|
||||
<property name="label-widget">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Protocols</property>
|
||||
<property name="margin-start">10</property>
|
||||
</object>
|
||||
</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="display_extensions_box">
|
||||
<property name="margin-top">20</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="rich-list"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
@ -540,6 +565,16 @@
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="device_box">
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="rich-list"/>
|
||||
<class name="boxed-list"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="gl_box">
|
||||
<property name="selection-mode">none</property>
|
||||
@ -768,6 +803,31 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="gl_extensions_row">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkExpander">
|
||||
<property name="label-widget">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Extensions</property>
|
||||
<property name="margin-start">10</property>
|
||||
</object>
|
||||
</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="gl_extensions_box">
|
||||
<property name="margin-top">20</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="rich-list"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
@ -859,16 +919,31 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="device_box">
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="rich-list"/>
|
||||
<class name="boxed-list"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="vulkan_extensions_row">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkExpander">
|
||||
<property name="label-widget">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Extensions</property>
|
||||
<property name="margin-start">10</property>
|
||||
</object>
|
||||
</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="vulkan_extensions_box">
|
||||
<property name="margin-top">20</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="rich-list"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@ -876,30 +951,6 @@
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
<object class="GtkSizeGroup" id="labels">
|
||||
<widgets>
|
||||
<widget name="gtk_version_label"/>
|
||||
<widget name="gdk_backend_label"/>
|
||||
<widget name="gsk_renderer_label"/>
|
||||
<widget name="pango_fontmap_label"/>
|
||||
<widget name="media_backend_label"/>
|
||||
<widget name="app_id_label"/>
|
||||
<widget name="resource_path_label"/>
|
||||
<widget name="display_label"/>
|
||||
<widget name="display_rgba_label"/>
|
||||
<widget name="display_composited_label"/>
|
||||
<widget name="gl_backend_version_label"/>
|
||||
<widget name="gl_backend_vendor_label"/>
|
||||
<widget name="gl_version_label"/>
|
||||
<widget name="gl_vendor_label"/>
|
||||
<widget name="gl_renderer_label"/>
|
||||
<widget name="gl_full_version_label"/>
|
||||
<widget name="glsl_version_label"/>
|
||||
<widget name="vk_device_label"/>
|
||||
<widget name="vk_api_version_label"/>
|
||||
<widget name="vk_driver_version_label"/>
|
||||
</widgets>
|
||||
</object>
|
||||
<object class="GtkSizeGroup">
|
||||
<widgets>
|
||||
<widget name="version_box"/>
|
||||
|
Loading…
Reference in New Issue
Block a user