Skip to content

Commit

Permalink
ecere/gui/Menu: (#1045) Avoiding menu item selection on mouse positio…
Browse files Browse the repository at this point in the history
…n when popping menu from keyboard

- FileDialog: Took out nativeDecorations = true (default value)
  • Loading branch information
jerstlouis committed Feb 12, 2014
1 parent 8eaed7e commit ec264e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ecere/src/gui/controls/Menu.ec
Original file line number Diff line number Diff line change
Expand Up @@ -1706,8 +1706,11 @@ public class PopupMenu : Window
bool OnMouseMove(int mx, int my, Modifiers mods)
{
int selectedX, selectedY;
ItemPtr selected;

ItemPtr selected = FindSelected(mx, my, &selectedX, &selectedY);
if(mods.isSideEffect) return true;

selected = FindSelected(mx, my, &selectedX, &selectedY);

if((!mods.isSideEffect || !this.selected) && (/*selected && */
selected != this.selected && (!selected || !ITEM_DISABLED(selected.item)) && (selected || !keyboardFocus)))
Expand Down
1 change: 0 additions & 1 deletion ecere/src/gui/dialogs/FileDialog.ec
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ public class FileDialog : Window
borderStyle = sizable;
tabCycle = true;
autoCreate = false;
nativeDecorations = true;
minClientSize = { 500, 300 };

public:
Expand Down

0 comments on commit ec264e5

Please sign in to comment.