mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master Closes #3235 See merge request GNOME/gtk!2667
This commit is contained in:
commit
043207133d
@ -49,11 +49,11 @@
|
||||
|
||||
/**
|
||||
* SECTION:general
|
||||
* @Short_description: Library initialization and miscellaneous functions
|
||||
* @Short_description: Library initialization and versioning
|
||||
* @Title: General
|
||||
*
|
||||
* This section describes the GDK initialization functions and miscellaneous
|
||||
* utility functions, as well as deprecation facilities.
|
||||
* This section describes miscellaneous macros and utility functions
|
||||
* related to library versioning, as well as deprecation facilities.
|
||||
*
|
||||
* The GDK and GTK headers annotate deprecated APIs in a way that produces
|
||||
* compiler warnings if these deprecated APIs are used. The warnings
|
||||
|
@ -864,7 +864,6 @@ gdk_gl_context_get_use_es (GdkGLContext *context)
|
||||
return priv->use_es > 0;
|
||||
}
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
static void
|
||||
gl_debug_message_callback (GLenum source,
|
||||
GLenum type,
|
||||
@ -955,7 +954,6 @@ gl_debug_message_callback (GLenum source,
|
||||
g_warning ("OPENGL:\n Source: %s\n Type: %s\n Severity: %s\n Message: %s",
|
||||
message_source, message_type, message_severity, message);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* gdk_gl_context_realize:
|
||||
@ -1011,15 +1009,19 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
|
||||
gl_debug = GDK_DISPLAY_DEBUG_CHECK (display, GL_DEBUG);
|
||||
#endif
|
||||
|
||||
if (priv->has_debug_output && gl_debug)
|
||||
if (priv->has_debug_output
|
||||
#ifndef G_ENABLE_CONSISTENCY_CHECKS
|
||||
&& gl_debug
|
||||
#endif
|
||||
)
|
||||
{
|
||||
gdk_gl_context_make_current (context);
|
||||
glEnable (GL_DEBUG_OUTPUT);
|
||||
glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS);
|
||||
glDebugMessageCallback (gl_debug_message_callback, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (priv->use_es)
|
||||
{
|
||||
|
@ -2292,8 +2292,6 @@ gtk_about_dialog_set_license_type (GtkAboutDialog *about,
|
||||
g_free (license_string);
|
||||
gtk_widget_show (about->license_label);
|
||||
|
||||
update_license_button_visibility (about);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_WRAP_LICENSE]);
|
||||
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LICENSE]);
|
||||
}
|
||||
@ -2302,6 +2300,8 @@ gtk_about_dialog_set_license_type (GtkAboutDialog *about,
|
||||
gtk_widget_show (about->license_label);
|
||||
}
|
||||
|
||||
update_license_button_visibility (about);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LICENSE_TYPE]);
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (about));
|
||||
|
@ -210,6 +210,9 @@ gtk_tree_list_row_sort_keys_is_compatible (GtkSortKeys *keys,
|
||||
GtkTreeListRowSortKeys *self = (GtkTreeListRowSortKeys *) keys;
|
||||
GtkTreeListRowSortKeys *compare;
|
||||
|
||||
/* FIXME https://gitlab.gnome.org/GNOME/gtk/-/issues/3228 */
|
||||
return FALSE;
|
||||
|
||||
if (keys->klass != other->klass)
|
||||
return FALSE;
|
||||
|
||||
|
@ -4220,13 +4220,13 @@ static void
|
||||
gtk_window_compute_default_size (GtkWindow *window,
|
||||
int max_width,
|
||||
int max_height,
|
||||
int *width,
|
||||
int *height)
|
||||
int *min_width,
|
||||
int *min_height,
|
||||
int *nat_width,
|
||||
int *nat_height)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (window);
|
||||
|
||||
*width = max_width;
|
||||
*height = max_height;
|
||||
if (gtk_widget_get_request_mode (widget) == GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT)
|
||||
{
|
||||
int minimum, natural;
|
||||
@ -4234,13 +4234,15 @@ gtk_window_compute_default_size (GtkWindow *window,
|
||||
gtk_widget_measure (widget, GTK_ORIENTATION_VERTICAL, -1,
|
||||
&minimum, &natural,
|
||||
NULL, NULL);
|
||||
*height = MAX (minimum, MIN (*height, natural));
|
||||
*min_height = minimum;
|
||||
*nat_height = MAX (minimum, MIN (max_height, natural));
|
||||
|
||||
gtk_widget_measure (widget, GTK_ORIENTATION_HORIZONTAL,
|
||||
*height,
|
||||
*nat_height,
|
||||
&minimum, &natural,
|
||||
NULL, NULL);
|
||||
*width = MAX (minimum, MIN (*width, natural));
|
||||
*min_width = minimum;
|
||||
*nat_width = MAX (minimum, MIN (max_width, natural));
|
||||
}
|
||||
else /* GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH or CONSTANT_SIZE */
|
||||
{
|
||||
@ -4249,13 +4251,15 @@ gtk_window_compute_default_size (GtkWindow *window,
|
||||
gtk_widget_measure (widget, GTK_ORIENTATION_HORIZONTAL, -1,
|
||||
&minimum, &natural,
|
||||
NULL, NULL);
|
||||
*width = MAX (minimum, MIN (*width, natural));
|
||||
*min_width = minimum;
|
||||
*nat_width = MAX (minimum, MIN (max_width, natural));
|
||||
|
||||
gtk_widget_measure (widget, GTK_ORIENTATION_VERTICAL,
|
||||
*width,
|
||||
*nat_width,
|
||||
&minimum, &natural,
|
||||
NULL, NULL);
|
||||
*height = MAX (minimum, MIN (*height, natural));
|
||||
*min_height = minimum;
|
||||
*nat_height = MAX (minimum, MIN (max_height, natural));
|
||||
}
|
||||
}
|
||||
|
||||
@ -4270,8 +4274,8 @@ toplevel_compute_size (GdkToplevel *toplevel,
|
||||
int width, height;
|
||||
GtkBorder shadow;
|
||||
int bounds_width, bounds_height;
|
||||
int default_width, default_height;
|
||||
int min_width, min_height;
|
||||
int nat_width, nat_height;
|
||||
|
||||
info = gtk_window_get_geometry_info (window, FALSE);
|
||||
|
||||
@ -4279,7 +4283,8 @@ toplevel_compute_size (GdkToplevel *toplevel,
|
||||
|
||||
gtk_window_compute_default_size (window,
|
||||
bounds_width, bounds_height,
|
||||
&default_width, &default_height);
|
||||
&min_width, &min_height,
|
||||
&nat_width, &nat_height);
|
||||
|
||||
if (priv->need_default_size)
|
||||
{
|
||||
@ -4291,8 +4296,8 @@ toplevel_compute_size (GdkToplevel *toplevel,
|
||||
|
||||
gtk_window_get_remembered_size (window,
|
||||
&remembered_width, &remembered_height);
|
||||
width = MAX (default_width, remembered_width);
|
||||
height = MAX (default_height, remembered_height);
|
||||
width = MAX (nat_width, remembered_width);
|
||||
height = MAX (nat_height, remembered_height);
|
||||
|
||||
/* Override with default size */
|
||||
if (info)
|
||||
@ -4307,9 +4312,9 @@ toplevel_compute_size (GdkToplevel *toplevel,
|
||||
INCLUDE_CSD_SIZE);
|
||||
|
||||
if (info->default_width > 0)
|
||||
width = min_width = default_width_csd;
|
||||
width = default_width_csd;
|
||||
if (info->default_height > 0)
|
||||
height = min_height = default_height_csd;
|
||||
height = default_height_csd;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -4349,8 +4354,9 @@ toplevel_compute_size (GdkToplevel *toplevel,
|
||||
|
||||
get_shadow_width (window, &shadow);
|
||||
|
||||
min_width = MIN (default_width + shadow.left + shadow.right, width);
|
||||
min_height = MIN (default_height + shadow.top + shadow.bottom, height);
|
||||
min_width = MIN (min_width + shadow.left + shadow.right, width);
|
||||
min_height = MIN (min_height + shadow.top + shadow.bottom, height);
|
||||
|
||||
gdk_toplevel_size_set_min_size (size, min_width, min_height);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user