Don't update the textbox canvas if the cursor alpha didn't change
This commit is contained in:
parent
a1f481f539
commit
640e28f731
1 changed files with 5 additions and 0 deletions
|
@ -269,6 +269,7 @@ void text_box_base::toggle_cursor_timer(bool enable)
|
|||
|
||||
void text_box_base::cursor_timer_callback()
|
||||
{
|
||||
unsigned was_alpha = cursor_alpha_;
|
||||
switch(state_) {
|
||||
case DISABLED:
|
||||
cursor_alpha_ = 0;
|
||||
|
@ -284,6 +285,10 @@ void text_box_base::cursor_timer_callback()
|
|||
}
|
||||
}
|
||||
|
||||
if(was_alpha == cursor_alpha_) {
|
||||
return;
|
||||
}
|
||||
|
||||
for(auto& tmp : get_canvases()) {
|
||||
tmp.set_variable("cursor_alpha", wfl::variant(cursor_alpha_));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue