Blame SOURCES/vinagre-3.22.0-fullscreen-toolbar.patch

5d97d9
From 221dc7d785352a532264341785a779a3d3467f68 Mon Sep 17 00:00:00 2001
5d97d9
From: Marek Kasik <mkasik@redhat.com>
5d97d9
Date: Fri, 24 Mar 2017 14:26:57 +0100
5d97d9
Subject: [PATCH] Fix showing of toolbar in fullscreen mode
5d97d9
5d97d9
Draw children of ovBox when needed. Automatic drawing
5d97d9
of subwindows of widgets was removed in Gtk+ commit
5d97d9
580ea227a6bb19ad6c6d4766b3a36dbad24583f3
5d97d9
(widget: Redo drawing code).
5d97d9
5d97d9
https://bugzilla.gnome.org/show_bug.cgi?id=770484
5d97d9
---
5d97d9
 vinagre/view/ovBox.c | 31 +++++++++++++++++++++++++++++++
5d97d9
 1 file changed, 31 insertions(+)
5d97d9
5d97d9
diff --git a/vinagre/view/ovBox.c b/vinagre/view/ovBox.c
5d97d9
index 6f0ee73..3344871 100644
5d97d9
--- a/vinagre/view/ovBox.c
5d97d9
+++ b/vinagre/view/ovBox.c
5d97d9
@@ -459,6 +459,32 @@ ViewOvBoxUnrealize(GtkWidget *widget) // IN
5d97d9
 
5d97d9
 }
5d97d9
 
5d97d9
+static gint
5d97d9
+ViewOvBoxDraw(GtkWidget *widget, // IN
5d97d9
+              cairo_t   *cr)     // IN
5d97d9
+{
5d97d9
+  ViewOvBox *that;
5d97d9
+  ViewOvBoxPrivate *priv;
5d97d9
+  int wx, wy;
5d97d9
+
5d97d9
+  that = VIEW_OV_BOX(widget);
5d97d9
+  priv = that->priv;
5d97d9
+
5d97d9
+  gdk_window_get_position (priv->underWin, &wx, &wy;;
5d97d9
+  cairo_save (cr);
5d97d9
+  cairo_translate (cr, wx, wy);
5d97d9
+  gtk_widget_draw (priv->under, cr);
5d97d9
+  cairo_restore (cr);
5d97d9
+
5d97d9
+  gdk_window_get_position (priv->overWin, &wx, &wy;;
5d97d9
+  cairo_save (cr);
5d97d9
+  cairo_translate (cr, wx, wy);
5d97d9
+  gtk_widget_draw (priv->over, cr);
5d97d9
+  cairo_restore (cr);
5d97d9
+
5d97d9
+  return FALSE;
5d97d9
+}
5d97d9
+
5d97d9
 
5d97d9
 /*
5d97d9
  *-----------------------------------------------------------------------------
5d97d9
@@ -714,6 +740,11 @@ ViewOvBoxClassInit(ViewOvBoxClass *klass) // IN
5d97d9
    widgetClass->size_allocate = ViewOvBoxSizeAllocate;
5d97d9
    widgetClass->style_set = ViewOvBoxStyleSet;
5d97d9
 
5d97d9
+   if ((gtk_major_version > (3)) ||
5d97d9
+       (gtk_major_version == (3) && gtk_minor_version > (19)) ||
5d97d9
+       (gtk_major_version == (3) && gtk_minor_version == (19) && gtk_micro_version >= (7)))
5d97d9
+     widgetClass->draw = ViewOvBoxDraw;
5d97d9
+
5d97d9
    klass->set_over = ViewOvBoxSetOver;
5d97d9
 
5d97d9
    parentClass = g_type_class_peek_parent(klass);
5d97d9
-- 
5d97d9
2.12.1
5d97d9