GNOME Bugzilla – Bug 732211
Non-deterministic behavior on annotation color
Last modified: 2015-04-19 08:00:45 UTC
Created attachment 279178 [details] Screenshot of annotation windows with different colors When I open annotation windows, sometimes they appear with the color they are supposed to have but other (most of the) times it is black. I am attaching a screenshot where one annotation opened with the correct color while the other opened in black. I am using the latest gtk. Maybe this is related to the theme I use, but the annotation window should not be sensitive to this.
Created attachment 279181 [details] [review] Removes paintable settings for annotation window For some reason, removing gtk_widget_set_app_paintable fixes the issue here... I am not sure if it causes problems with other configurations though. I also removed one call to gtk_container_set_border_width because there is another one resetting this property 7 lines below.
I had seen the issue a couple of times lately. Giselle, I'm not sure if you already know it: If you want to be sure when and why a line was introduced, you can use git blame. For example: $ git blame -L 377,390 libview/ev-annotation-window.c would give you the latest commit hashes of each line between 377 and 390. Once having the hash, you can check what the log says: $ git log -p -n 1 229170c1 In this particular case, the log does not say that much, and it seems to correspond to the initial support of annotations.
Hi Germán, thank you! I checked the log and this setting is there since the file was added... I read the documentation of gtk_widget_set_app_paintable (https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-app-paintable) and in principle it makes sense to set it to true because of this: "the effect is to suppress default themed drawing of the widget's background". But the main reason should be actually to indicate that "the application intends to draw on the widget in an “draw” handler". I did not find any "draw" signal associated with this window, do you think this might be causing some confusion on the window manager?
Created attachment 286198 [details] Color of the annotation window I tried testing the bug and the color of the annotation window still keeps changing from yellow to black at certain intervals.
I believe that after applying the patch the problem was solved for Eejya, right?
Comment on attachment 279181 [details] [review] Removes paintable settings for annotation window This works for me too, thanks!