[gtk/wip/baedert/for-master] 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/wip/baedert/for-master] widget: Queue an allocate on native widgets when changing opacity
- Date: Thu, 29 Aug 2019 14:51:05 +0000 (UTC)
commit 26fdc0bf9497b11859fbf9e6429af43ac0f77966
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 4b989c5720..02ea66db13 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]