WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
75357
[GTK] Context menu is hidden right after showing it when first menu item is not disabled
https://bugs.webkit.org/show_bug.cgi?id=75357
Summary
[GTK] Context menu is hidden right after showing it when first menu item is n...
Carlos Garcia Campos
Reported
2011-12-29 08:18:52 PST
It can be reproduced by right clicking on a link, the popup menu is deactivated right after showing it unless mouse button is not released. The problem is that we are passing GDK_CURRENT_TIME (which is 0) to gtk_popup_menu, because the eventas are async and gtk_get_current_event will be NULL when calling gtk_menu_popup. GtkMenu has a timeout to decide whether the press-release was fast enough and ignore the button release event in that case. That way, a normal right click shows the menu while a long press hides the menuwhen the button is released. So, we need to know the real time when the right button was pressed and pass it to gtk_popup_menu.
Attachments
Patch
(3.59 KB, patch)
2011-12-29 08:23 PST
,
Carlos Garcia Campos
mrobinson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2011-12-29 08:23:39 PST
Created
attachment 120751
[details]
Patch
Carlos Garcia Campos
Comment 2
2011-12-29 08:26:29 PST
Ah!, and the reason why it works when the first item is not disabled is because when the timeout is passed, the button release event is also ignored if the first menu item (that receives the release event) is not sentitive.
Martin Robinson
Comment 3
2011-12-29 08:32:26 PST
Comment on
attachment 120751
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=120751&action=review
Nice!
> Source/WebKit2/UIProcess/WebPageProxy.h:595 > + // WebPopupMenuProxy::Client
If you leave a comment here, I think it should be a full sentence here. "Called by WebPopupMenuProxy::Client." for instance.
Carlos Garcia Campos
Comment 4
2011-12-29 08:37:21 PST
(In reply to
comment #3
)
> (From update of
attachment 120751
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=120751&action=review
> > Nice! > > > Source/WebKit2/UIProcess/WebPageProxy.h:595 > > + // WebPopupMenuProxy::Client > > If you leave a comment here, I think it should be a full sentence here. "Called by WebPopupMenuProxy::Client." for instance.
It's an existing comment, just copied, see:
http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/WebPageProxy.h#L600
And it means that those methods are the implementation of the WebPopupMenuProxy::Client virtual methods.
Carlos Garcia Campos
Comment 5
2011-12-29 08:39:26 PST
Committed
r103802
: <
http://trac.webkit.org/changeset/103802
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug