Menu

#785 Folder View context menu position wrong

patches
closed-fixed
libfm (316)
5
2013-10-09
2013-09-15
mrhill
No

Invoking the context menu in the folder view background (right mouse click, not above an icon)
positions it too far to the bottom-right, when the side-bar and/or tool bars are active.

Expected behavior is that the context menu should be opened under the mouse pointer.

Tested on LibFM ver. 1.2.0-beta0 / libfm-gtk for gtk 2.0 / Lubuntu 13.04

Rootcause:

The calculation for the folder view context menu position in src/gtk/fm-folder-view.c / function popup_position_func() was mixing tab pane and parent window coordinates. This was causing the view widget's relative position to be added twice when the parent window had active side pane or toolbars.

Please find attached patch for proposed fix.

Discussion

  • mrhill

    mrhill - 2013-09-16
     
  • Lonely Stranger

    Lonely Stranger - 2013-10-09
    • assigned_to: nobody --> lstranger
    • milestone: --> patches
     
  • Lonely Stranger

    Lonely Stranger - 2013-10-09

    Thank you very much for the contribution!
    It works fine in 1.1.x, it seems I've broken something since then.
    I'll look into the patch a bit later, hope I'll apply it.

     
  • Lonely Stranger

    Lonely Stranger - 2013-10-09

    Your patch is incorrect. Yes, it fixes position on right-click but at the same time it breaks positioning on pressing 'Menu' key. I've made correct change and I believe the issue is fixed in current GIT, test it when it's possible for you. Thank you very much.

     
  • Lonely Stranger

    Lonely Stranger - 2013-10-09
    • status: open --> closed-fixed
     

Anonymous
Anonymous

Add attachments
Cancel