[gtk] widget: Queue an allocate on native widgets when changing opacity
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] widget: Queue an allocate on native widgets when changing opacity
- Date: Mon, 9 Sep 2019 15:47:11 +0000 (UTC)
commit 1339c425a8c9bbb33db45dac7c2d5c95c9f9c867
Author: Timm Bäder <mail baedert org>
Date: Wed Aug 28 14:24:50 2019 +0200
widget: Queue an allocate on native widgets when changing opacity
This way the opacity change works on toplevel windows on wayland.
gtk/gtkwidget.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 9dcfd581d5..9d33ffdb66 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11287,9 +11287,14 @@ gtk_widget_update_alpha (GtkWidget *widget)
if (_gtk_widget_get_realized (widget))
{
if (GTK_IS_NATIVE (widget))
- gdk_surface_set_opacity (priv->surface, priv->alpha / 255.0);
-
- gtk_widget_queue_draw (widget);
+ {
+ gdk_surface_set_opacity (priv->surface, priv->alpha / 255.0);
+ gtk_widget_queue_allocate (widget);
+ }
+ else
+ {
+ gtk_widget_queue_draw (widget);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]