<p>Ok, with the key missing information that the problem only ever occurs on the very first time the plugin is right clicked per session I can reproduce.</p>
<p>As <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=181177" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/codebrainz">@codebrainz</a> observed, the table row is not being selected on the first right click, its not focus, I can left click on a row first and still the first right click will not select a different row.</p>
<p>As <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=17930457" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/GFdevelop">@GFdevelop</a> seems to have identified, but didn't explain, changing the value of the "hidden files" item in the popup seems to steal the selection from the file list.</p>
<p>This leads to a second reproducer.  I can reproduce the problem by changing the "hidden files" option in the plugins preferences dialog in plugin manager, and the problem happens every time on the first right click after its changed.</p>
<p>This seems rather like a GTK strangeness, <code>gtk_check_menu_item_set_active()</code> only actually selecting the item when the value changes <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=793526" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/b4n">@b4n</a>?</p>
<p>Unfortunately the solution here (moving the call to <code>gtk_check_menu_item_set_active()</code> to the popup creation) is wrong because the setting in the menu no longer follows the value set by the plugins preferences dialog.</p>
<p>The variable <code>popup_menu</code> needs to be moved from being a static in the <code>on_button_press()</code> function to a file wide static that is created in the plugin init, (as <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=181177" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/codebrainz">@codebrainz</a> said) properly freed in plugin free and then it can be updated by the plugin preferences when thats changed and by the menu function when its changed in the menu and not on each time the menu is displayed.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2161?email_source=notifications&email_token=AAIOWJ4F6LDQHNHBPHWHQGTPWZXDZA5CNFSM4HOYRDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBZUUY#issuecomment-495163987">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ236DZYN3W2YY33R2LPWZXDZANCNFSM4HOYRDFA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJZDLTXVNN3JKLXMZL3PWZXDZA5CNFSM4HOYRDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBZUUY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2161?email_source=notifications\u0026email_token=AAIOWJ4F6LDQHNHBPHWHQGTPWZXDZA5CNFSM4HOYRDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBZUUY#issuecomment-495163987",
"url": "https://github.com/geany/geany/pull/2161?email_source=notifications\u0026email_token=AAIOWJ4F6LDQHNHBPHWHQGTPWZXDZA5CNFSM4HOYRDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBZUUY#issuecomment-495163987",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>