summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-01-21 04:22:13 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-01-21 04:22:13 +0000
commit40446201ff8f756a7a838ee9e1c3709298bd032f (patch)
tree70ac3de63191bd7e010bf18d0c48c94e5f6a3ef3
parent1fd8d3b487603d92794747becb4e6f64d29d630c (diff)
parent75f2d7583f5485b0a47326d4dac3dfb13b9307bc (diff)
downloadgtk+-40446201ff8f756a7a838ee9e1c3709298bd032f.tar.gz
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master Closes #3607 See merge request GNOME/gtk!3100
-rw-r--r--.gitlab/issue_templates/Bug.md12
-rw-r--r--.gitlab/issue_templates/Crash.md10
-rw-r--r--gdk/wayland/gdkdisplay-wayland.c12
-rw-r--r--gtk/gtkliststore.c29
4 files changed, 46 insertions, 17 deletions
diff --git a/.gitlab/issue_templates/Bug.md b/.gitlab/issue_templates/Bug.md
index 61244a93c4..4a47d30574 100644
--- a/.gitlab/issue_templates/Bug.md
+++ b/.gitlab/issue_templates/Bug.md
@@ -1,4 +1,13 @@
+<!--
+ Please, read the CONTRIBUTING.md guide on how to file a new issue.
+
+ https://gitlab.gnome.org/GNOME/gtk/-/blob/master/CONTRIBUTING.md
+-->
## Steps to reproduce
+<!--
+ Please, explain the sequence of actions necessary to reproduce the
+ bug
+-->
1. ...
2. ...
@@ -32,5 +41,8 @@
## Additional information
<!--
- Screenshots or screen recordings are useful for visual errors
+ - Attaching a screenshot or a video without explaining the current
+ behavior and the actions necessary to reproduce the bug will lead
+ to the bug being closed
- Please report any warning or message printed on the terminal
-->
diff --git a/.gitlab/issue_templates/Crash.md b/.gitlab/issue_templates/Crash.md
index a2531687cf..2948affe1c 100644
--- a/.gitlab/issue_templates/Crash.md
+++ b/.gitlab/issue_templates/Crash.md
@@ -1,4 +1,14 @@
+<!--
+ Please, read the CONTRIBUTING.md guide on how to file a new issue.
+
+ https://gitlab.gnome.org/GNOME/gtk/-/blob/master/CONTRIBUTING.md
+-->
+
## Steps to reproduce
+<!--
+ Please, explain the sequence of actions necessary to reproduce the
+ crash
+-->
1. ...
2. ...
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index f5ea972fa2..3acc10ed50 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -1350,21 +1350,23 @@ _gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *display,
data->buffer = NULL;
data->scale = scale;
- stride = cairo_format_stride_for_width (CAIRO_FORMAT_ARGB32, width*scale);
+ stride = cairo_format_stride_for_width (CAIRO_FORMAT_ARGB32, width * scale);
data->pool = create_shm_pool (display->shm,
- height*scale*stride,
+ height * scale * stride,
&data->buf_length,
&data->buf);
+ if (G_UNLIKELY (data->pool == NULL))
+ g_error ("Unable to create shared memory pool");
surface = cairo_image_surface_create_for_data (data->buf,
CAIRO_FORMAT_ARGB32,
- width*scale,
- height*scale,
+ width * scale,
+ height * scale,
stride);
data->buffer = wl_shm_pool_create_buffer (data->pool, 0,
- width*scale, height*scale,
+ width * scale, height * scale,
stride, WL_SHM_FORMAT_ARGB8888);
cairo_surface_set_user_data (surface, &gdk_wayland_shm_surface_cairo_key,
diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c
index b1fa81e777..1b17843a97 100644
--- a/gtk/gtkliststore.c
+++ b/gtk/gtkliststore.c
@@ -2149,7 +2149,7 @@ gtk_list_store_has_default_sort_func (GtkTreeSortable *sortable)
/**
* gtk_list_store_insert_with_values:
* @list_store: A #GtkListStore
- * @iter: (out) (allow-none): An unset #GtkTreeIter to set to the new row, or %NULL
+ * @iter: (out) (optional): An unset #GtkTreeIter to set to the new row
* @position: position to insert the new row, or -1 to append after existing
* rows
* @...: pairs of column number and value, terminated with -1
@@ -2161,7 +2161,8 @@ gtk_list_store_has_default_sort_func (GtkTreeSortable *sortable)
*
* Calling
* `gtk_list_store_insert_with_values (list_store, iter, position...)`
- * has the same effect as calling
+ * has the same effect as calling:
+ *
* |[<!-- language="C" -->
* static void
* insert_value (GtkListStore *list_store,
@@ -2175,12 +2176,15 @@ gtk_list_store_has_default_sort_func (GtkTreeSortable *sortable)
* );
* }
* ]|
- * with the difference that the former will only emit a row_inserted signal,
- * while the latter will emit row_inserted, row_changed and, if the list store
- * is sorted, rows_reordered. Since emitting the rows_reordered signal
- * repeatedly can affect the performance of the program,
- * gtk_list_store_insert_with_values() should generally be preferred when
- * inserting rows in a sorted list store.
+ *
+ * with the difference that the former will only emit #GtkTreeModel::row-inserted
+ * once, while the latter will emit #GtkTreeModel::row-inserted,
+ * #GtkTreeModel::row-changed and, if the list store is sorted,
+ * #GtkTreeModel::rows-reordered for every inserted value.
+ *
+ * Since emitting the #GtkTreeModel::rows-reordered signal repeatedly can
+ * affect the performance of the program, gtk_list_store_insert_with_values()
+ * should generally be preferred when inserting rows in a sorted list store.
*/
void
gtk_list_store_insert_with_values (GtkListStore *list_store,
@@ -2244,9 +2248,9 @@ gtk_list_store_insert_with_values (GtkListStore *list_store,
/**
- * gtk_list_store_insert_with_valuesv:
+ * gtk_list_store_insert_with_valuesv: (rename-to gtk_list_store_insert_with_values)
* @list_store: A #GtkListStore
- * @iter: (out) (allow-none): An unset #GtkTreeIter to set to the new row, or %NULL.
+ * @iter: (out) (optional): An unset #GtkTreeIter to set to the new row
* @position: position to insert the new row, or -1 for last
* @columns: (array length=n_values): an array of column numbers
* @values: (array length=n_values): an array of GValues
@@ -2254,8 +2258,9 @@ gtk_list_store_insert_with_values (GtkListStore *list_store,
*
* A variant of gtk_list_store_insert_with_values() which
* takes the columns and values as two arrays, instead of
- * varargs. This function is mainly intended for
- * language-bindings.
+ * varargs.
+ *
+ * This function is mainly intended for language-bindings.
*/
void
gtk_list_store_insert_with_valuesv (GtkListStore *list_store,