mirror of
https://github.com/lbonn/rofi
synced 2024-11-27 22:30:37 +00:00
Only queue redraw when state actually changes
This commit is contained in:
parent
f45e910a1b
commit
0e037237f8
1 changed files with 6 additions and 4 deletions
|
@ -18,11 +18,13 @@ void widget_init ( widget *widget , const char *name )
|
|||
|
||||
void widget_set_state ( widget *widget, const char *state )
|
||||
{
|
||||
widget->state = state;
|
||||
// Update border.
|
||||
widget->border = rofi_theme_get_padding ( widget, "border", widget->border);
|
||||
if ( g_strcmp0(widget->state, state ) ){
|
||||
widget->state = state;
|
||||
// Update border.
|
||||
widget->border = rofi_theme_get_padding ( widget, "border", widget->border);
|
||||
|
||||
widget->need_redraw = TRUE;
|
||||
widget_queue_redraw ( widget );
|
||||
}
|
||||
}
|
||||
|
||||
int widget_intersect ( const widget *widget, int x, int y )
|
||||
|
|
Loading…
Reference in a new issue