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

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