Small improvements
This commit is contained in:
parent
0ee09aad2c
commit
ff70abd073
|
@ -716,7 +716,7 @@ inline void FApplication::performKeyboardAction()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline void FApplication::performMouseAction()
|
||||
inline void FApplication::performMouseAction() const
|
||||
{
|
||||
if ( ! mouse )
|
||||
return;
|
||||
|
@ -736,6 +736,9 @@ inline void FApplication::performMouseAction()
|
|||
case fc::Fkey_urxvt_mouse:
|
||||
mouse->setRawData (FMouse::urxvt, buffer);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
keyboard->hasUnprocessedInput() = mouse->hasUnprocessedInput();
|
||||
|
|
|
@ -84,7 +84,8 @@ FKeyboard::~FKeyboard() // destructor
|
|||
//----------------------------------------------------------------------
|
||||
void FKeyboard::fetchKeyCode()
|
||||
{
|
||||
parseKeyBuffer();
|
||||
if ( fkey_queue.size() < MAX_QUEUE_SIZE )
|
||||
parseKeyBuffer();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -471,8 +472,7 @@ void FKeyboard::parseKeyBuffer()
|
|||
ssize_t bytesread{};
|
||||
FObject::getCurrentTime (&time_keypressed);
|
||||
|
||||
while ( fkey_queue.size() < MAX_QUEUE_SIZE
|
||||
&& (bytesread = readKey()) > 0 )
|
||||
while ( (bytesread = readKey()) > 0 )
|
||||
{
|
||||
has_pending_input = false;
|
||||
|
||||
|
@ -509,6 +509,9 @@ void FKeyboard::parseKeyBuffer()
|
|||
}
|
||||
|
||||
fkey = 0;
|
||||
|
||||
if ( fkey_queue.size() >= MAX_QUEUE_SIZE )
|
||||
break;
|
||||
}
|
||||
|
||||
read_character = 0;
|
||||
|
|
|
@ -1576,7 +1576,8 @@ void FMouseControl::processEvent (struct timeval* time)
|
|||
if ( mouse_object )
|
||||
{
|
||||
mouse_object->processEvent(time);
|
||||
fmousedata_queue.emplace(new FMouseData(std::move(*mouse_object)));
|
||||
const auto& md = static_cast<FMouseData>(*mouse_object);
|
||||
fmousedata_queue.emplace(new FMouseData(std::move(md)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ class FApplication : public FWidget
|
|||
void escapeKeyPressed() const;
|
||||
void mouseTracking();
|
||||
void performKeyboardAction();
|
||||
void performMouseAction();
|
||||
void performMouseAction() const;
|
||||
void mouseEvent (const FMouseData&);
|
||||
void sendEscapeKeyPressEvent() const;
|
||||
bool sendKeyDownEvent (FWidget*) const;
|
||||
|
|
Loading…
Reference in New Issue