mirror of
https://github.com/davatorium/rofi.git
synced 2025-01-27 15:25:24 -05: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 )
|
void widget_set_state ( widget *widget, const char *state )
|
||||||
{
|
{
|
||||||
|
if ( g_strcmp0(widget->state, state ) ){
|
||||||
widget->state = state;
|
widget->state = state;
|
||||||
// Update border.
|
// Update border.
|
||||||
widget->border = rofi_theme_get_padding ( widget, "border", widget->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 )
|
int widget_intersect ( const widget *widget, int x, int y )
|
||||||
|
|
Loading…
Add table
Reference in a new issue