Some small style fixes
This commit is contained in:
@@ -345,8 +345,9 @@ KeyboardLayoutView::MouseMoved(BPoint point, uint32 transit,
|
|||||||
int32 buttons;
|
int32 buttons;
|
||||||
if (Window()->CurrentMessage() == NULL
|
if (Window()->CurrentMessage() == NULL
|
||||||
|| Window()->CurrentMessage()->FindInt32("buttons", &buttons) != B_OK
|
|| Window()->CurrentMessage()->FindInt32("buttons", &buttons) != B_OK
|
||||||
|| buttons == 0)
|
|| buttons == 0) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (fDragKey == NULL && (fabs(point.x - fClickPoint.x) > 4
|
if (fDragKey == NULL && (fabs(point.x - fClickPoint.x) > 4
|
||||||
|| fabs(point.y - fClickPoint.y) > 4)) {
|
|| fabs(point.y - fClickPoint.y) > 4)) {
|
||||||
@@ -505,8 +506,9 @@ KeyboardLayoutView::MessageReceived(BMessage* message)
|
|||||||
// switch keys if the dropped object came from us
|
// switch keys if the dropped object came from us
|
||||||
Key* key = _KeyForCode(keyCode);
|
Key* key = _KeyForCode(keyCode);
|
||||||
if (key == NULL
|
if (key == NULL
|
||||||
|| (key == fDropTarget && fDragModifiers == fModifiers))
|
|| (key == fDropTarget && fDragModifiers == fModifiers)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
char* string;
|
char* string;
|
||||||
int32 numBytes;
|
int32 numBytes;
|
||||||
@@ -1098,10 +1100,11 @@ KeyboardLayoutView::_KeyChanged(const BMessage* message)
|
|||||||
const uint8* state;
|
const uint8* state;
|
||||||
ssize_t size;
|
ssize_t size;
|
||||||
int32 key;
|
int32 key;
|
||||||
if (message->FindData("states", B_UINT8_TYPE, (const void**)&state, &size)
|
if (message->FindInt32("key", &key) != B_OK
|
||||||
!= B_OK
|
|| message->FindData("states", B_UINT8_TYPE,
|
||||||
|| message->FindInt32("key", &key) != B_OK)
|
(const void**)&state, &size) != B_OK) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Update key state, and invalidate change keys
|
// Update key state, and invalidate change keys
|
||||||
|
|
||||||
|
|||||||
@@ -947,7 +947,8 @@ KeymapWindow::_GetCurrentKeymap(entry_ref& ref)
|
|||||||
BString
|
BString
|
||||||
KeymapWindow::_GetActiveKeymapName()
|
KeymapWindow::_GetActiveKeymapName()
|
||||||
{
|
{
|
||||||
BString mapName = kCurrentKeymapName; // safe default
|
BString mapName = kCurrentKeymapName;
|
||||||
|
// safe default
|
||||||
|
|
||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
_GetCurrentKeymap(ref);
|
_GetCurrentKeymap(ref);
|
||||||
|
|||||||
Reference in New Issue
Block a user