Attempt build master branch of Remmina and freerdp in rawhide. They are built (see my copr repo http://copr.fedoraproject.org/coprs/hubbitus/test/repo/fedora-rawhide-i386/hubbitus-test-fedora-rawhide-i386.repo) but still segfaults: https://github.com/FreeRDP/Remmina/issues/269 https://github.com/FreeRDP/Remmina/issues/270 Arm build also failed: http://koji.fedoraproject.org/koji/taskinfo?taskID=6872274 Meantime commit is not so bad because it already have broken deps in rawhide and even failed to build now (from mail): -- from mail -- remmina has broken dependencies in the rawhide tree: On x86_64: remmina-1.0.0-8.fc20.x86_64 requires libgcrypt.so.11(GCRYPT_1.2)(64bit) remmina-1.0.0-8.fc20.x86_64 requires libgcrypt.so.11()(64bit) On i386: remmina-1.0.0-8.fc20.i686 requires libgcrypt.so.11(GCRYPT_1.2) remmina-1.0.0-8.fc20.i686 requires libgcrypt.so.11 On armhfp: remmina-1.0.0-8.fc20.armv7hl requires libgcrypt.so.11(GCRYPT_1.2) remmina-1.0.0-8.fc20.armv7hl requires libgcrypt.so.11 On x86_64: remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-rail.so.1.0()(64bit) remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-kbd.so.1.0()(64bit) remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-gdi.so.1.0()(64bit) remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-core.so.1.0()(64bit) remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-codec.so.1.0()(64bit) remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-channels.so.1.0()(64bit) On i386: remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-rail.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-kbd.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-gdi.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-core.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-codec.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-channels.so.1.0 On armhfp: remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-rail.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-kbd.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-gdi.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-core.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-codec.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-channels.so.1.0 Please resolve this as soon as possible. -- /from mail --epel8
parent
361777dac8
commit
da4b3887ee
@ -1,82 +0,0 @@
|
|||||||
From fe1b698e4a6bba7783edcb3d0431e6acb24323f4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Sun, 22 Apr 2012 23:08:47 +0200
|
|
||||||
Subject: [PATCH] Also handle GDK_SCROLL_SMOOTH
|
|
||||||
|
|
||||||
---
|
|
||||||
remmina-plugins/rdp/rdp_event.c | 9 +++++++++
|
|
||||||
remmina-plugins/vnc/vnc_plugin.c | 12 ++++++++++++
|
|
||||||
remmina/src/remmina_connection_window.c | 14 ++++++++++++++
|
|
||||||
3 files changed, 35 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c
|
|
||||||
index de8e01f..3d3e67a 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_event.c
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_event.c
|
|
||||||
@@ -377,6 +377,15 @@ static gboolean remmina_rdp_event_on_scroll(GtkWidget* widget, GdkEventScroll* e
|
|
||||||
case GDK_SCROLL_DOWN:
|
|
||||||
flag = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
|
|
||||||
break;
|
|
||||||
+
|
|
||||||
+ case GDK_SCROLL_SMOOTH:
|
|
||||||
+ if (event->delta_y < 0)
|
|
||||||
+ flag = PTR_FLAGS_WHEEL | 0x0078;
|
|
||||||
+ if (event->delta_y > 0)
|
|
||||||
+ flag = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
|
|
||||||
+ if (!flag)
|
|
||||||
+ return FALSE;
|
|
||||||
+ break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
diff --git a/remmina-plugins/vnc/vnc_plugin.c b/remmina-plugins/vnc/vnc_plugin.c
|
|
||||||
index 0321057..f000ccb 100644
|
|
||||||
--- a/remmina-plugins/vnc/vnc_plugin.c
|
|
||||||
+++ b/remmina-plugins/vnc/vnc_plugin.c
|
|
||||||
@@ -1426,6 +1426,18 @@ static gboolean remmina_plugin_vnc_on_scroll(GtkWidget *widget, GdkEventScroll *
|
|
||||||
case GDK_SCROLL_RIGHT:
|
|
||||||
mask = (1 << 6);
|
|
||||||
break;
|
|
||||||
+ case GDK_SCROLL_SMOOTH:
|
|
||||||
+ if (event->delta_y < 0)
|
|
||||||
+ mask = (1 << 3);
|
|
||||||
+ if (event->delta_y > 0)
|
|
||||||
+ mask = (1 << 4);
|
|
||||||
+ if (event->delta_x < 0)
|
|
||||||
+ mask = (1 << 5);
|
|
||||||
+ if (event->delta_x > 0)
|
|
||||||
+ mask = (1 << 6);
|
|
||||||
+ if (!mask)
|
|
||||||
+ return FALSE;
|
|
||||||
+ break;
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
diff --git a/remmina/src/remmina_connection_window.c b/remmina/src/remmina_connection_window.c
|
|
||||||
index dfcc353..5487697 100644
|
|
||||||
--- a/remmina/src/remmina_connection_window.c
|
|
||||||
+++ b/remmina/src/remmina_connection_window.c
|
|
||||||
@@ -1477,6 +1477,20 @@ static gboolean remmina_connection_holder_toolbar_scroll(GtkWidget* widget, GdkE
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
+ case GDK_SCROLL_SMOOTH:
|
|
||||||
+ if (event->delta_y < 0 && opacity > 0)
|
|
||||||
+ {
|
|
||||||
+ remmina_file_set_int(cnnobj->remmina_file, "toolbar_opacity", opacity - 1);
|
|
||||||
+ remmina_connection_holder_update_toolbar_opacity(cnnhld);
|
|
||||||
+ return TRUE;
|
|
||||||
+ }
|
|
||||||
+ if (event->delta_y > 0 && opacity < TOOLBAR_OPACITY_LEVEL)
|
|
||||||
+ {
|
|
||||||
+ remmina_file_set_int(cnnobj->remmina_file, "toolbar_opacity", opacity + 1);
|
|
||||||
+ remmina_connection_holder_update_toolbar_opacity(cnnhld);
|
|
||||||
+ return TRUE;
|
|
||||||
+ }
|
|
||||||
+ break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.8.1.6
|
|
||||||
|
|
@ -1,663 +0,0 @@
|
|||||||
From 3ebdd6e7b0ee53ecdaf0d14bada6b92e7334b12a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Mon, 30 Apr 2012 23:10:04 +0200
|
|
||||||
Subject: [PATCH] Add clipboard support
|
|
||||||
|
|
||||||
---
|
|
||||||
remmina-plugins/rdp/CMakeLists.txt | 2 +
|
|
||||||
remmina-plugins/rdp/rdp_cliprdr.c | 459 ++++++++++++++++++++++++++++++++++++
|
|
||||||
remmina-plugins/rdp/rdp_cliprdr.h | 33 +++
|
|
||||||
remmina-plugins/rdp/rdp_event.c | 19 ++
|
|
||||||
remmina-plugins/rdp/rdp_plugin.c | 15 ++
|
|
||||||
remmina-plugins/rdp/rdp_plugin.h | 6 +-
|
|
||||||
6 files changed, 533 insertions(+), 1 deletion(-)
|
|
||||||
create mode 100644 remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
create mode 100644 remmina-plugins/rdp/rdp_cliprdr.h
|
|
||||||
|
|
||||||
diff --git a/remmina-plugins/rdp/CMakeLists.txt b/remmina-plugins/rdp/CMakeLists.txt
|
|
||||||
index e3ec20b..8ae4a4d 100644
|
|
||||||
--- a/remmina-plugins/rdp/CMakeLists.txt
|
|
||||||
+++ b/remmina-plugins/rdp/CMakeLists.txt
|
|
||||||
@@ -33,6 +33,8 @@ set(REMMINA_PLUGIN_RDP_SRCS
|
|
||||||
rdp_gdi.h
|
|
||||||
rdp_graphics.c
|
|
||||||
rdp_graphics.h
|
|
||||||
+ rdp_cliprdr.c
|
|
||||||
+ rdp_cliprdr.h
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(remmina-plugin-rdp ${REMMINA_PLUGIN_RDP_SRCS})
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..0821ffa
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
@@ -0,0 +1,459 @@
|
|
||||||
+/*
|
|
||||||
+ * Remmina - The GTK+ Remote Desktop Client
|
|
||||||
+ * Copyright (C) 2012-2012 Jean-Louis Dupond
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or modify
|
|
||||||
+ * it under the terms of the GNU General Public License as published by
|
|
||||||
+ * the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ * (at your option) any later version.
|
|
||||||
+ *
|
|
||||||
+ * This program is distributed in the hope that it will be useful,
|
|
||||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ * GNU General Public License for more details.
|
|
||||||
+ *
|
|
||||||
+ * You should have received a copy of the GNU General Public License
|
|
||||||
+ * along with this program; if not, write to the Free Software
|
|
||||||
+ * Foundation, Inc., 59 Temple Place, Suite 330,
|
|
||||||
+ * Boston, MA 02111-1307, USA.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include "rdp_plugin.h"
|
|
||||||
+#include "rdp_cliprdr.h"
|
|
||||||
+
|
|
||||||
+#include <freerdp/freerdp.h>
|
|
||||||
+#include <freerdp/utils/memory.h>
|
|
||||||
+#include <freerdp/channels/channels.h>
|
|
||||||
+#include <freerdp/plugins/cliprdr.h>
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Get the formats we can export based on the current clipboard data.
|
|
||||||
+ */
|
|
||||||
+void remmina_rdp_cliprdr_get_target_types(uint32** dst_formats, uint16* size, GdkAtom* types, int count)
|
|
||||||
+{
|
|
||||||
+ int i;
|
|
||||||
+ gboolean image = FALSE;
|
|
||||||
+ gboolean text = FALSE;
|
|
||||||
+ gboolean textutf8 = FALSE;
|
|
||||||
+ int matches = 1;
|
|
||||||
+ uint32* formats = (uint32*) xmalloc(sizeof(uint32) * 10);
|
|
||||||
+
|
|
||||||
+ formats[0] = CB_FORMAT_RAW;
|
|
||||||
+ for (i = 0; i < count; i++)
|
|
||||||
+ {
|
|
||||||
+ GdkAtom atom = GDK_POINTER_TO_ATOM(types[i]);
|
|
||||||
+ gchar* name = gdk_atom_name(atom);
|
|
||||||
+ if (g_strcmp0("UTF8_STRING", name) == 0 || g_strcmp0("text/plain;charset=utf-8", name) == 0)
|
|
||||||
+ {
|
|
||||||
+ textutf8 = TRUE;
|
|
||||||
+ }
|
|
||||||
+ if (g_strcmp0("TEXT", name) == 0 || g_strcmp0("text/plain", name) == 0)
|
|
||||||
+ {
|
|
||||||
+ text = TRUE;
|
|
||||||
+ }
|
|
||||||
+ if (g_strcmp0("text/html", name) == 0)
|
|
||||||
+ {
|
|
||||||
+ formats[matches] = CB_FORMAT_HTML;
|
|
||||||
+ matches++;
|
|
||||||
+ }
|
|
||||||
+ if (g_strcmp0("image/png", name) == 0)
|
|
||||||
+ {
|
|
||||||
+ formats[matches] = CB_FORMAT_PNG;
|
|
||||||
+ image = TRUE;
|
|
||||||
+ matches++;
|
|
||||||
+ }
|
|
||||||
+ if (g_strcmp0("image/jpeg", name) == 0)
|
|
||||||
+ {
|
|
||||||
+ formats[matches] = CB_FORMAT_JPEG;
|
|
||||||
+ image = TRUE;
|
|
||||||
+ matches++;
|
|
||||||
+ }
|
|
||||||
+ if (g_strcmp0("image/bmp", name) == 0)
|
|
||||||
+ {
|
|
||||||
+ formats[matches] = CB_FORMAT_DIB;
|
|
||||||
+ image = TRUE;
|
|
||||||
+ matches++;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ //Only add text formats if we don't have image formats
|
|
||||||
+ if (!image)
|
|
||||||
+ {
|
|
||||||
+ if (textutf8)
|
|
||||||
+ {
|
|
||||||
+ formats[matches] = CB_FORMAT_UNICODETEXT;
|
|
||||||
+ matches++;
|
|
||||||
+ }
|
|
||||||
+ if (text)
|
|
||||||
+ {
|
|
||||||
+ formats[matches] = CB_FORMAT_TEXT;
|
|
||||||
+ matches++;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ *size = (uint16)matches;
|
|
||||||
+ *dst_formats = (uint32*) xmalloc(sizeof(uint32) * matches);
|
|
||||||
+ memcpy(*dst_formats, formats, sizeof(uint32) * matches);
|
|
||||||
+ g_free(formats);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int remmina_rdp_cliprdr_send_format_list_event(RemminaProtocolWidget* gp)
|
|
||||||
+{
|
|
||||||
+ GtkClipboard* clipboard;
|
|
||||||
+ GdkAtom* targets;
|
|
||||||
+ gboolean result = 0;
|
|
||||||
+ gint count;
|
|
||||||
+ RDP_EVENT* rdp_event;
|
|
||||||
+ RDP_CB_FORMAT_LIST_EVENT* format_list_event;
|
|
||||||
+ rfContext* rfi = GET_DATA(gp);
|
|
||||||
+
|
|
||||||
+ /* Lets see if we have something in our clipboard */
|
|
||||||
+ THREADS_ENTER
|
|
||||||
+ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD);
|
|
||||||
+ if (clipboard)
|
|
||||||
+ {
|
|
||||||
+ result = gtk_clipboard_wait_for_targets(clipboard, &targets, &count);
|
|
||||||
+ }
|
|
||||||
+ THREADS_LEAVE
|
|
||||||
+
|
|
||||||
+ if (!result)
|
|
||||||
+ return 1;
|
|
||||||
+
|
|
||||||
+ int i;
|
|
||||||
+ for (i = 0; i < count; i++)
|
|
||||||
+ {
|
|
||||||
+ g_printf("Target %d: %s\n", i, gdk_atom_name(targets[i]));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ rdp_event = (RDP_EVENT*) xnew(RDP_CB_FORMAT_LIST_EVENT);
|
|
||||||
+ rdp_event->event_class = RDP_EVENT_CLASS_CLIPRDR;
|
|
||||||
+ rdp_event->event_type = RDP_EVENT_TYPE_CB_FORMAT_LIST;
|
|
||||||
+ format_list_event = (RDP_CB_FORMAT_LIST_EVENT*) rdp_event;
|
|
||||||
+
|
|
||||||
+ remmina_rdp_cliprdr_get_target_types(&format_list_event->formats, &format_list_event->num_formats, targets, count);
|
|
||||||
+ g_free(targets);
|
|
||||||
+
|
|
||||||
+ int num_formats = format_list_event->num_formats;
|
|
||||||
+ g_printf("Sending %d formats\n", num_formats);
|
|
||||||
+ for (i = 0; i < num_formats; i++)
|
|
||||||
+ {
|
|
||||||
+ g_printf("Sending format %#X\n", format_list_event->formats[i]);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return freerdp_channels_send_event(rfi->channels, (RDP_EVENT*) format_list_event);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static uint8* lf2crlf(uint8* data, int* size)
|
|
||||||
+{
|
|
||||||
+ uint8 c;
|
|
||||||
+ uint8* outbuf;
|
|
||||||
+ uint8* out;
|
|
||||||
+ uint8* in_end;
|
|
||||||
+ uint8* in;
|
|
||||||
+ int out_size;
|
|
||||||
+
|
|
||||||
+ out_size = (*size) * 2 + 1;
|
|
||||||
+ outbuf = (uint8*) xmalloc(out_size);
|
|
||||||
+ out = outbuf;
|
|
||||||
+ in = data;
|
|
||||||
+ in_end = data + (*size);
|
|
||||||
+
|
|
||||||
+ while (in < in_end)
|
|
||||||
+ {
|
|
||||||
+ c = *in++;
|
|
||||||
+ if (c == '\n')
|
|
||||||
+ {
|
|
||||||
+ *out++ = '\r';
|
|
||||||
+ *out++ = '\n';
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ *out++ = c;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ *out++ = 0;
|
|
||||||
+ *size = out - outbuf;
|
|
||||||
+
|
|
||||||
+ return outbuf;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void crlf2lf(uint8* data, int* size)
|
|
||||||
+{
|
|
||||||
+ uint8 c;
|
|
||||||
+ uint8* out;
|
|
||||||
+ uint8* in;
|
|
||||||
+ uint8* in_end;
|
|
||||||
+
|
|
||||||
+ out = data;
|
|
||||||
+ in = data;
|
|
||||||
+ in_end = data + (*size);
|
|
||||||
+
|
|
||||||
+ while (in < in_end)
|
|
||||||
+ {
|
|
||||||
+ c = *in++;
|
|
||||||
+
|
|
||||||
+ if (c != '\r')
|
|
||||||
+ *out++ = c;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ *size = out - data;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, int* size)
|
|
||||||
+{
|
|
||||||
+ g_printf("GetData: Requested Format: %#X\n", format);
|
|
||||||
+ rfContext* rfi = GET_DATA(gp);
|
|
||||||
+ GtkClipboard* clipboard;
|
|
||||||
+ uint8* inbuf = NULL;
|
|
||||||
+ uint8* outbuf = NULL;
|
|
||||||
+ GdkPixbuf *image = NULL;
|
|
||||||
+
|
|
||||||
+ THREADS_ENTER
|
|
||||||
+ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD);
|
|
||||||
+ if (clipboard)
|
|
||||||
+ {
|
|
||||||
+ if (format == CB_FORMAT_TEXT || format == CB_FORMAT_UNICODETEXT || format == CB_FORMAT_HTML)
|
|
||||||
+ {
|
|
||||||
+ inbuf = (uint8*)gtk_clipboard_wait_for_text(clipboard);
|
|
||||||
+ }
|
|
||||||
+ if (format == CB_FORMAT_PNG || format == CB_FORMAT_JPEG || format == CB_FORMAT_DIB)
|
|
||||||
+ {
|
|
||||||
+ image = gtk_clipboard_wait_for_image(clipboard);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ THREADS_LEAVE
|
|
||||||
+
|
|
||||||
+ if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT)
|
|
||||||
+ {
|
|
||||||
+ lf2crlf(inbuf, size);
|
|
||||||
+ if (format == CB_FORMAT_TEXT)
|
|
||||||
+ {
|
|
||||||
+ outbuf = inbuf;
|
|
||||||
+ }
|
|
||||||
+ if (format == CB_FORMAT_HTML)
|
|
||||||
+ {
|
|
||||||
+ //TODO: check if we need special handling for HTML
|
|
||||||
+ outbuf = inbuf;
|
|
||||||
+ }
|
|
||||||
+ if (format == CB_FORMAT_UNICODETEXT)
|
|
||||||
+ {
|
|
||||||
+ size_t out_size;
|
|
||||||
+ UNICONV* uniconv;
|
|
||||||
+
|
|
||||||
+ uniconv = freerdp_uniconv_new();
|
|
||||||
+ outbuf = (uint8*) freerdp_uniconv_out(uniconv, (char*) inbuf, &out_size);
|
|
||||||
+ freerdp_uniconv_free(uniconv);
|
|
||||||
+ *size = out_size + 2;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ if (format == CB_FORMAT_PNG || format == CB_FORMAT_JPEG || format == CB_FORMAT_DIB)
|
|
||||||
+ {
|
|
||||||
+ gchar* data;
|
|
||||||
+ gsize buffersize;
|
|
||||||
+ if (format == CB_FORMAT_PNG)
|
|
||||||
+ {
|
|
||||||
+ gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "png", NULL, NULL);
|
|
||||||
+ memcpy(outbuf, data, buffersize);
|
|
||||||
+ }
|
|
||||||
+ if (format == CB_FORMAT_JPEG)
|
|
||||||
+ {
|
|
||||||
+ gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "jpeg", NULL, NULL);
|
|
||||||
+ memcpy(outbuf, data, buffersize);
|
|
||||||
+ }
|
|
||||||
+ if (format == CB_FORMAT_DIB)
|
|
||||||
+ {
|
|
||||||
+ gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "bmp", NULL, NULL);
|
|
||||||
+ *size = buffersize - 14;
|
|
||||||
+ g_printf("Size of pixels: %d\n", *size);
|
|
||||||
+ outbuf = (uint8*) xmalloc(*size);
|
|
||||||
+ memcpy(outbuf, data + 14, *size);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!outbuf)
|
|
||||||
+ outbuf = (uint8*)"";
|
|
||||||
+
|
|
||||||
+ return outbuf;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVENT* event)
|
|
||||||
+{
|
|
||||||
+ g_printf("Received RDP_EVENT_TYPE_CB_DATA_RESPONSE\n");
|
|
||||||
+
|
|
||||||
+ GtkClipboard* clipboard;
|
|
||||||
+ GdkPixbuf *image = NULL;
|
|
||||||
+ uint8* data;
|
|
||||||
+ int size;
|
|
||||||
+ gboolean text = FALSE;
|
|
||||||
+ gboolean img = FALSE;
|
|
||||||
+ rfContext* rfi = GET_DATA(gp);
|
|
||||||
+ RDP_CB_DATA_RESPONSE_EVENT* data_response_event;
|
|
||||||
+
|
|
||||||
+ data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*) event;
|
|
||||||
+ data = data_response_event->data;
|
|
||||||
+ size = data_response_event->size;
|
|
||||||
+
|
|
||||||
+ g_printf("Requested format was: 0x%x\n", rfi->requested_format);
|
|
||||||
+
|
|
||||||
+ if (rfi->requested_format == CB_FORMAT_TEXT || rfi->requested_format == CB_FORMAT_UNICODETEXT || rfi->requested_format == CB_FORMAT_HTML)
|
|
||||||
+ {
|
|
||||||
+ if (rfi->requested_format == CB_FORMAT_UNICODETEXT)
|
|
||||||
+ {
|
|
||||||
+ UNICONV* uniconv;
|
|
||||||
+
|
|
||||||
+ uniconv = freerdp_uniconv_new();
|
|
||||||
+ data = (uint8*) freerdp_uniconv_in(uniconv, data, size);
|
|
||||||
+ size = strlen((char*) data);
|
|
||||||
+ freerdp_uniconv_free(uniconv);
|
|
||||||
+ }
|
|
||||||
+ crlf2lf(data, &size);
|
|
||||||
+ text = TRUE;
|
|
||||||
+ }
|
|
||||||
+ if (rfi->requested_format == CB_FORMAT_DIB || rfi->requested_format == CB_FORMAT_PNG || rfi->requested_format == CB_FORMAT_JPEG)
|
|
||||||
+ {
|
|
||||||
+ /* Reconstruct header */
|
|
||||||
+ if (rfi->requested_format == CB_FORMAT_DIB)
|
|
||||||
+ {
|
|
||||||
+ STREAM* s;
|
|
||||||
+ uint16 bpp;
|
|
||||||
+ uint32 offset;
|
|
||||||
+ uint32 ncolors;
|
|
||||||
+
|
|
||||||
+ s = stream_new(0);
|
|
||||||
+ stream_attach(s, data, size);
|
|
||||||
+ stream_seek(s, 14);
|
|
||||||
+ stream_read_uint16(s, bpp);
|
|
||||||
+ stream_read_uint32(s, ncolors);
|
|
||||||
+ offset = 14 + 40 + (bpp <= 8 ? (ncolors == 0 ? (1 << bpp) : ncolors) * 4 : 0);
|
|
||||||
+ stream_detach(s);
|
|
||||||
+ stream_free(s);
|
|
||||||
+
|
|
||||||
+ s = stream_new(14 + size);
|
|
||||||
+ stream_write_uint8(s, 'B');
|
|
||||||
+ stream_write_uint8(s, 'M');
|
|
||||||
+ stream_write_uint32(s, 14 + size);
|
|
||||||
+ stream_write_uint32(s, 0);
|
|
||||||
+ stream_write_uint32(s, offset);
|
|
||||||
+ stream_write(s, data, size);
|
|
||||||
+
|
|
||||||
+ data = stream_get_head(s);
|
|
||||||
+ size = stream_get_length(s);
|
|
||||||
+ stream_detach(s);
|
|
||||||
+ stream_free(s);
|
|
||||||
+ }
|
|
||||||
+ GdkPixbufLoader *pixbuf;
|
|
||||||
+ pixbuf = gdk_pixbuf_loader_new();
|
|
||||||
+ gdk_pixbuf_loader_write(pixbuf, data, size, NULL);
|
|
||||||
+ image = gdk_pixbuf_loader_get_pixbuf(pixbuf);
|
|
||||||
+ img = TRUE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ THREADS_ENTER
|
|
||||||
+ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD);
|
|
||||||
+ if (clipboard)
|
|
||||||
+ {
|
|
||||||
+ if (text || img)
|
|
||||||
+ rfi->clipboard_wait = TRUE;
|
|
||||||
+ if (text)
|
|
||||||
+ gtk_clipboard_set_text(clipboard, (gchar*)data, size);
|
|
||||||
+ if (img)
|
|
||||||
+ gtk_clipboard_set_image(clipboard, image);
|
|
||||||
+ }
|
|
||||||
+ THREADS_LEAVE
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void remmina_handle_channel_event(RemminaProtocolWidget* gp, RDP_EVENT* event)
|
|
||||||
+{
|
|
||||||
+ RDP_EVENT* rdp_event = NULL;
|
|
||||||
+ rfContext* rfi = GET_DATA(gp);
|
|
||||||
+
|
|
||||||
+ switch (event->event_class)
|
|
||||||
+ {
|
|
||||||
+ case RDP_EVENT_CLASS_CLIPRDR:
|
|
||||||
+ g_printf("Event ID: %d\n", event->event_type);
|
|
||||||
+ if (event->event_type == RDP_EVENT_TYPE_CB_MONITOR_READY)
|
|
||||||
+ {
|
|
||||||
+ g_printf("Received CB_MONITOR_READY - Sending RDP_EVENT_TYPE_CB_FORMAT_LIST\n");
|
|
||||||
+ /* Sending our format list */
|
|
||||||
+ remmina_rdp_cliprdr_send_format_list_event(gp);
|
|
||||||
+ }
|
|
||||||
+ if (event->event_type == RDP_EVENT_TYPE_CB_FORMAT_LIST)
|
|
||||||
+ {
|
|
||||||
+ /* We received a FORMAT_LIST from the server, update our clipboard */
|
|
||||||
+ g_printf("Received RDP_EVENT_TYPE_CB_FORMAT_LIST\n");
|
|
||||||
+ int i;
|
|
||||||
+ uint32 format = CB_FORMAT_RAW;
|
|
||||||
+ RDP_CB_FORMAT_LIST_EVENT* format_list_event;
|
|
||||||
+
|
|
||||||
+ format_list_event = (RDP_CB_FORMAT_LIST_EVENT*) event;
|
|
||||||
+
|
|
||||||
+ g_printf("Format List Size: %d\n", format_list_event->num_formats);
|
|
||||||
+ for (i = 0; i < format_list_event->num_formats; i++)
|
|
||||||
+ {
|
|
||||||
+ g_printf("Format: 0x%X\n", format_list_event->formats[i]);
|
|
||||||
+ if (format_list_event->formats[i] == CB_FORMAT_UNICODETEXT)
|
|
||||||
+ {
|
|
||||||
+ format = CB_FORMAT_UNICODETEXT;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ if (format_list_event->formats[i] == CB_FORMAT_DIB)
|
|
||||||
+ {
|
|
||||||
+ format = CB_FORMAT_DIB;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ if (format_list_event->formats[i] == CB_FORMAT_JPEG)
|
|
||||||
+ {
|
|
||||||
+ format = CB_FORMAT_JPEG;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ if (format_list_event->formats[i] == CB_FORMAT_PNG)
|
|
||||||
+ {
|
|
||||||
+ format = CB_FORMAT_PNG;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ if (format_list_event->formats[i] == CB_FORMAT_TEXT)
|
|
||||||
+ {
|
|
||||||
+ format = CB_FORMAT_TEXT;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ rfi->requested_format = format;
|
|
||||||
+
|
|
||||||
+ g_printf("Format Requested: 0x%X\n", format);
|
|
||||||
+ /* Request Clipboard data of the server */
|
|
||||||
+ RDP_CB_DATA_REQUEST_EVENT* data_request_event;
|
|
||||||
+ rdp_event = (RDP_EVENT*) xnew(RDP_CB_DATA_REQUEST_EVENT);
|
|
||||||
+ rdp_event->event_class = RDP_EVENT_CLASS_CLIPRDR;
|
|
||||||
+ rdp_event->event_type = RDP_EVENT_TYPE_CB_DATA_REQUEST;
|
|
||||||
+ data_request_event = (RDP_CB_DATA_REQUEST_EVENT*) rdp_event;
|
|
||||||
+ data_request_event->format = format;
|
|
||||||
+ freerdp_channels_send_event(rfi->channels, (RDP_EVENT*) data_request_event);
|
|
||||||
+ }
|
|
||||||
+ if (event->event_type == RDP_EVENT_TYPE_CB_DATA_REQUEST)
|
|
||||||
+ {
|
|
||||||
+ g_printf("Received RDP_EVENT_TYPE_CB_DATA_REQUEST\n");
|
|
||||||
+
|
|
||||||
+ uint8* data;
|
|
||||||
+ int size;
|
|
||||||
+ RDP_CB_DATA_REQUEST_EVENT* data_request_event = (RDP_CB_DATA_REQUEST_EVENT*) event;
|
|
||||||
+ RDP_CB_DATA_RESPONSE_EVENT* data_response_event;
|
|
||||||
+
|
|
||||||
+ g_printf("Event Format: %d\n", data_request_event->format);
|
|
||||||
+
|
|
||||||
+ /* Send Data */
|
|
||||||
+ rdp_event = (RDP_EVENT*) xnew(RDP_CB_DATA_RESPONSE_EVENT);
|
|
||||||
+ rdp_event->event_class = RDP_EVENT_CLASS_CLIPRDR;
|
|
||||||
+ rdp_event->event_type = RDP_EVENT_TYPE_CB_DATA_RESPONSE;
|
|
||||||
+ data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*) rdp_event;
|
|
||||||
+ data = remmina_rdp_cliprdr_get_data(gp, data_request_event->format, &size);
|
|
||||||
+ data_response_event->data = data;
|
|
||||||
+ data_response_event->size = size;
|
|
||||||
+ freerdp_channels_send_event(rfi->channels, rdp_event);
|
|
||||||
+ }
|
|
||||||
+ if (event->event_type == RDP_EVENT_TYPE_CB_DATA_RESPONSE)
|
|
||||||
+ {
|
|
||||||
+ remmina_rdp_cliprdr_parse_response_event(gp, event);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_cliprdr.h b/remmina-plugins/rdp/rdp_cliprdr.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..ed6bf70
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_cliprdr.h
|
|
||||||
@@ -0,0 +1,33 @@
|
|
||||||
+/*
|
|
||||||
+ * Remmina - The GTK+ Remote Desktop Client
|
|
||||||
+ * Copyright (C) 2010-2011 Vic Lee
|
|
||||||
+ * Copyright (C) 2012-2012 Jean-Louis Dupond
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or modify
|
|
||||||
+ * it under the terms of the GNU General Public License as published by
|
|
||||||
+ * the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ * (at your option) any later version.
|
|
||||||
+ *
|
|
||||||
+ * This program is distributed in the hope that it will be useful,
|
|
||||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ * GNU General Public License for more details.
|
|
||||||
+ *
|
|
||||||
+ * You should have received a copy of the GNU General Public License
|
|
||||||
+ * along with this program; if not, write to the Free Software
|
|
||||||
+ * Foundation, Inc., 59 Temple Place, Suite 330,
|
|
||||||
+ * Boston, MA 02111-1307, USA.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifndef __REMMINA_RDP_CLIPRDR_H__
|
|
||||||
+#define __REMMINA_RDP_CLIPRDR_H__
|
|
||||||
+
|
|
||||||
+G_BEGIN_DECLS
|
|
||||||
+
|
|
||||||
+RDP_EVENT* remmina_rdp_cliprdr_get_event(uint16 event_type);
|
|
||||||
+int remmina_rdp_cliprdr_send_format_list_event(RemminaProtocolWidget* gp);
|
|
||||||
+void remmina_handle_channel_event(RemminaProtocolWidget* gp, RDP_EVENT* event);
|
|
||||||
+
|
|
||||||
+G_END_DECLS
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c
|
|
||||||
index f77f5f1..a936fb1 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_event.c
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_event.c
|
|
||||||
@@ -452,6 +452,16 @@ static gboolean remmina_rdp_event_on_key(GtkWidget* widget, GdkEventKey* event,
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static gboolean remmina_rdp_event_on_clipboard(GtkClipboard *clipboard, GdkEvent *event, RemminaProtocolWidget *gp)
|
|
||||||
+{
|
|
||||||
+ RemminaPluginRdpEvent rdp_event = { 0 };
|
|
||||||
+
|
|
||||||
+ rdp_event.type = REMMINA_RDP_EVENT_TYPE_CLIPBOARD;
|
|
||||||
+ remmina_rdp_event_event_push(gp, &rdp_event);
|
|
||||||
+
|
|
||||||
+ return TRUE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void remmina_rdp_event_init(RemminaProtocolWidget* gp)
|
|
||||||
{
|
|
||||||
gint n;
|
|
||||||
@@ -461,6 +471,7 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp)
|
|
||||||
XPixmapFormatValues* pf;
|
|
||||||
XPixmapFormatValues* pfs;
|
|
||||||
rfContext* rfi;
|
|
||||||
+ GtkClipboard* clipboard;
|
|
||||||
|
|
||||||
rfi = GET_DATA(gp);
|
|
||||||
rfi->drawing_area = gtk_drawing_area_new();
|
|
||||||
@@ -499,6 +510,14 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp)
|
|
||||||
g_signal_connect(G_OBJECT(rfi->drawing_area), "key-release-event",
|
|
||||||
G_CALLBACK(remmina_rdp_event_on_key), gp);
|
|
||||||
|
|
||||||
+ RemminaFile* remminafile = remmina_plugin_service->protocol_plugin_get_file(gp);
|
|
||||||
+ if (!remmina_plugin_service->file_get_int(remminafile, "disableclipboard", FALSE))
|
|
||||||
+ {
|
|
||||||
+ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD);
|
|
||||||
+ g_signal_connect(clipboard, "owner-change",
|
|
||||||
+ G_CALLBACK(remmina_rdp_event_on_clipboard), gp);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
rfi->pressed_keys = g_array_new(FALSE, TRUE, sizeof (gint));
|
|
||||||
rfi->event_queue = g_async_queue_new_full(g_free);
|
|
||||||
rfi->ui_queue = g_async_queue_new();
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_plugin.c b/remmina-plugins/rdp/rdp_plugin.c
|
|
||||||
index 08874e6..fd0fe08 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_plugin.c
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_plugin.c
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
#include "rdp_graphics.h"
|
|
||||||
#include "rdp_file.h"
|
|
||||||
#include "rdp_settings.h"
|
|
||||||
+#include "rdp_cliprdr.h"
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
@@ -31,6 +32,7 @@
|
|
||||||
#include <freerdp/freerdp.h>
|
|
||||||
#include <freerdp/constants.h>
|
|
||||||
#include <freerdp/utils/memory.h>
|
|
||||||
+#include <freerdp/plugins/cliprdr.h>
|
|
||||||
|
|
||||||
#define REMMINA_RDP_FEATURE_TOOL_REFRESH 1
|
|
||||||
#define REMMINA_RDP_FEATURE_SCALE 2
|
|
||||||
@@ -155,6 +157,11 @@ boolean rf_check_fds(RemminaProtocolWidget* gp)
|
|
||||||
input->MouseEvent(input, event->mouse_event.flags,
|
|
||||||
event->mouse_event.x, event->mouse_event.y);
|
|
||||||
break;
|
|
||||||
+ case REMMINA_RDP_EVENT_TYPE_CLIPBOARD:
|
|
||||||
+ if (!rfi->clipboard_wait)
|
|
||||||
+ remmina_rdp_cliprdr_send_format_list_event(gp);
|
|
||||||
+ rfi->clipboard_wait = FALSE;
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free(event);
|
|
||||||
@@ -530,6 +537,7 @@ static boolean remmina_rdp_verify_certificate(freerdp* instance, char* subject,
|
|
||||||
|
|
||||||
static int remmina_rdp_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size)
|
|
||||||
{
|
|
||||||
+ g_printf("EVENT RECEIVED -> DATA: %s\nSIZE: %d\nFLAGS: %d\n", (char*)data, size, flags);
|
|
||||||
return freerdp_channels_data(instance, channelId, data, size, flags, total_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -545,6 +553,7 @@ static void remmina_rdp_main_loop(RemminaProtocolWidget* gp)
|
|
||||||
fd_set rfds_set;
|
|
||||||
fd_set wfds_set;
|
|
||||||
rfContext* rfi;
|
|
||||||
+ RDP_EVENT* event;
|
|
||||||
|
|
||||||
memset(rfds, 0, sizeof(rfds));
|
|
||||||
memset(wfds, 0, sizeof(wfds));
|
|
||||||
@@ -618,6 +627,12 @@ static void remmina_rdp_main_loop(RemminaProtocolWidget* gp)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ event = freerdp_channels_pop_event(rfi->channels);
|
|
||||||
+ if (event)
|
|
||||||
+ remmina_handle_channel_event(gp, event);
|
|
||||||
+ }
|
|
||||||
/* check ui */
|
|
||||||
if (!rf_check_fds(gp))
|
|
||||||
{
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_plugin.h b/remmina-plugins/rdp/rdp_plugin.h
|
|
||||||
index a3774d9..1931384 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_plugin.h
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_plugin.h
|
|
||||||
@@ -133,12 +133,16 @@ struct rf_context
|
|
||||||
GArray* pressed_keys;
|
|
||||||
GAsyncQueue* event_queue;
|
|
||||||
gint event_pipe[2];
|
|
||||||
+
|
|
||||||
+ gboolean clipboard_wait;
|
|
||||||
+ uint32 requested_format;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
REMMINA_RDP_EVENT_TYPE_SCANCODE,
|
|
||||||
- REMMINA_RDP_EVENT_TYPE_MOUSE
|
|
||||||
+ REMMINA_RDP_EVENT_TYPE_MOUSE,
|
|
||||||
+ REMMINA_RDP_EVENT_TYPE_CLIPBOARD
|
|
||||||
} RemminaPluginRdpEventType;
|
|
||||||
|
|
||||||
struct remmina_plugin_rdp_event
|
|
||||||
--
|
|
||||||
1.7.10
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
|||||||
From 97c2af8ccc913b0850ed4a54ed6c477cfbd7b475 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Tue, 1 May 2012 17:37:21 +0200
|
|
||||||
Subject: [PATCH] clipboard bugfix + cleanup of memory
|
|
||||||
|
|
||||||
---
|
|
||||||
remmina-plugins/rdp/rdp_cliprdr.c | 20 ++++++++++++++++----
|
|
||||||
1 file changed, 16 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
index 0821ffa..b9b37ad 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
@@ -225,7 +225,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
|
|
||||||
if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT)
|
|
||||||
{
|
|
||||||
- lf2crlf(inbuf, size);
|
|
||||||
+ inbuf = lf2crlf(inbuf, size);
|
|
||||||
if (format == CB_FORMAT_TEXT)
|
|
||||||
{
|
|
||||||
outbuf = inbuf;
|
|
||||||
@@ -269,6 +269,11 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
memcpy(outbuf, data + 14, *size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ if (inbuf)
|
|
||||||
+ g_free(inbuf);
|
|
||||||
+ if (G_IS_OBJECT(image))
|
|
||||||
+ g_object_unref(image);
|
|
||||||
|
|
||||||
if (!outbuf)
|
|
||||||
outbuf = (uint8*)"";
|
|
||||||
@@ -288,7 +293,7 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE
|
|
||||||
gboolean img = FALSE;
|
|
||||||
rfContext* rfi = GET_DATA(gp);
|
|
||||||
RDP_CB_DATA_RESPONSE_EVENT* data_response_event;
|
|
||||||
-
|
|
||||||
+ GdkPixbufLoader *pixbuf;
|
|
||||||
data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*) event;
|
|
||||||
data = data_response_event->data;
|
|
||||||
size = data_response_event->size;
|
|
||||||
@@ -341,7 +346,6 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE
|
|
||||||
stream_detach(s);
|
|
||||||
stream_free(s);
|
|
||||||
}
|
|
||||||
- GdkPixbufLoader *pixbuf;
|
|
||||||
pixbuf = gdk_pixbuf_loader_new();
|
|
||||||
gdk_pixbuf_loader_write(pixbuf, data, size, NULL);
|
|
||||||
image = gdk_pixbuf_loader_get_pixbuf(pixbuf);
|
|
||||||
@@ -355,9 +359,17 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE
|
|
||||||
if (text || img)
|
|
||||||
rfi->clipboard_wait = TRUE;
|
|
||||||
if (text)
|
|
||||||
- gtk_clipboard_set_text(clipboard, (gchar*)data, size);
|
|
||||||
+ {
|
|
||||||
+ gtk_clipboard_set_text(clipboard, (gchar*)data, size);
|
|
||||||
+ gtk_clipboard_store(clipboard);
|
|
||||||
+ }
|
|
||||||
if (img)
|
|
||||||
+ {
|
|
||||||
gtk_clipboard_set_image(clipboard, image);
|
|
||||||
+ gtk_clipboard_store(clipboard);
|
|
||||||
+ gdk_pixbuf_loader_close(pixbuf, NULL);
|
|
||||||
+ g_object_unref(pixbuf);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
THREADS_LEAVE
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.10
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
|||||||
commit bed49ad62d78718c0876c000a97c68cc87f12c7c
|
|
||||||
Author: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Sat Sep 1 20:56:09 2012 +0200
|
|
||||||
|
|
||||||
Closes #77: Close the SSH tunnel after the connection has been closed
|
|
||||||
|
|
||||||
Index: FreeRDP-Remmina-356c033/remmina/src/remmina_protocol_widget.c
|
|
||||||
===================================================================
|
|
||||||
--- FreeRDP-Remmina-356c033.orig/remmina/src/remmina_protocol_widget.c
|
|
||||||
+++ FreeRDP-Remmina-356c033/remmina/src/remmina_protocol_widget.c
|
|
||||||
@@ -267,13 +267,7 @@ gboolean remmina_protocol_widget_close_c
|
|
||||||
gp->priv->chat_window = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef HAVE_LIBSSH
|
|
||||||
- if (gp->priv->ssh_tunnel)
|
|
||||||
- {
|
|
||||||
- remmina_ssh_tunnel_free(gp->priv->ssh_tunnel);
|
|
||||||
- gp->priv->ssh_tunnel = NULL;
|
|
||||||
- }
|
|
||||||
-#endif
|
|
||||||
+ gboolean retval;
|
|
||||||
|
|
||||||
if (!gp->priv->plugin || !gp->priv->plugin->close_connection)
|
|
||||||
{
|
|
||||||
@@ -281,7 +275,17 @@ gboolean remmina_protocol_widget_close_c
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- return gp->priv->plugin->close_connection(gp);
|
|
||||||
+ retval = gp->priv->plugin->close_connection(gp);
|
|
||||||
+
|
|
||||||
+ #ifdef HAVE_LIBSSH
|
|
||||||
+ if (gp->priv->ssh_tunnel)
|
|
||||||
+ {
|
|
||||||
+ remmina_ssh_tunnel_free(gp->priv->ssh_tunnel);
|
|
||||||
+ gp->priv->ssh_tunnel = NULL;
|
|
||||||
+ }
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
+ return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean remmina_protocol_widget_emit_signal_timeout(gpointer user_data)
|
|
@ -1,53 +0,0 @@
|
|||||||
From c1ef3a162622942d7c556c5a4352e626c7bcb28f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Tue, 8 May 2012 14:44:16 +0200
|
|
||||||
Subject: [PATCH] Disconnect signal handler after disconnect
|
|
||||||
|
|
||||||
---
|
|
||||||
remmina-plugins/rdp/rdp_event.c | 10 ++++++++--
|
|
||||||
remmina-plugins/rdp/rdp_plugin.h | 1 +
|
|
||||||
2 files changed, 9 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c
|
|
||||||
index a936fb1..2c050c6 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_event.c
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_event.c
|
|
||||||
@@ -514,8 +514,7 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp)
|
|
||||||
if (!remmina_plugin_service->file_get_int(remminafile, "disableclipboard", FALSE))
|
|
||||||
{
|
|
||||||
clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD);
|
|
||||||
- g_signal_connect(clipboard, "owner-change",
|
|
||||||
- G_CALLBACK(remmina_rdp_event_on_clipboard), gp);
|
|
||||||
+ rfi->clipboard_handler = g_signal_connect(clipboard, "owner-change", G_CALLBACK(remmina_rdp_event_on_clipboard), gp);
|
|
||||||
}
|
|
||||||
|
|
||||||
rfi->pressed_keys = g_array_new(FALSE, TRUE, sizeof (gint));
|
|
||||||
@@ -566,6 +565,13 @@ void remmina_rdp_event_uninit(RemminaProtocolWidget* gp)
|
|
||||||
|
|
||||||
rfi = GET_DATA(gp);
|
|
||||||
|
|
||||||
+
|
|
||||||
+ /* unregister the clipboard monitor */
|
|
||||||
+ if (rfi->clipboard_handler)
|
|
||||||
+ {
|
|
||||||
+ g_signal_handler_disconnect(G_OBJECT(gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD)), rfi->clipboard_handler);
|
|
||||||
+ rfi->clipboard_handler = NULL;
|
|
||||||
+ }
|
|
||||||
if (rfi->scale_handler)
|
|
||||||
{
|
|
||||||
g_source_remove(rfi->scale_handler);
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_plugin.h b/remmina-plugins/rdp/rdp_plugin.h
|
|
||||||
index ff66906..08b8891 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_plugin.h
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_plugin.h
|
|
||||||
@@ -134,6 +134,7 @@ struct rf_context
|
|
||||||
GAsyncQueue* event_queue;
|
|
||||||
gint event_pipe[2];
|
|
||||||
|
|
||||||
+ gint clipboard_handler;
|
|
||||||
gint clipboard_wait;
|
|
||||||
uint32 requested_format;
|
|
||||||
};
|
|
||||||
--
|
|
||||||
1.7.10
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
--- remmina-plugins/vnc/CMakeLists.txt 2012-06-04 13:03:46.542093149 -0600
|
|
||||||
+++ remmina-plugins/vnc/CMakeLists.txt 2012-06-04 13:03:34.112332497 -0600
|
|
||||||
@@ -28,7 +28,7 @@
|
|
||||||
set_target_properties(remmina-plugin-vnc PROPERTIES PREFIX "")
|
|
||||||
|
|
||||||
include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${LIBVNCSERVER_INCLUDE_DIRS})
|
|
||||||
-target_link_libraries(remmina-plugin-vnc ${REMMINA_COMMON_LIBRARIES} ${LIBVNCSERVER_LIBRARIES})
|
|
||||||
+target_link_libraries(remmina-plugin-vnc ${REMMINA_COMMON_LIBRARIES} ${LIBVNCSERVER_LIBRARIES} gnutls )
|
|
||||||
|
|
||||||
install(TARGETS remmina-plugin-vnc DESTINATION ${REMMINA_PLUGINDIR})
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
|||||||
From 6ee2028996ee9d8802201e95f3cec56e2b307ddb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Sat, 5 May 2012 16:54:18 +0200
|
|
||||||
Subject: [PATCH] Fix crashes in some cases
|
|
||||||
|
|
||||||
---
|
|
||||||
remmina-plugins/rdp/rdp_cliprdr.c | 19 +++++++++++++------
|
|
||||||
1 file changed, 13 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
index d84374e..772709c 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
@@ -204,7 +204,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
g_printf("GetData: Requested Format: %#X\n", format);
|
|
||||||
rfContext* rfi = GET_DATA(gp);
|
|
||||||
GtkClipboard* clipboard;
|
|
||||||
- uint8* inbuf = (uint8*)"";
|
|
||||||
+ uint8* inbuf = NULL;
|
|
||||||
uint8* outbuf = NULL;
|
|
||||||
GdkPixbuf *image = NULL;
|
|
||||||
|
|
||||||
@@ -223,10 +223,18 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
}
|
|
||||||
THREADS_LEAVE
|
|
||||||
|
|
||||||
+ /* No data received, send nothing */
|
|
||||||
+ if (inbuf == NULL && image == NULL)
|
|
||||||
+ {
|
|
||||||
+ g_printf("NO DATA RECEIVED\n");
|
|
||||||
+ *size = 0;
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+
|
|
||||||
if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT)
|
|
||||||
{
|
|
||||||
- if (inbuf == NULL)
|
|
||||||
- inbuf = (uint8*)"";
|
|
||||||
+ *size = strlen((char*)inbuf);
|
|
||||||
inbuf = lf2crlf(inbuf, size);
|
|
||||||
if (format == CB_FORMAT_TEXT)
|
|
||||||
{
|
|
||||||
@@ -258,12 +266,14 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "png", NULL, NULL);
|
|
||||||
outbuf = (uint8*) xmalloc(buffersize);
|
|
||||||
memcpy(outbuf, data, buffersize);
|
|
||||||
+ *size = buffersize;
|
|
||||||
}
|
|
||||||
if (format == CB_FORMAT_JPEG)
|
|
||||||
{
|
|
||||||
gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "jpeg", NULL, NULL);
|
|
||||||
outbuf = (uint8*) xmalloc(buffersize);
|
|
||||||
memcpy(outbuf, data, buffersize);
|
|
||||||
+ *size = buffersize;
|
|
||||||
}
|
|
||||||
if (format == CB_FORMAT_DIB)
|
|
||||||
{
|
|
||||||
@@ -276,9 +286,6 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
g_object_unref(image);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!outbuf)
|
|
||||||
- outbuf = (uint8*)"";
|
|
||||||
-
|
|
||||||
return outbuf;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.10
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
Index: remmina-1.0.0/remmina/desktop/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- remmina-1.0.0.orig/remmina/desktop/CMakeLists.txt
|
|
||||||
+++ remmina-1.0.0/remmina/desktop/CMakeLists.txt
|
|
||||||
@@ -38,3 +38,4 @@ install(FILES ${ICON32_DATA} DESTINATION
|
|
||||||
install(FILES ${ICON48_DATA} DESTINATION ${ICON48_DIR})
|
|
||||||
install(FILES ${ICONSVG_DATA} DESTINATION ${ICONSVG_DIR})
|
|
||||||
|
|
||||||
+install(FILES remmina.desktop DESTINATION "${REMMINA_DATADIR}/applications")
|
|
||||||
Index: remmina-1.0.0/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- remmina-1.0.0.orig/CMakeLists.txt
|
|
||||||
+++ remmina-1.0.0/CMakeLists.txt
|
|
||||||
@@ -78,7 +78,7 @@ include_directories(.)
|
|
||||||
include_directories(remmina/include)
|
|
||||||
|
|
||||||
set(REMMINA_VERSION "0.9.99.1")
|
|
||||||
-set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share/remmina")
|
|
||||||
+set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share")
|
|
||||||
set(REMMINA_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
|
|
||||||
set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/lib/remmina/plugins")
|
|
||||||
|
|
||||||
Index: remmina-1.0.0/remmina/desktop/remmina.desktop
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ remmina-1.0.0/remmina/desktop/remmina.desktop
|
|
||||||
@@ -0,0 +1,12 @@
|
|
||||||
+[Desktop Entry]
|
|
||||||
+Version=1.0
|
|
||||||
+Name=Remmina Remote Desktop Client
|
|
||||||
+Comment=Connect to remote desktops
|
|
||||||
+TryExec=remmina
|
|
||||||
+Exec=remmina
|
|
||||||
+Icon=remmina
|
|
||||||
+Terminal=false
|
|
||||||
+Type=Application
|
|
||||||
+Actions=
|
|
||||||
+Categories=GTK;GNOME;X-GNOME-NetworkSettings;Network;
|
|
||||||
+
|
|
@ -1,35 +0,0 @@
|
|||||||
commit 348e01d27869a577ad5df9bf6286f876b34a40c0
|
|
||||||
Author: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Mon Sep 10 20:08:00 2012 +0200
|
|
||||||
|
|
||||||
Fix fullscreen mode with multiple monitors
|
|
||||||
|
|
||||||
diff --git a/remmina/src/remmina_connection_window.c b/remmina/src/remmina_connection_window.c
|
|
||||||
index 761b2f4..7a5b214 100644
|
|
||||||
--- a/remmina/src/remmina_connection_window.c
|
|
||||||
+++ b/remmina/src/remmina_connection_window.c
|
|
||||||
@@ -496,13 +496,21 @@ static void remmina_connection_holder_check_resize(RemminaConnectionHolder* cnnh
|
|
||||||
DECLARE_CNNOBJ
|
|
||||||
gboolean scroll_required = FALSE;
|
|
||||||
GdkScreen* screen;
|
|
||||||
+ gint monitor;
|
|
||||||
+ GdkRectangle screen_size;
|
|
||||||
gint screen_width, screen_height;
|
|
||||||
gint server_width, server_height;
|
|
||||||
|
|
||||||
remmina_connection_holder_get_desktop_size(cnnhld, &server_width, &server_height, FALSE);
|
|
||||||
- screen = gdk_screen_get_default();
|
|
||||||
- screen_width = gdk_screen_get_width(screen);
|
|
||||||
- screen_height = gdk_screen_get_height(screen);
|
|
||||||
+ screen = gtk_window_get_screen(GTK_WINDOW(cnnhld->cnnwin));
|
|
||||||
+ monitor = gdk_screen_get_monitor_at_window(screen, gtk_widget_get_window(GTK_WIDGET(cnnhld->cnnwin)));
|
|
||||||
+#ifdef gdk_screen_get_monitor_workarea
|
|
||||||
+ gdk_screen_get_monitor_workarea(screen, monitor, &screen_size);
|
|
||||||
+#else
|
|
||||||
+ gdk_screen_get_monitor_geometry(screen, monitor, &screen_size);
|
|
||||||
+#endif
|
|
||||||
+ screen_width = screen_size.width;
|
|
||||||
+ screen_height = screen_size.height;
|
|
||||||
|
|
||||||
if (!remmina_protocol_widget_get_expand(REMMINA_PROTOCOL_WIDGET(cnnobj->proto))
|
|
||||||
&& (server_width <= 0 || server_height <= 0 || screen_width < server_width
|
|
@ -1,13 +0,0 @@
|
|||||||
Index: remmina-1.0.0/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- remmina-1.0.0.orig/CMakeLists.txt
|
|
||||||
+++ remmina-1.0.0/CMakeLists.txt
|
|
||||||
@@ -80,7 +80,7 @@ include_directories(remmina/include)
|
|
||||||
set(REMMINA_VERSION "0.9.99.1")
|
|
||||||
set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share")
|
|
||||||
set(REMMINA_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
|
|
||||||
-set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/lib/remmina/plugins")
|
|
||||||
+set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/remmina/plugins")
|
|
||||||
|
|
||||||
find_suggested_package(PTHREAD)
|
|
||||||
if(PTHREAD_FOUND)
|
|
@ -1,25 +0,0 @@
|
|||||||
From 503a008e4aedc74b775c785f96292b8f5c448137 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andrey <gankov@opensuse.org>
|
|
||||||
Date: Sat, 10 Mar 2012 01:00:32 +0400
|
|
||||||
Subject: [PATCH] fix library name mistake
|
|
||||||
|
|
||||||
---
|
|
||||||
cmake/FindGTK3.cmake | 2 +-
|
|
||||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/cmake/FindGTK3.cmake b/cmake/FindGTK3.cmake
|
|
||||||
index c1b019e..f73b64d 100644
|
|
||||||
--- a/cmake/FindGTK3.cmake
|
|
||||||
+++ b/cmake/FindGTK3.cmake
|
|
||||||
@@ -48,7 +48,7 @@ find_path(GDKPIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h
|
|
||||||
HINTS ${PC_GDKPIXBUF_INCLUDEDIR} ${PC_GDKPIXBUF_INCLUDE_DIRS}
|
|
||||||
PATH_SUFFIXES gdk-pixbuf-2.0)
|
|
||||||
|
|
||||||
-find_library(GDKPIXBUF_LIBRARY NAMES gdk-3
|
|
||||||
+find_library(GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0
|
|
||||||
HINTS ${PC_GDKPIXBUF_LIBDIR} ${PC_GDKPIXBUF_LIBRARY_DIRS})
|
|
||||||
|
|
||||||
# Glib
|
|
||||||
--
|
|
||||||
1.7.5.4
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From b22778270ad05fed21797d5a5d4b782d6e273a59 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Sat, 5 May 2012 17:15:29 +0200
|
|
||||||
Subject: [PATCH] Fix memory leak
|
|
||||||
|
|
||||||
---
|
|
||||||
remmina-plugins/rdp/rdp_cliprdr.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
index 772709c..ea8baa0 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
@@ -74,6 +74,7 @@ void remmina_rdp_cliprdr_get_target_types(uint32** dst_formats, uint16* size, Gd
|
|
||||||
image = TRUE;
|
|
||||||
matches++;
|
|
||||||
}
|
|
||||||
+ g_free(name);
|
|
||||||
}
|
|
||||||
//Only add text formats if we don't have image formats
|
|
||||||
if (!image)
|
|
||||||
--
|
|
||||||
1.7.10
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
commit c422e9c0396e405ef5a3d2a6b24dbc83c20afe2f
|
|
||||||
Author: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Wed Apr 25 11:57:39 2012 +0200
|
|
||||||
|
|
||||||
Also fix scrolling on VNC plugin
|
|
||||||
|
|
||||||
Index: FreeRDP-Remmina-356c033/remmina-plugins/rdp/rdp_event.c
|
|
||||||
===================================================================
|
|
||||||
--- FreeRDP-Remmina-356c033.orig/remmina-plugins/rdp/rdp_event.c
|
|
||||||
+++ FreeRDP-Remmina-356c033/remmina-plugins/rdp/rdp_event.c
|
|
||||||
@@ -468,7 +468,7 @@ void remmina_rdp_event_init(RemminaProto
|
|
||||||
gtk_container_add(GTK_CONTAINER(gp), rfi->drawing_area);
|
|
||||||
|
|
||||||
gtk_widget_add_events(rfi->drawing_area, GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK
|
|
||||||
- | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK);
|
|
||||||
+ | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_SCROLL_MASK);
|
|
||||||
gtk_widget_set_can_focus(rfi->drawing_area, TRUE);
|
|
||||||
|
|
||||||
remmina_plugin_service->protocol_plugin_register_hostkey(gp, rfi->drawing_area);
|
|
||||||
Index: FreeRDP-Remmina-356c033/remmina-plugins/vnc/vnc_plugin.c
|
|
||||||
===================================================================
|
|
||||||
--- FreeRDP-Remmina-356c033.orig/remmina-plugins/vnc/vnc_plugin.c
|
|
||||||
+++ FreeRDP-Remmina-356c033/remmina-plugins/vnc/vnc_plugin.c
|
|
||||||
@@ -1847,7 +1847,7 @@ static void remmina_plugin_vnc_init(Remm
|
|
||||||
gtk_widget_add_events(
|
|
||||||
gpdata->drawing_area,
|
|
||||||
GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK
|
|
||||||
- | GDK_KEY_RELEASE_MASK);
|
|
||||||
+ | GDK_KEY_RELEASE_MASK | GDK_SCROLL_MASK);
|
|
||||||
gtk_widget_set_can_focus(gpdata->drawing_area, TRUE);
|
|
||||||
|
|
||||||
#if GTK_VERSION == 3
|
|
@ -1,25 +0,0 @@
|
|||||||
From 1901a1e9e5282c1deca2f5f98476e2c7e9243d35 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Mon, 10 Sep 2012 14:12:11 +0200
|
|
||||||
Subject: [PATCH] Closes #63: fix typo when fitting window
|
|
||||||
|
|
||||||
---
|
|
||||||
remmina/src/remmina_connection_window.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/remmina/src/remmina_connection_window.c b/remmina/src/remmina_connection_window.c
|
|
||||||
index 7ff1246..2ba8193 100644
|
|
||||||
--- a/remmina/src/remmina_connection_window.c
|
|
||||||
+++ b/remmina/src/remmina_connection_window.c
|
|
||||||
@@ -436,7 +436,7 @@ static gboolean remmina_connection_holder_toolbar_autofit_restore(RemminaConnect
|
|
||||||
remmina_connection_holder_get_desktop_size(cnnhld, &width, &height, TRUE);
|
|
||||||
gtk_widget_get_allocation(priv->notebook, &na);
|
|
||||||
gtk_widget_get_allocation(cnnobj->scrolled_container, &ca);
|
|
||||||
- gtk_widget_get_allocation(priv->toolbar, &ca);
|
|
||||||
+ gtk_widget_get_allocation(priv->toolbar, &ta);
|
|
||||||
gtk_window_resize(GTK_WINDOW(cnnhld->cnnwin), MAX(1, width + na.width - ca.width),
|
|
||||||
MAX(1, height + ta.height + na.height - ca.height));
|
|
||||||
gtk_container_check_resize(GTK_CONTAINER(cnnhld->cnnwin));
|
|
||||||
--
|
|
||||||
1.8.1.6
|
|
||||||
|
|
@ -1,262 +0,0 @@
|
|||||||
From 13f203672155cd52278655f03da7ff8dcff75c29 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andrey Gankov <gankov@opensuse.org>
|
|
||||||
Date: Sat, 10 Mar 2012 02:55:32 +0400
|
|
||||||
Subject: [PATCH] Fix Issue #9: linker error
|
|
||||||
|
|
||||||
---
|
|
||||||
cmake/FindGLIB2.cmake | 120 ++++++++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
cmake/FindGTK2.cmake | 21 ++-------
|
|
||||||
cmake/FindGTK3.cmake | 24 +++-------
|
|
||||||
remmina/CMakeLists.txt | 9 ++++
|
|
||||||
4 files changed, 140 insertions(+), 34 deletions(-)
|
|
||||||
create mode 100644 cmake/FindGLIB2.cmake
|
|
||||||
|
|
||||||
diff --git a/cmake/FindGLIB2.cmake b/cmake/FindGLIB2.cmake
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..8208ded
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/cmake/FindGLIB2.cmake
|
|
||||||
@@ -0,0 +1,120 @@
|
|
||||||
+# Remmina - The GTK+ Remote Desktop Client
|
|
||||||
+#
|
|
||||||
+# Copyright (C) 2012 Andrey Gankov
|
|
||||||
+#
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place, Suite 330,
|
|
||||||
+# Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+set(_GLIB_found_all true)
|
|
||||||
+
|
|
||||||
+# Glib
|
|
||||||
+
|
|
||||||
+pkg_check_modules(PC_GLIB2 glib-2.0)
|
|
||||||
+
|
|
||||||
+if(NOT PC_GLIB2_FOUND)
|
|
||||||
+ set(_GLIB_found_all false)
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
+find_path(GLIB2_INCLUDE_DIR_PART1 NAMES glib.h
|
|
||||||
+ HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS}
|
|
||||||
+ PATH_SUFFIXES glib-2.0)
|
|
||||||
+
|
|
||||||
+find_path(GLIB2_INCLUDE_DIR_PART2 NAMES glibconfig.h
|
|
||||||
+ HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS}
|
|
||||||
+ PATH_SUFFIXES glib-2.0/include)
|
|
||||||
+
|
|
||||||
+set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2})
|
|
||||||
+
|
|
||||||
+find_library(GLIB2_LIBRARY NAMES glib-2.0)
|
|
||||||
+
|
|
||||||
+# GIO
|
|
||||||
+
|
|
||||||
+pkg_check_modules(PC_GIO gio-2.0)
|
|
||||||
+
|
|
||||||
+if(NOT PC_GIO_FOUND)
|
|
||||||
+ set(_GLIB_found_all false)
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
+find_path(GIO_INCLUDE_DIR gio/gio.h
|
|
||||||
+ HINTS ${PC_GIO_INCLUDEDIR} ${PC_GIO_INCLUDE_DIRS}
|
|
||||||
+ PATH_SUFFIXES gio-2.0)
|
|
||||||
+
|
|
||||||
+find_library(GIO_LIBRARY NAMES gio-2.0
|
|
||||||
+ HINTS ${PC_GIO_LIBDIR} ${PC_GIO_LIBRARY_DIRS})
|
|
||||||
+
|
|
||||||
+# gobject
|
|
||||||
+
|
|
||||||
+pkg_check_modules(PC_GOBJECT gobject-2.0)
|
|
||||||
+
|
|
||||||
+if(NOT PC_GOBJECT_FOUND)
|
|
||||||
+ set(_GLIB_found_all false)
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
+find_path(GOBJECT_INCLUDE_DIR gobject/gobject.h
|
|
||||||
+ HINTS ${PC_GOBJECT_INCLUDEDIR} ${PC_GOBJECT_INCLUDE_DIRS}
|
|
||||||
+ PATH_SUFFIXES gobject-2.0)
|
|
||||||
+
|
|
||||||
+find_library(GOBJECT_LIBRARY NAMES gobject-2.0
|
|
||||||
+ HINTS ${PC_GOBJECT_LIBDIR} ${PC_GOBJECT_LIBRARY_DIRS})
|
|
||||||
+
|
|
||||||
+# gmodule
|
|
||||||
+
|
|
||||||
+pkg_check_modules(PC_GMODULE gmodule-2.0)
|
|
||||||
+
|
|
||||||
+if(NOT PC_GMODULE_FOUND)
|
|
||||||
+ set(_GLIB_found_all false)
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
+find_path(GMODULE_INCLUDE_DIR gmodule.h
|
|
||||||
+ HINTS ${PC_GMODULE_INCLUDEDIR} ${PC_GMODULE_INCLUDE_DIRS}
|
|
||||||
+ PATH_SUFFIXES gmodule-2.0)
|
|
||||||
+
|
|
||||||
+find_library(GMODULE_LIBRARY NAMES gmodule-2.0
|
|
||||||
+ HINTS ${PC_GMODULE_LIBDIR} ${PC_GMODULE_LIBRARY_DIRS})
|
|
||||||
+
|
|
||||||
+# gthread
|
|
||||||
+
|
|
||||||
+pkg_check_modules(PC_GTHREAD gthread-2.0)
|
|
||||||
+
|
|
||||||
+if(NOT PC_GTHREAD_FOUND)
|
|
||||||
+ set(_GLIB_found_all false)
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
+find_path(GTHREAD_INCLUDE_DIR glib/gthread.h
|
|
||||||
+ HINTS ${PC_GTHREAD_INCLUDEDIR} ${PC_GTHREAD_INCLUDE_DIRS}
|
|
||||||
+ PATH_SUFFIXES gthread-2.0)
|
|
||||||
+
|
|
||||||
+find_library(GTHREAD_LIBRARY NAMES gthread-2.0
|
|
||||||
+ HINTS ${PC_GTHREAD_LIBDIR} ${PC_GTHREAD_LIBRARY_DIRS})
|
|
||||||
+
|
|
||||||
+# Finalize
|
|
||||||
+
|
|
||||||
+if(_GLIB_found_all)
|
|
||||||
+ include(FindPackageHandleStandardArgs)
|
|
||||||
+
|
|
||||||
+ find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARY GLIB2_INCLUDE_DIR)
|
|
||||||
+
|
|
||||||
+ set(GLIB2_LIBRARIES ${GLIB2_LIBRARY} ${GIO_LIBRARY} ${GOBJECT_LIBRARY} ${GMODULE_LIBRARY} ${GTHREAD_LIBRARY})
|
|
||||||
+ set(GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${GIO_INCLUDE_DIR} ${GOBJECT_INCLUDE_DIR} ${GMODULE_INCLUDE_DIR} ${GTHREAD_INCLUDE_DIR})
|
|
||||||
+
|
|
||||||
+ mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARY)
|
|
||||||
+
|
|
||||||
+ set(GLIB_FOUND true)
|
|
||||||
+else()
|
|
||||||
+ unset(GLIB2_LIBRARY)
|
|
||||||
+ unset(GLIB2_INCLUDE_DIR)
|
|
||||||
+
|
|
||||||
+ set(GLIB_FOUND false)
|
|
||||||
+endif()
|
|
||||||
diff --git a/cmake/FindGTK2.cmake b/cmake/FindGTK2.cmake
|
|
||||||
index b33966e..caf0295 100644
|
|
||||||
--- a/cmake/FindGTK2.cmake
|
|
||||||
+++ b/cmake/FindGTK2.cmake
|
|
||||||
@@ -63,24 +63,11 @@ find_library(GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0
|
|
||||||
|
|
||||||
# Glib
|
|
||||||
|
|
||||||
-pkg_check_modules(PC_GLIB2 glib-2.0)
|
|
||||||
-
|
|
||||||
-if(NOT PC_GLIB2_FOUND)
|
|
||||||
+find_required_package(GLIB2)
|
|
||||||
+if(NOT GLIB2_FOUND)
|
|
||||||
set(_GTK2_found_all false)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
-find_path(GLIB2_INCLUDE_DIR_PART1 NAMES glib.h
|
|
||||||
- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS}
|
|
||||||
- PATH_SUFFIXES glib-2.0)
|
|
||||||
-
|
|
||||||
-find_path(GLIB2_INCLUDE_DIR_PART2 NAMES glibconfig.h
|
|
||||||
- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS}
|
|
||||||
- PATH_SUFFIXES glib-2.0/include)
|
|
||||||
-
|
|
||||||
-set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2})
|
|
||||||
-
|
|
||||||
-find_library(GLIB2_LIBRARY NAMES glib-2.0)
|
|
||||||
-
|
|
||||||
# Pango
|
|
||||||
|
|
||||||
pkg_check_modules(PC_PANGO pango)
|
|
||||||
@@ -129,8 +116,8 @@ if(_GTK2_found_all)
|
|
||||||
|
|
||||||
find_package_handle_standard_args(GTK2 DEFAULT_MSG GTK2_LIBRARY GTK2_INCLUDE_DIR)
|
|
||||||
|
|
||||||
- set(GTK2_LIBRARIES ${GTK2_LIBRARY} ${GDK2_LIBRARY} ${GLIB2_LIBRARY} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY})
|
|
||||||
- set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIR} ${GDK2_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR})
|
|
||||||
+ set(GTK2_LIBRARIES ${GTK2_LIBRARY} ${GDK2_LIBRARY} ${GLIB2_LIBRARIES} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY})
|
|
||||||
+ set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIR} ${GDK2_INCLUDE_DIR} ${GLIB2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR})
|
|
||||||
|
|
||||||
mark_as_advanced(GTK2_INCLUDE_DIR GTK2_LIBRARY)
|
|
||||||
|
|
||||||
diff --git a/cmake/FindGTK3.cmake b/cmake/FindGTK3.cmake
|
|
||||||
index f73b64d..decb00a 100644
|
|
||||||
--- a/cmake/FindGTK3.cmake
|
|
||||||
+++ b/cmake/FindGTK3.cmake
|
|
||||||
@@ -53,24 +53,11 @@ find_library(GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0
|
|
||||||
|
|
||||||
# Glib
|
|
||||||
|
|
||||||
-pkg_check_modules(PC_GLIB2 glib-2.0)
|
|
||||||
-
|
|
||||||
-if(NOT PC_GLIB2_FOUND)
|
|
||||||
+find_required_package(GLIB2)
|
|
||||||
+if(NOT GLIB2_FOUND)
|
|
||||||
set(_GTK3_found_all false)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
-find_path(GLIB2_INCLUDE_DIR_PART1 NAMES glib.h
|
|
||||||
- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS}
|
|
||||||
- PATH_SUFFIXES glib-2.0)
|
|
||||||
-
|
|
||||||
-find_path(GLIB2_INCLUDE_DIR_PART2 NAMES glibconfig.h
|
|
||||||
- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS}
|
|
||||||
- PATH_SUFFIXES glib-2.0/include)
|
|
||||||
-
|
|
||||||
-set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2})
|
|
||||||
-
|
|
||||||
-find_library(GLIB2_LIBRARY NAMES glib-2.0)
|
|
||||||
-
|
|
||||||
# Pango
|
|
||||||
|
|
||||||
pkg_check_modules(PC_PANGO pango)
|
|
||||||
@@ -119,14 +106,17 @@ if(_GTK3_found_all)
|
|
||||||
|
|
||||||
find_package_handle_standard_args(GTK3 DEFAULT_MSG GTK3_LIBRARY GTK3_INCLUDE_DIR)
|
|
||||||
|
|
||||||
- set(GTK3_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GLIB2_LIBRARY} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY})
|
|
||||||
- set(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR})
|
|
||||||
+ set(GTK3_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GLIB2_LIBRARIES} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY})
|
|
||||||
+ set(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${GLIB2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR})
|
|
||||||
|
|
||||||
mark_as_advanced(GTK3_INCLUDE_DIR GTK3_LIBRARY)
|
|
||||||
|
|
||||||
set(GTK3_FOUND true)
|
|
||||||
else()
|
|
||||||
unset(GTK3_LIBRARY)
|
|
||||||
+ unset(GTK3_INCLUDE_DIR)
|
|
||||||
+
|
|
||||||
+ unset(GDK3_LIBRARY)
|
|
||||||
unset(GDK3_INCLUDE_DIR)
|
|
||||||
|
|
||||||
set(GTK3_FOUND false)
|
|
||||||
diff --git a/remmina/CMakeLists.txt b/remmina/CMakeLists.txt
|
|
||||||
index 0fe7bbf..9e7c982 100644
|
|
||||||
--- a/remmina/CMakeLists.txt
|
|
||||||
+++ b/remmina/CMakeLists.txt
|
|
||||||
@@ -93,6 +93,10 @@ add_executable(remmina ${REMMINA_SRCS})
|
|
||||||
include_directories(${GTK_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(remmina ${GTK_LIBRARIES})
|
|
||||||
|
|
||||||
+find_package(X11)
|
|
||||||
+include_directories(${X11_INCLUDE_DIR})
|
|
||||||
+target_link_libraries(remmina ${X11_LIBRARIES})
|
|
||||||
+
|
|
||||||
find_suggested_package(LIBSSH)
|
|
||||||
if(LIBSSH_FOUND)
|
|
||||||
add_definitions(-DHAVE_LIBSSH)
|
|
||||||
@@ -100,6 +104,11 @@ if(LIBSSH_FOUND)
|
|
||||||
target_link_libraries(remmina ${LIBSSH_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
+if(PTHREAD_FOUND)
|
|
||||||
+ include_directories(${PTHREAD_INCLUDE_DIRS})
|
|
||||||
+ target_link_libraries(remmina ${PTHREAD_LIBRARIES})
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
if(GCRYPT_FOUND)
|
|
||||||
include_directories(${GCRYPT_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(remmina ${GCRYPT_LIBRARIES})
|
|
||||||
--
|
|
||||||
1.7.5.4
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,180 +0,0 @@
|
|||||||
From 84327f81995b4efe56503b94216e35eb9e99f243 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jean-Louis Dupond <jean-louis@dupond.be>
|
|
||||||
Date: Thu, 3 May 2012 15:25:02 +0200
|
|
||||||
Subject: [PATCH] Some more clipboard fixes
|
|
||||||
|
|
||||||
---
|
|
||||||
remmina-plugins/rdp/rdp_cliprdr.c | 68 ++++++++++++++++++++++---------------
|
|
||||||
remmina-plugins/rdp/rdp_plugin.c | 9 +++--
|
|
||||||
remmina-plugins/rdp/rdp_plugin.h | 2 +-
|
|
||||||
3 files changed, 48 insertions(+), 31 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
index b9b37ad..1424ac9 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_cliprdr.c
|
|
||||||
@@ -204,7 +204,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
g_printf("GetData: Requested Format: %#X\n", format);
|
|
||||||
rfContext* rfi = GET_DATA(gp);
|
|
||||||
GtkClipboard* clipboard;
|
|
||||||
- uint8* inbuf = NULL;
|
|
||||||
+ uint8* inbuf = (uint8*)"";
|
|
||||||
uint8* outbuf = NULL;
|
|
||||||
GdkPixbuf *image = NULL;
|
|
||||||
|
|
||||||
@@ -225,6 +225,8 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
|
|
||||||
if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT)
|
|
||||||
{
|
|
||||||
+ if (inbuf == NULL)
|
|
||||||
+ inbuf = (uint8*)"";
|
|
||||||
inbuf = lf2crlf(inbuf, size);
|
|
||||||
if (format == CB_FORMAT_TEXT)
|
|
||||||
{
|
|
||||||
@@ -243,6 +245,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
uniconv = freerdp_uniconv_new();
|
|
||||||
outbuf = (uint8*) freerdp_uniconv_out(uniconv, (char*) inbuf, &out_size);
|
|
||||||
freerdp_uniconv_free(uniconv);
|
|
||||||
+ g_free(inbuf);
|
|
||||||
*size = out_size + 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -253,11 +256,13 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
if (format == CB_FORMAT_PNG)
|
|
||||||
{
|
|
||||||
gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "png", NULL, NULL);
|
|
||||||
+ outbuf = (uint8*) xmalloc(buffersize);
|
|
||||||
memcpy(outbuf, data, buffersize);
|
|
||||||
}
|
|
||||||
if (format == CB_FORMAT_JPEG)
|
|
||||||
{
|
|
||||||
gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "jpeg", NULL, NULL);
|
|
||||||
+ outbuf = (uint8*) xmalloc(buffersize);
|
|
||||||
memcpy(outbuf, data, buffersize);
|
|
||||||
}
|
|
||||||
if (format == CB_FORMAT_DIB)
|
|
||||||
@@ -268,13 +273,9 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in
|
|
||||||
outbuf = (uint8*) xmalloc(*size);
|
|
||||||
memcpy(outbuf, data + 14, *size);
|
|
||||||
}
|
|
||||||
+ g_object_unref(image);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (inbuf)
|
|
||||||
- g_free(inbuf);
|
|
||||||
- if (G_IS_OBJECT(image))
|
|
||||||
- g_object_unref(image);
|
|
||||||
-
|
|
||||||
if (!outbuf)
|
|
||||||
outbuf = (uint8*)"";
|
|
||||||
|
|
||||||
@@ -357,7 +358,10 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE
|
|
||||||
if (clipboard)
|
|
||||||
{
|
|
||||||
if (text || img)
|
|
||||||
- rfi->clipboard_wait = TRUE;
|
|
||||||
+ {
|
|
||||||
+ rfi->clipboard_wait = 2;
|
|
||||||
+ g_printf("Setting Clipboard Wait\n");
|
|
||||||
+ }
|
|
||||||
if (text)
|
|
||||||
{
|
|
||||||
gtk_clipboard_set_text(clipboard, (gchar*)data, size);
|
|
||||||
@@ -404,31 +408,39 @@ void remmina_handle_channel_event(RemminaProtocolWidget* gp, RDP_EVENT* event)
|
|
||||||
for (i = 0; i < format_list_event->num_formats; i++)
|
|
||||||
{
|
|
||||||
g_printf("Format: 0x%X\n", format_list_event->formats[i]);
|
|
||||||
- if (format_list_event->formats[i] == CB_FORMAT_UNICODETEXT)
|
|
||||||
- {
|
|
||||||
- format = CB_FORMAT_UNICODETEXT;
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- if (format_list_event->formats[i] == CB_FORMAT_DIB)
|
|
||||||
- {
|
|
||||||
- format = CB_FORMAT_DIB;
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- if (format_list_event->formats[i] == CB_FORMAT_JPEG)
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < format_list_event->num_formats; i++)
|
|
||||||
+ {
|
|
||||||
+ g_printf("Format: 0x%X\n", format_list_event->formats[i]);
|
|
||||||
+ if (format_list_event->formats[i] > format)
|
|
||||||
{
|
|
||||||
- format = CB_FORMAT_JPEG;
|
|
||||||
- break;
|
|
||||||
+ g_printf("Format 0x%X is bigger!\n", format_list_event->formats[i]);
|
|
||||||
+ if (format_list_event->formats[i] == CB_FORMAT_UNICODETEXT)
|
|
||||||
+ {
|
|
||||||
+ format = CB_FORMAT_UNICODETEXT;
|
|
||||||
+ }
|
|
||||||
+ if (format_list_event->formats[i] == CB_FORMAT_DIB)
|
|
||||||
+ {
|
|
||||||
+ format = CB_FORMAT_DIB;
|
|
||||||
+ }
|
|
||||||
+ if (format_list_event->formats[i] == CB_FORMAT_JPEG)
|
|
||||||
+ {
|
|
||||||
+ format = CB_FORMAT_JPEG;
|
|
||||||
+ }
|
|
||||||
+ if (format_list_event->formats[i] == CB_FORMAT_PNG)
|
|
||||||
+ {
|
|
||||||
+ format = CB_FORMAT_PNG;
|
|
||||||
+ }
|
|
||||||
+ if (format_list_event->formats[i] == CB_FORMAT_TEXT)
|
|
||||||
+ {
|
|
||||||
+ format = CB_FORMAT_TEXT;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
- if (format_list_event->formats[i] == CB_FORMAT_PNG)
|
|
||||||
+ else
|
|
||||||
{
|
|
||||||
- format = CB_FORMAT_PNG;
|
|
||||||
- break;
|
|
||||||
+ g_printf("Format 0x%X is smaller!\n", format_list_event->formats[i]);
|
|
||||||
}
|
|
||||||
- if (format_list_event->formats[i] == CB_FORMAT_TEXT)
|
|
||||||
- {
|
|
||||||
- format = CB_FORMAT_TEXT;
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
rfi->requested_format = format;
|
|
||||||
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_plugin.c b/remmina-plugins/rdp/rdp_plugin.c
|
|
||||||
index fd0fe08..3c7fc0a 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_plugin.c
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_plugin.c
|
|
||||||
@@ -158,9 +158,14 @@ boolean rf_check_fds(RemminaProtocolWidget* gp)
|
|
||||||
event->mouse_event.x, event->mouse_event.y);
|
|
||||||
break;
|
|
||||||
case REMMINA_RDP_EVENT_TYPE_CLIPBOARD:
|
|
||||||
- if (!rfi->clipboard_wait)
|
|
||||||
+ if (rfi->clipboard_wait <= 0)
|
|
||||||
+ {
|
|
||||||
remmina_rdp_cliprdr_send_format_list_event(gp);
|
|
||||||
- rfi->clipboard_wait = FALSE;
|
|
||||||
+ g_printf("Clipboard Wait ON\n");
|
|
||||||
+ rfi->clipboard_wait = 0;
|
|
||||||
+ }
|
|
||||||
+ g_printf("Setting Clipboard Wait To FALSE\n");
|
|
||||||
+ rfi->clipboard_wait--;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/remmina-plugins/rdp/rdp_plugin.h b/remmina-plugins/rdp/rdp_plugin.h
|
|
||||||
index 1931384..ff66906 100644
|
|
||||||
--- a/remmina-plugins/rdp/rdp_plugin.h
|
|
||||||
+++ b/remmina-plugins/rdp/rdp_plugin.h
|
|
||||||
@@ -134,7 +134,7 @@ struct rf_context
|
|
||||||
GAsyncQueue* event_queue;
|
|
||||||
gint event_pipe[2];
|
|
||||||
|
|
||||||
- gboolean clipboard_wait;
|
|
||||||
+ gint clipboard_wait;
|
|
||||||
uint32 requested_format;
|
|
||||||
};
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.10
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
From cb0b209b775e08b0529786d18079437a58398621 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Rex Tsai <chihchun@kalug.linux.org.tw>
|
|
||||||
Date: Wed, 7 Mar 2012 16:44:01 +0800
|
|
||||||
Subject: [PATCH] Add --icon/-i option, contributed by Whoopie. fixed #14
|
|
||||||
|
|
||||||
Signed-off-by: Rex Tsai <chihchun@kalug.linux.org.tw>
|
|
||||||
---
|
|
||||||
remmina/src/remmina.c | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/remmina/src/remmina.c b/remmina/src/remmina.c
|
|
||||||
index 2a9c74b..c121880 100644
|
|
||||||
--- a/remmina/src/remmina.c
|
|
||||||
+++ b/remmina/src/remmina.c
|
|
||||||
@@ -55,6 +55,7 @@
|
|
||||||
static gboolean remmina_option_quit;
|
|
||||||
static gchar *remmina_option_server;
|
|
||||||
static gchar *remmina_option_protocol;
|
|
||||||
+static gboolean remmina_option_icon;
|
|
||||||
|
|
||||||
static GOptionEntry remmina_options[] =
|
|
||||||
{
|
|
||||||
@@ -68,6 +69,7 @@
|
|
||||||
{ "quit", 'q', 0, G_OPTION_ARG_NONE, &remmina_option_quit, "Quit the application", NULL },
|
|
||||||
{ "server", 's', 0, G_OPTION_ARG_STRING, &remmina_option_server, "Use default server name S", "S" },
|
|
||||||
{ "protocol", 't', 0, G_OPTION_ARG_STRING, &remmina_option_protocol, "Use default protocol T", "T" },
|
|
||||||
+{ "icon", 'i', 0, G_OPTION_ARG_NONE, &remmina_option_icon, "Start as tray icon", NULL },
|
|
||||||
{ NULL } };
|
|
||||||
|
|
||||||
static gint remmina_on_command_line(GApplication *app, GApplicationCommandLine *cmdline)
|
|
||||||
@@ -90,6 +92,7 @@ static gint remmina_on_command_line(GApplication *app, GApplicationCommandLine *
|
|
||||||
remmina_option_plugin = NULL;
|
|
||||||
remmina_option_server = NULL;
|
|
||||||
remmina_option_protocol = NULL;
|
|
||||||
+ remmina_option_icon = FALSE;
|
|
||||||
|
|
||||||
argv = g_application_command_line_get_arguments(cmdline, &argc);
|
|
||||||
|
|
||||||
@@ -157,6 +160,11 @@ static gint remmina_on_command_line(GApplication *app, GApplicationCommandLine *
|
|
||||||
remmina_exec_command(REMMINA_COMMAND_PLUGIN, remmina_option_plugin);
|
|
||||||
executed = TRUE;
|
|
||||||
}
|
|
||||||
+ if (remmina_option_icon)
|
|
||||||
+ {
|
|
||||||
+ remmina_exec_command(REMMINA_COMMAND_NONE, remmina_option_icon);
|
|
||||||
+ executed = TRUE;
|
|
||||||
+ }
|
|
||||||
if (!executed)
|
|
||||||
{
|
|
||||||
remmina_exec_command(REMMINA_COMMAND_MAIN, NULL);
|
|
||||||
--
|
|
||||||
1.8.1.6
|
|
||||||
|
|
Loading…
Reference in new issue