From a1de9e1967d4be7d90d2bf8ce752283e2dc062af Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sun, 25 Dec 2016 21:53:27 -0500 Subject: Brightness: fix OSD rendering when not composited Also add style class msd-osd-window-solid, same as mate-settings-daemon volume control. Based on https://github.com/mate-desktop/mate-settings-daemon/commit/5d580b9985b61a486c8d23eaa34091a14d01b9e0 and https://github.com/mate-desktop/mate-settings-daemon/commit/9aa4c4e379e71ebe8436898a3af61c4c96c9cc8a --- src/msd-osd-window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msd-osd-window.c b/src/msd-osd-window.c index 89a9272..a5416b9 100644 --- a/src/msd-osd-window.c +++ b/src/msd-osd-window.c @@ -362,11 +362,11 @@ draw_when_not_composited (GtkWidget *widget, cairo_t *cr) int width; int height; - width = gtk_widget_get_allocated_width (widget); - height = gtk_widget_get_allocated_width (widget); + gtk_window_get_size (GTK_WINDOW (widget), &width, &height); context = gtk_widget_get_style_context (widget); gtk_style_context_set_state (context, GTK_STATE_FLAG_ACTIVE); + gtk_style_context_add_class(context,"msd-osd-window-solid"); gtk_render_frame (context, cr, 0, -- cgit v1.2.1