Last Comment Bug 726443 - Time range is not selectable by mouse when “Clear recent history” is opened via shortcut
: Time range is not selectable by mouse when “Clear recent history” is opened v...
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Widget: Gtk (show other bugs)
: 13 Branch
: x86 Linux
: -- normal (vote)
: mozilla13
Assigned To: Karl Tomlinson (:karlt)
:
Mentors:
: 726410 (view as bug list)
Depends on:
Blocks: 724966
  Show dependency treegraph
 
Reported: 2012-02-12 09:38 PST by nicolas m
Modified: 2012-02-14 12:25 PST (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
rework last event time calculation (10.38 KB, patch)
2012-02-12 21:01 PST, Karl Tomlinson (:karlt)
no flags Details | Diff | Splinter Review
rework last event time calculation v1.1 (10.37 KB, patch)
2012-02-12 22:34 PST, Karl Tomlinson (:karlt)
roc: review+
Details | Diff | Splinter Review

Description nicolas m 2012-02-12 09:38:30 PST
User Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0a1) Gecko/20120212 Firefox/13.0a1
Build ID: 20120212031149

Steps to reproduce:

This bug appears when accessing the “Clear recent history” window with the keyboard shortcut (ctrl+shift+del) or via the “Privacy” tabs in the preference panel. It does _not_ happen when opening the window through the menu.

(Firefox 13/Linux)


Actual results:

The “Time range to clear” select menu is frozen to the last used option, making impossible to choose a time range.


Expected results:

The menu should be naturally openable and selectable, exactly like it worked before or when the window is accessed via the menu.
Comment 1 Thomas Ahlblom 2012-02-12 09:58:06 PST
WFM:
Mozilla/5.0 (X11; Linux x86_64; rv:13.0a1) Gecko/20120212 Firefox/13.0a1
Comment 2 Alice0775 White 2012-02-12 10:02:16 PST
Confirmed on
http://hg.mozilla.org/mozilla-central/rev/7c0ba1c98ff7
Mozilla/5.0 (X11; Linux i686; rv:13.0a1) Gecko/20120209 Firefox/13.0a1 ID:20120209031242

Regression window(m-c)
Works:
http://hg.mozilla.org/mozilla-central/rev/02e4c23ae67d
Mozilla/5.0 (X11; Linux i686; rv:13.0a1) Gecko/20120207 Firefox/13.0a1 ID:20120207125604
Fails:
http://hg.mozilla.org/mozilla-central/rev/b45785802731
Mozilla/5.0 (X11; Linux i686; rv:13.0a1) Gecko/20120207 Firefox/13.0a1 ID:20120207174850
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=02e4c23ae67d&tochange=b45785802731

Triggered by;
b45785802731	Karl Tomlinson — b=724966 make sure to set sRetryGrabTime for retrying grabs r=roc
Comment 3 Alice0775 White 2012-02-12 10:03:49 PST
Sorry error in Comment 2

Confirmed on
http://hg.mozilla.org/mozilla-central/rev/9253f058824a
Mozilla/5.0 (X11; Linux i686; rv:13.0a1) Gecko/20120212 Firefox/13.0a1 ID:20120212031149
Comment 4 Alice0775 White 2012-02-12 10:11:48 PST
I can also reproduce on  x86_64 Ubuntu 10.04 LTS + GNOME 2.30.2
http://hg.mozilla.org/mozilla-central/rev/9253f058824a
Mozilla/5.0 (X11; Linux x86_64; rv:13.0a1) Gecko/20120212 Firefox/13.0a1 ID:20120212031149
Comment 5 Karl Tomlinson (:karlt) 2012-02-12 19:53:08 PST
gtk_get_current_event_time is returning the time of an old event due to a nested event loop in ShowModal.  The last event in the inner loop (button press) has popped off the current event list and the grab is run off a nsXULPopupShowingEvent. At that point, the event remaining on the current event list is the button release that opened the modal window.

A button press has happened since that button release event.  Each button press induces an implicit pointer grab, which i assume updates the last-pointer-grab time and so the old time is not new enough for a new grab.  I'll write something to come up with a better time than gtk_get_current_event_time.
Comment 6 Karl Tomlinson (:karlt) 2012-02-12 21:01:16 PST
Created attachment 596561 [details] [diff] [review]
rework last event time calculation
Comment 7 Mike Conley (:mconley) - (Needinfo me!) 2012-02-12 22:24:25 PST
Hey Karl,

Thanks for putting this together. I built TB with this patch, and it seemed to fix the problem.

However, I'm getting the following error when attempting to do a try build:

/buildbot/try-comm-cen-lnx/build/mozilla/widget/gtk2/nsWindow.cpp: In function 'void UpdateLastInputEventTime(const void*)':
/buildbot/try-comm-cen-lnx/build/mozilla/widget/gtk2/nsWindow.cpp:388:69: error: invalid conversion from 'const GdkEvent*' to 'GdkEvent*'
/buildbot/try-comm-cen-lnx/build/mozilla/widget/gtk2/nsWindow.cpp:388:69: error:   initializing argument 1 of 'guint32 gdk_event_get_time(GdkEvent*)'


Is the wrong type being passed somehow?

-Mike
Comment 8 Karl Tomlinson (:karlt) 2012-02-12 22:34:20 PST
Created attachment 596576 [details] [diff] [review]
rework last event time calculation v1.1

The gdk_event_get_time on the build machines needs a GdkEvent* instead of const GdkEvent*.
Comment 9 Mike Conley (:mconley) - (Needinfo me!) 2012-02-13 06:31:24 PST
Karl:

This patch seems to fix bug 726410 - however, we're seeing the same popup test failures as before (bug 725685).

-Mike
Comment 11 Marco Bonardo [::mak] (Away 6-20 Aug) 2012-02-14 02:30:49 PST
https://hg.mozilla.org/mozilla-central/rev/7d542384106f
Comment 12 Karl Tomlinson (:karlt) 2012-02-14 12:24:53 PST
*** Bug 726410 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.