[vte] widget: Queue a resize on CSS changes
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: Queue a resize on CSS changes
- Date: Mon, 11 Apr 2022 21:14:15 +0000 (UTC)
commit bbd3f97b7d40988f4a9ed1e4e8723537b3836dd0
Author: Christian Persch <chpe src gnome org>
Date: Mon Apr 11 22:47:48 2022 +0200
widget: Queue a resize on CSS changes
Suggested by Christian Hergert in #2554.
src/widget.cc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/widget.cc b/src/widget.cc
index 104b3c3e..264a72cc 100644
--- a/src/widget.cc
+++ b/src/widget.cc
@@ -702,9 +702,14 @@ Widget::constructed() noexcept
void
Widget::css_changed(GtkCssStyleChange* change)
{
- /* This function is mostly useless, since there's no public API for GtkCssStyleChange */
-
padding_changed();
+
+ /* This function is inefficient, since there's no public API
+ * for GtkCssStyleChange to see what exactly changed, and if
+ * we do need to queue the resize for it or not; so we must
+ * always do so.
+ */
+ gtk_widget_queue_resize(gtk());
}
#endif /* VTE_GTK == 4 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]