Skip to content

Commit

Permalink
Fix keyboard navigation in Haiku
Browse files Browse the repository at this point in the history
Messages for B_MOUSE_DOWN and other mouse and keyboard events now get
delivered through MessageReceived and Haiku relies on the app to forward
them back to BView to work properly. In BeOS this was not needed.
  • Loading branch information
pulkomandy committed May 2, 2020
1 parent 49b3d7b commit 8b7e358
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/stPartSquare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ Distributed under the terms of the MIT Licence. */
#include "stSong.h"
#include "stdefs.h"

stPartSquare::stPartSquare(stSong* song,Channel * chan, uint16 index ,int8 *transp,uint8 *part,uint8 *volume, BRect rect):
BView(rect,"partsquare", B_FOLLOW_NONE, B_WILL_DRAW )
stPartSquare::stPartSquare(stSong* song,Channel * chan, uint16 index,
int8 *transp, uint8 *part, uint8 *volume, BRect rect):
BView(rect,"partsquare", B_FOLLOW_NONE, B_WILL_DRAW | B_NAVIGABLE)
{
ch = chan;
s = song;
Expand Down Expand Up @@ -172,6 +173,7 @@ void stPartSquare::MouseDown(BPoint)

void stPartSquare::MessageReceived(BMessage *message)
{
BView::MessageReceived(message);
Window()->DetachCurrentMessage();
Window()->PostMessage(message);
}
Expand Down

0 comments on commit 8b7e358

Please sign in to comment.