After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732211 - Non-deterministic behavior on annotation color
Non-deterministic behavior on annotation color
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: pdf annotations
git master
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-25 09:27 UTC by giselle
Modified: 2015-04-19 08:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of annotation windows with different colors (155.86 KB, image/png)
2014-06-25 09:27 UTC, giselle
  Details
Removes paintable settings for annotation window (1.20 KB, patch)
2014-06-25 09:45 UTC, giselle
committed Details | Review
Color of the annotation window (215.30 KB, image/png)
2014-09-15 13:20 UTC, Eejya
  Details

Description giselle 2014-06-25 09:27:30 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.
Comment 1 giselle 2014-06-25 09:45:06 UTC
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.
Comment 2 Germán Poo-Caamaño 2014-06-25 20:29:52 UTC
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.
Comment 3 giselle 2014-06-26 09:55:51 UTC
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?
Comment 4 Eejya 2014-09-15 13:20:52 UTC
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.
Comment 5 giselle 2014-11-02 09:49:48 UTC
I believe that after applying the patch the problem was solved for Eejya, right?
Comment 6 Carlos Garcia Campos 2015-04-19 08:00:33 UTC
Comment on attachment 279181 [details] [review]
Removes paintable settings for annotation window

This works for me too, thanks!