diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-27 00:57:25 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-27 00:57:25 (EDT) |
commit | 6f0dd2492c8399b8c6126c531e7416f1e7c2f0ce (patch) | |
tree | 1c0729c7d362ac4ab0700f8788fdb7d5c89fc8f9 /src | |
parent | f07b097a9be51b32b797ee4f99916f5eee5de96d (diff) | |
download | marquee-6f0dd2492c8399b8c6126c531e7416f1e7c2f0ce.zip marquee-6f0dd2492c8399b8c6126c531e7416f1e7c2f0ce.tar.gz marquee-6f0dd2492c8399b8c6126c531e7416f1e7c2f0ce.tar.bz2 |
MqTabBody: Add more comments
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-body.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tab-body.c b/src/tab-body.c index 99b52ca..b98b65f 100644 --- a/src/tab-body.c +++ b/src/tab-body.c @@ -338,8 +338,11 @@ context_menu_cb(WebKitWebView __attribute__((unused)) *web_view, media_ctrl_items = g_list_reverse(media_ctrl_items); media_toggle_items = g_list_reverse(media_toggle_items); + /* Clear the menu. */ webkit_context_menu_remove_all(context_menu); + /* Get the reported context (which isn't very descriptive) and save the + * hit test result for use by action callbacks. */ context = webkit_hit_test_result_get_context(hit_test_result); if (body->hit_test_result) { g_object_unref(body->hit_test_result); @@ -348,6 +351,7 @@ context_menu_cb(WebKitWebView __attribute__((unused)) *web_view, g_object_ref(body->hit_test_result); context_handled = FALSE; + /* Build the context menu. */ if (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK) { context_menu_link_cb(context_menu, body); context_handled = TRUE; @@ -386,6 +390,7 @@ context_menu_cb(WebKitWebView __attribute__((unused)) *web_view, NEW_STOCK_ITEM(INSPECT_ELEMENT); /* Inspect Element */ } + /* Propagate the event further and show the context menu. */ return FALSE; } |