Closed newsgrep closed 8 years ago
The visual problem looks like a theme problem to me. Are you using the Adwaita theme from Gtk+? On my system the background of the searchbar is white or some light grey.
The errors look like there is a problem in the code, i will take a look.
I use the Raleigh Theme. The problem does happen with the Adwaita Theme to. I think there was an 1.3-Alpha Version (using libvte-2.90) were it worked just fine (when I remember correctly).
I just tried to reproduce the warnings on GtkNotebook, but I could not get it to happen on my system.
1.) Can you reproduce this with the default settings? 2.) If not, do these warnings only appear when using certain settings? 3.) Regarding the style problem, do you use a custom ~/.config/tilda/style.css file where you overwrite some background? 4.) Could you try to bisect with git and find the version where the background started to become broken for you?
The GtkNotebook warning is triggered when I close the tilda Window with ALT+F4 (i3 command "kill") , it does not happen when I use Quit from the context menu.
when compiling I get some warnings regarding tilda_window.c:
src/tilda_window.c: In function ‘tilda_window_search_forward_cb’: src/tilda_window.c:761:26: warning: passing argument 1 of ‘tilda_window_search’ from incompatible pointer type [-Wincompatible-pointer-types] tilda_window_search (button, tw, FALSE);
src/tilda_window.c:706:13: note: expected ‘GtkWidget * {aka struct _GtkWidget }’ but argument is of type ‘GtkButton * {aka struct _GtkButton }’ static void tilda_window_search (G_GNUC_UNUSED GtkWidget widget, tilda_window tw, gboolean terminal_search_backwards) {
src/tilda_window.c: In function ‘tilda_window_search_backward_cb’: src/tilda_window.c:765:26: warning: passing argument 1 of ‘tilda_window_search’ from incompatible pointer type [-Wincompatible-pointer-types] tilda_window_search (button, tw, TRUE);
src/tilda_terminal.c: In function ‘menu_searchbar_cb’: src/tilda_terminal.c:871:5: warning: implicit declaration of function ‘toggle_searchbar_cb’ [-Wimplicit-function-declaration] toggle_searchbar_cb (TILDA_WINDOW(user_data));
src/tilda_window.c:706:13: note: expected ‘GtkWidget * {aka struct _GtkWidget }’ but argument is of type ‘GtkButton * {aka struct _GtkButton }’ static void tilda_window_search (G_GNUC_UNUSED GtkWidget widget, tilda_window tw, gboolean terminal_search_backwards) {
setting gtk_widget_set_app_paintable (GTK_WIDGET (tw->window), FALSE); fixes this bug.
I cannot remove that. Its needed in gnome shell.
could you try to set only the searchbar widget'S app paintable flag to false?
I'm sorry, I should do what? setting gtk_widget_set_app_paintable (GTK_WIDGET (tw->window), TRUE); --> buggy setting gtk_widget_set_app_paintable (GTK_WIDGET (tw->window), FALSE); --> fine (at least for me)
Try adding:
gtk_widget_set_app_paintable (GTK_WIDGET (tw->search->search_box), FALSE);
And leave the other line at true.
file: src/tilda_window.c 941 gtk_widget_set_app_paintable (GTK_WIDGET (tw->window), TRUE); 942 gtk_widget_set_app_paintable (GTK_WIDGET (tw->search->search_box), FALSE);
turns out to be a segfault
I pushed a new commit, that sets a widget name for the search bar. As a workaround you can try to add a style.css with the following rule:
#search {
background: #fff;
}
Let me know if that fixes it.
your new code + the style.css file fixes it.
I pushed another commit to master that adds default styling to tilda. It should now also work without adding custom styling to style.css.
I have also committed some patch to fix some deprecation warnings and casting warnings when compiling tilda, the output should be more clean now.
Regarding the warnings when you close tilda with ALT+F4
, it seems that's caused by a call to tilda_window_free(&tw);
after the gtk_main loop has already closed and so the resources are already freed. Fixing this properly will require a bit more work so I will not do it right now, feel free to open separate bug report for it, so it does not get lost when I close this one.
Can you confirm that with my last fix an override in your custom style.css is not longer necessary?
Closing, please reopen if the issue still exists.
pic:
when I exit Tilda I get:
(tilda:8279): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkNotebook'
(tilda:8279): Gtk-CRITICAL **: gtk_notebook_get_n_pages: assertion 'GTK_IS_NOTEBOOK (notebook)' failed
running Debian Testing 64Bit + Tilda 1.3.1 + i3wm 4.11