mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibGUI: GTextBox should only run a caret blink timer when focused.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
GTextBox::GTextBox(GWidget* parent)
|
||||
: GWidget(parent)
|
||||
{
|
||||
start_timer(500);
|
||||
}
|
||||
|
||||
GTextBox::~GTextBox()
|
||||
@@ -138,3 +137,13 @@ void GTextBox::timer_event(GTimerEvent&)
|
||||
m_cursor_blink_state = !m_cursor_blink_state;
|
||||
update();
|
||||
}
|
||||
|
||||
void GTextBox::focusin_event(GEvent&)
|
||||
{
|
||||
start_timer(500);
|
||||
}
|
||||
|
||||
void GTextBox::focusout_event(GEvent&)
|
||||
{
|
||||
stop_timer();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user