hubbitus pushed to remmina (f21). "- Add Patch0: remmina-1.2-issue-529-cherry-pick-origin_nbdnd_6c1e9632d.patch (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Mar 27 10:09:34 UTC 2015


>From c4faa06bc1089f125eac2f8e8d412f87a60d31c0 Mon Sep 17 00:00:00 2001
From: Hubbitus <pahan at hubbitus.info>
Date: Fri, 27 Mar 2015 13:07:07 +0300
Subject: - Add Patch0:
 remmina-1.2-issue-529-cherry-pick-origin_nbdnd_6c1e9632d.patch   
 (cherry-pick and rebase for 1.1 version) with hope fix segfault (bz#1190093):
    https://github.com/FreeRDP/Remmina/issues/529#issuecomment-85707413


diff --git a/remmina-1.2-issue-529-cherry-pick-origin_nbdnd_6c1e9632d.patch b/remmina-1.2-issue-529-cherry-pick-origin_nbdnd_6c1e9632d.patch
new file mode 100644
index 0000000..b30e82b
--- /dev/null
+++ b/remmina-1.2-issue-529-cherry-pick-origin_nbdnd_6c1e9632d.patch
@@ -0,0 +1,93 @@
+diff -ur Remmina-c0e716961522858b173d9faf77d9bca63fb51cec/remmina/src/remmina_connection_window.c Remmina-c0e716961522858b173d9faf77d9bca63fb51cec.work/remmina/src/remmina_connection_window.c
+--- Remmina-c0e716961522858b173d9faf77d9bca63fb51cec/remmina/src/remmina_connection_window.c	2014-12-08 23:29:27.000000000 +0300
++++ Remmina-c0e716961522858b173d9faf77d9bca63fb51cec.work/remmina/src/remmina_connection_window.c	2015-03-27 11:19:18.140155609 +0300
+@@ -139,6 +139,8 @@
+ static void remmina_connection_holder_create_scrolled(RemminaConnectionHolder* cnnhld, RemminaConnectionObject* cnnobj);
+ static void remmina_connection_holder_create_fullscreen(RemminaConnectionHolder* cnnhld, RemminaConnectionObject* cnnobj,
+ 		gint view_mode);
++static gboolean remmina_connection_window_hostkey_func(RemminaProtocolWidget* gp, guint keyval, gboolean release,
++		RemminaConnectionHolder* cnnhld);
+ 
+ #if GTK_VERSION == 3
+ static void remmina_connection_window_class_init(RemminaConnectionWindowClass* klass)
+@@ -1995,28 +1997,24 @@
+ 	else
+ 	{
+ 		/* View mode changed. Migrate all existing connections to the new notebook */
+-		c = gtk_notebook_get_current_page(from);
+-		n = gtk_notebook_get_n_pages(from);
+-		for (i = 0; i < n; i++)
+-		{
+-			widget = gtk_notebook_get_nth_page(from, i);
+-			cnnobj = (RemminaConnectionObject*) g_object_get_data(G_OBJECT(widget), "cnnobj");
+-
+-			tab = remmina_connection_object_create_tab(cnnobj);
+-			remmina_connection_object_append_page(cnnobj, to, tab, view_mode);
+-
+-#if GTK_VERSION == 3		
+-			/* Reparent cnnobj->viewport */
+-			g_object_ref(cnnobj->viewport);
+-			gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(cnnobj->viewport)), cnnobj->viewport);
+-			gtk_container_add(GTK_CONTAINER(cnnobj->scrolled_container), cnnobj->viewport );
+-			g_object_unref(cnnobj->viewport);
+-#elif GTK_VERSION == 2
+-			gtk_widget_reparent(cnnobj->viewport, cnnobj->scrolled_container);
+-#endif
++		if (from != NULL && GTK_IS_NOTEBOOK(from)) {
++			c = gtk_notebook_get_current_page(from);
++			n = gtk_notebook_get_n_pages(from);
++			for (i = 0; i < n; i++)
++			{
++				widget = gtk_notebook_get_nth_page(from, i);
++				cnnobj = (RemminaConnectionObject*) g_object_get_data(G_OBJECT(widget), "cnnobj");
+ 
++				tab = remmina_connection_object_create_tab(cnnobj);
++				remmina_connection_object_append_page(cnnobj, to, tab, view_mode);
++
++				/* Reparent cnnobj->viewport */
++				G_GNUC_BEGIN_IGNORE_DEPRECATIONS
++				gtk_widget_reparent(cnnobj->viewport, cnnobj->scrolled_container);
++				G_GNUC_END_IGNORE_DEPRECATIONS
++			}
++			gtk_notebook_set_current_page(to, c);
+ 		}
+-		gtk_notebook_set_current_page(to, c);
+ 	}
+ }
+ 
+@@ -2109,6 +2107,7 @@
+ 	srccnnwin = REMMINA_CONNECTION_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(notebook)));
+ 	dstcnnwin = REMMINA_CONNECTION_WINDOW(remmina_widget_pool_find_by_window(REMMINA_TYPE_CONNECTION_WINDOW, window));
+ 
++
+ 	if (srccnnwin == dstcnnwin)
+ 		return NULL;
+ 
+@@ -2125,12 +2124,23 @@
+ 	else
+ 	{
+ 		cnnobj->cnnhld = g_new0(RemminaConnectionHolder, 1);
+-	}
++		if (!cnnobj->cnnhld->cnnwin)
++		{
++			/* Create a new scrolled window to accomodate the dropped connection */
++			remmina_connection_holder_create_scrolled(cnnobj->cnnhld, NULL);
+ 
+-	g_signal_emit_by_name(cnnobj->proto, "connect", cnnobj);
+-	gtk_notebook_remove_page(GTK_NOTEBOOK(srccnnwin->priv->notebook), srcpagenum);
++			/* We must resize the new window here: remmina_connection_holder_check_resize() failed
++			 * to set initial size because it has no notebook page on the window. So, we do resize
++			 * manually here */
++			gtk_window_resize( GTK_WINDOW(cnnobj->cnnhld->cnnwin),
++				remmina_file_get_int (cnnobj->remmina_file, "window_width", 640),
++				remmina_file_get_int (cnnobj->remmina_file, "window_height", 480));
++		}
++	}
+ 
+-	return NULL;
++	remmina_protocol_widget_set_hostkey_func(REMMINA_PROTOCOL_WIDGET(cnnobj->proto),
++			(RemminaHostkeyFunc) remmina_connection_window_hostkey_func, cnnobj->cnnhld);
++	return GTK_NOTEBOOK(cnnobj->cnnhld->cnnwin->priv->notebook);
+ }
+ 
+ static GtkWidget*
diff --git a/remmina.spec b/remmina.spec
index 5feb2c9..420d9a5 100644
--- a/remmina.spec
+++ b/remmina.spec
@@ -6,7 +6,7 @@
 
 Name:           remmina
 Version:        1.1.2
