GNOME Bugzilla – Bug 755619
Crash on middle or right mouse click when adding annotations
Last modified: 2015-10-15 20:20:27 UTC
1. Open a PDF in Evince 3.18.0 2. Click annotate the document 3. Click either add text annotation or add highlight annotation 4. Middle click or right click in the document 5. Evince crashes: EvinceView:ERROR:ev-view.c:5631:ev_view_button_release_event: assertion failed: (view->pressed_button == 1) Using Evince 3.18 from Debian sid.
Easy to reproduce. Thanks for the clear report.
Created attachment 312403 [details] [review] libview: Ignore right clicks while in annotation add mode.
I think it is safe to assume that a middle or right click while in "adding annotation" mode is a non-voluntary mistake from the user... so I propose that doing middle or right click should do nothing. Thus, the above patch just ignores non-left clicks and removes the failing assertion.
Review of attachment 312403 [details] [review]: ::: libview/ev-view.c @@ +5632,3 @@ + /* We ignore right-click buttons while in annotation add mode */ + if (view->pressed_button != 1) Although we have this all over the place, maybe it is time to start using mnemonics for the buttons, like to use GDK_BUTTON_PRIMARY instead of 1.
Comment on attachment 312403 [details] [review] libview: Ignore right clicks while in annotation add mode. Ok
Review of attachment 312403 [details] [review]: Thanks
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.