GNOME Bugzilla – Bug 719183
Photo cannot be unflagged in fullscreen mode
Last modified: 2014-05-27 20:37:32 UTC
---- Reported by jim@yorba.org 2013-08-08 11:53:00 -0700 ---- Original Redmine bug id: 7317 Original URL: http://redmine.yorba.org/issues/7317 Searchable id: yorba-bug-7317 Original author: Jim Nelson Original description: To reproduce: 1. Flag a photo (Ctrl+G) 2. Go fullscreen (F11) 3. Try to unflag the photo (Ctrl+G) The flag emblem blinks but does not disappear. When you leave fullscreen mode, the photo is still flagged. Reported at https://bugs.launchpad.net/ubuntu/+source/shotwell/+bug/1210241 --- Bug imported by chaz@yorba.org 2013-11-25 22:00 UTC --- This bug was previously known as _bug_ 7317 at http://redmine.yorba.org/show_bug.cgi?id=7317 Unknown version " in product shotwell. Setting version to "!unspecified". Unknown milestone "unknown in product shotwell. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one. Resolution set on an open status. Dropping resolution
It seems that 'on_flag_unflag' is called twice. I can reproduce this also with other actions, like <Ctrl>M to modify the tags. There, the tags dialog pops up twice. I had a quick look at the code, but unfortunately no clue why this is happening. Any ideas where to look?
Since this is an undoable action, there should be a Command for this. My first thought is to look there. Full-screen mode is kind of a trick; because of how the photo viewer is embedded in the main application, we don't make that window full-screen, instead we create a new Page explicitly for full-screen mode. I wonder if this is an accelerator issue, i.e. both the main window and the full-screen window are capturing the accelerator and acting on it, causing the command to execute twice.
Created attachment 277231 [details] [review] fix keypress event propagation
Yes, the event was propagated twice: 1. AppWindow.get_instance().key_press_event(event); 2. return (base.key_press_event != null) ? base.key_press_event(event) : false; basically this commit: https://github.com/GNOME/shotwell/commit/a182daa4f52953db69cc28a586476744be296a65 The problem was in the original implementation (2.) undo was not working. That is why the explicit call (1.) was added. With that, some events are propagated twice. The attached patch changes the code to just do (1.). Flagging, Undo, Rating, Tagging all seem to work.
Pushed to master, commit 1e4903