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 769200 - Annotation windows are not destroyed when we remove
Annotation windows are not destroyed when we remove
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-26 17:02 UTC by José Aliste
Modified: 2016-09-09 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libview: Do not create annotation window twice. (1.93 KB, patch)
2016-07-26 17:02 UTC, José Aliste
committed Details | Review

Description José Aliste 2016-07-26 17:02:13 UTC
the annotation
Comment 1 José Aliste 2016-07-26 17:02:27 UTC
Created attachment 332168 [details] [review]
libview: Do not create annotation window twice.

Currently, in button_release_event we always create the annotation window. Since
there is a chance that draw event will show the annotation windows (and in that
case creates annotation windows if they don't exist) then the annotation window
will be created twice. This causes a leak because we only destroy one of these windows...
and also when removing annotations with the window open we don't destroy the window
(we destroy a window which is already hidden).

The solution here is to check in button_release wether a window has been already created
for the annotation, and only if not, create the new annotation window.
Comment 2 Carlos Garcia Campos 2016-09-03 06:54:20 UTC
Comment on attachment 332168 [details] [review]
libview: Do not create annotation window twice.

Please, push it. Thanks!
Comment 3 Felipe Borges 2016-09-09 13:55:09 UTC
Attachment 332168 [details] pushed as 932b22b - libview: Do not create annotation window twice.