From c237792d9ff607afa76942221965e022966c480f Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 20 Jul 2012 15:59:36 -0700 Subject: [PATCH] gtk: Set scheme_source to G_PRIORITY_LOW, below window resizes. This allows the time-slice window to grow with its count even when Scheme is spinning. --- src/gtk/gtkio.c.stay | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gtk/gtkio.c.stay b/src/gtk/gtkio.c.stay index de5f52719..85ae82a75 100644 --- a/src/gtk/gtkio.c.stay +++ b/src/gtk/gtkio.c.stay @@ -308,6 +308,7 @@ install_scheme_source (void) scheme_source->gpollfds = NULL; scheme_source->time_limit = 0.0; scheme_source->runnable = FALSE; + g_source_set_priority ((GSource *) scheme_source, G_PRIORITY_LOW); g_source_attach ((GSource *) scheme_source, NULL); } @@ -357,7 +358,10 @@ set_registry (SchemeSource * source, GSList * new, double time) while (new != NULL) { GPollFD * gfd = new->data; - g_main_context_add_poll (context, gfd, G_PRIORITY_DEFAULT); + /* G_PRIORITY_LOW ensures that window resizes can happen even + when Scheme is spinning, thus allowing the time-slice + window to grow with its count. */ + g_main_context_add_poll (context, gfd, G_PRIORITY_LOW); new = new->next; } } @@ -536,6 +540,13 @@ open_slice_window (void) gtk_window_set_type_hint (GTK_WINDOW (slice_window), GDK_WINDOW_TYPE_HINT_UTILITY); gtk_widget_show_all (slice_window); + + /* If G_PRIORITY_LOW is too low, and the deprecated + GTK_RESIZE_IMMEDIATE is still available, this also worked: + + gtk_container_set_resize_mode (GTK_CONTAINER (slice_window), + GTK_RESIZE_IMMEDIATE); */ + gtk_window_parse_geometry (GTK_WINDOW (slice_window), "250x50+0-40"); } -- 2.25.1