BListView: check message not NULL, grab buttons and modifiers
This commit is contained in:
@@ -537,6 +537,14 @@ BListView::MouseDown(BPoint where)
|
|||||||
BMessage* message = Looper()->CurrentMessage();
|
BMessage* message = Looper()->CurrentMessage();
|
||||||
int32 index = IndexOf(where);
|
int32 index = IndexOf(where);
|
||||||
|
|
||||||
|
int32 buttons = 0;
|
||||||
|
if (message != NULL)
|
||||||
|
message->FindInt32("buttons", &buttons);
|
||||||
|
|
||||||
|
int32 modifiers = 0;
|
||||||
|
if (message != NULL)
|
||||||
|
message->FindInt32("modifiers", &modifiers);
|
||||||
|
|
||||||
// If the user double (or more) clicked within the current selection,
|
// If the user double (or more) clicked within the current selection,
|
||||||
// we don't change the selection but invoke the selection.
|
// we don't change the selection but invoke the selection.
|
||||||
// TODO: move this code someplace where it can be shared everywhere
|
// TODO: move this code someplace where it can be shared everywhere
|
||||||
@@ -563,9 +571,6 @@ BListView::MouseDown(BPoint where)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 modifiers;
|
|
||||||
message->FindInt32("modifiers", &modifiers);
|
|
||||||
|
|
||||||
if (!doubleClick) {
|
if (!doubleClick) {
|
||||||
fTrack->drag_start = where;
|
fTrack->drag_start = where;
|
||||||
fTrack->last_click_time = system_time();
|
fTrack->last_click_time = system_time();
|
||||||
|
|||||||
Reference in New Issue
Block a user