talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit c6b9d4745f7006841193b7cec6a131047ce81335
parent 4b9adc862f3a14af2815c62aa84b816efdab8c61
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Sun, 13 Jan 2019 17:17:32 +0100

In GtkCMCList, do not try to allocate title button sizes if the widget is not ready

This fixes fixes several GTK runtime warnings displayed
on startup and when switching between layouts. Plus,
saves some CPU cycles, obviously.

Diffstat:
Msrc/gtk/gtkcmclist.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c @@ -2062,6 +2062,10 @@ size_allocate_title_buttons (GtkCMCList *clist) if (!gtk_widget_get_realized (GTK_WIDGET(clist))) return; + /* we're too early, the widget is not yet ready */ + if (clist->column_title_area.height <= 1) + return; + button_allocation.x = clist->hoffset; button_allocation.y = 0; button_allocation.width = 0;