mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibGUI: Add focus hooks to TextEditor
This commit is contained in:
parent
fd64be02e0
commit
c35493c156
Notes:
sideshowbarker
2024-07-19 04:25:31 +09:00
Author: https://github.com/alimpfard
Commit: c35493c156
Pull-request: https://github.com/SerenityOS/serenity/pull/2694
Issue: https://github.com/SerenityOS/serenity/issues/2685
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bugaevc
2 changed files with 6 additions and 0 deletions
|
@ -1152,11 +1152,15 @@ void TextEditor::focusin_event(Core::Event&)
|
|||
m_cursor_state = true;
|
||||
update_cursor();
|
||||
start_timer(500);
|
||||
if (on_focusin)
|
||||
on_focusin();
|
||||
}
|
||||
|
||||
void TextEditor::focusout_event(Core::Event&)
|
||||
{
|
||||
stop_timer();
|
||||
if (on_focusout)
|
||||
on_focusout();
|
||||
}
|
||||
|
||||
void TextEditor::timer_event(Core::TimerEvent&)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue