diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-01-31 08:09:55 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-01-31 08:09:55 +0100 |
commit | 954288ab8136818299fa254561985777fc02e039 (patch) | |
tree | af09adc95dd5374d4c947505cdaac01d4019ead5 /source | |
parent | 714b5968d53427cd955c009bc80cc2da4ca941e3 (diff) |
Give overlay widget a parent, queue widget redraw on enable/disable
Diffstat (limited to 'source')
-rw-r--r-- | source/dialogs/dmenu.c | 1 | ||||
-rw-r--r-- | source/view.c | 3 | ||||
-rw-r--r-- | source/widgets/widget.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/source/dialogs/dmenu.c b/source/dialogs/dmenu.c index d317744e..c4f056a7 100644 --- a/source/dialogs/dmenu.c +++ b/source/dialogs/dmenu.c @@ -158,6 +158,7 @@ static void async_read_callback ( GObject *source_object, GAsyncResult *res, gpo } if ( !g_cancellable_is_cancelled ( pd->cancel ) ) { // Hack, don't use get active. + g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Clearing overlay"); rofi_view_set_overlay ( rofi_view_get_active (), NULL ); g_input_stream_close_async ( G_INPUT_STREAM ( stream ), G_PRIORITY_LOW, pd->cancel, async_close_callback, pd ); } diff --git a/source/view.c b/source/view.c index 8ac6de06..a2bbcee7 100644 --- a/source/view.c +++ b/source/view.c @@ -877,7 +877,7 @@ static void update_callback ( textbox *t, unsigned int index, void *udata, TextB void rofi_view_update ( RofiViewState *state, gboolean qr ) { - if ( !widget_need_redraw ( WIDGET ( state->main_window ) ) && !widget_need_redraw ( WIDGET ( state->overlay ) ) ) { + if ( !widget_need_redraw ( WIDGET ( state->main_window ) ) ) { return; } g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Redraw view" ); @@ -1585,6 +1585,7 @@ RofiViewState *rofi_view_create ( Mode *sw, } state->overlay = textbox_create ( "window.overlay", TB_AUTOWIDTH | TB_AUTOHEIGHT, URGENT, "blaat" ); + state->overlay->widget.parent = WIDGET(state->main_window); widget_disable ( WIDGET ( state->overlay ) ); state->list_view = listview_create ( "window.mainbox.listview", update_callback, state, config.element_height, end ); diff --git a/source/widgets/widget.c b/source/widgets/widget.c index c3460b06..32d1fe6f 100644 --- a/source/widgets/widget.c +++ b/source/widgets/widget.c @@ -81,6 +81,7 @@ void widget_enable ( widget *widget ) widget->enabled = TRUE; widget_update ( widget ); widget_update ( widget->parent ); + widget_queue_redraw ( widget ); } } void widget_disable ( widget *widget ) @@ -89,6 +90,7 @@ void widget_disable ( widget *widget ) widget->enabled = FALSE; widget_update ( widget ); widget_update ( widget->parent ); + widget_queue_redraw ( widget ); } } void widget_draw ( widget *widget, cairo_t *d ) |