-Release:        1%{?shortcommit:.git.%{shortcommit}}%{?dist}
+Release:        2%{?shortcommit:.git.%{shortcommit}}%{?dist}
 Summary:        Remote Desktop Client
 
 License:        GPLv2+ and MIT
@@ -39,6 +39,8 @@ BuildRequires:  vte3-devel
 
 # https://github.com/FreeRDP/Remmina/issues/228
 Patch0:         %{name}-rfx_context_new.patch
+# https://github.com/FreeRDP/Remmina/issues/529#issuecomment-85707413
+Patch1:         remmina-1.2-issue-529-cherry-pick-origin_nbdnd_6c1e9632d.patch
 
 # We don't ship the remmina-plugins-common package any longer
 Provides:       remmina-plugins-common = %{version}
@@ -149,6 +151,7 @@ client.
 %setup -qn Remmina-%{commit}
 
 %patch0 -p1 -b .rfx_context_new
+%patch1 -p1 -b .issue529
 
 # Do not install tools into user home directory
 sed -i \
@@ -304,6 +307,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Thu Mar 26 2015 Pavel Alexeev <Pahan at Hubbitus.info> - 1.1.2-2
+- Add Patch0: remmina-1.2-issue-529-cherry-pick-origin_nbdnd_6c1e9632d.patch
+   (cherry-pick and rebase for 1.1 version) with hope fix segfault (bz#1190093):
+   https://github.com/FreeRDP/Remmina/issues/529#issuecomment-85707413
+
 * Tue Feb 24 2015 Simone Caronni <negativo17 at gmail.com> - 1.1.2-1
 - Update to 1.1.2 (#1176046, #1195431).
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/remmina.git/commit/?h=f21&id=c4faa06bc1089f125eac2f8e8d412f87a60d31c0


More information about the scm-commits mailing list