[Xfce4-commits] [apps/xfce4-terminal] 01/01: Fix parsing color from dragged data
noreply at xfce.org
noreply at xfce.org
Tue Jun 21 10:05:05 CEST 2016
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit 2015384813d02aa767af88f87caca5f735d2b76c
Author: Igor <f2404 at yandex.ru>
Date: Tue Jun 21 11:03:17 2016 +0300
Fix parsing color from dragged data
---
terminal/terminal-widget.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/terminal/terminal-widget.c b/terminal/terminal-widget.c
index 82bf462..b801f5f 100644
--- a/terminal/terminal-widget.c
+++ b/terminal/terminal-widget.c
@@ -571,9 +571,10 @@ terminal_widget_drag_data_received (GtkWidget *widget,
{
/* get the color from the selection data (ignoring the alpha setting) */
const guchar *data = gtk_selection_data_get_data (selection_data);
- color.red = ((gdouble *) data)[0];
- color.green = ((gdouble *) data)[1];
- color.blue = ((gdouble *) data)[2];
+ color.red = (gdouble) data[0] / 65535.;
+ color.green = (gdouble) data[1] / 65535.;
+ color.blue = (gdouble) data[2] / 65535.;
+ color.alpha = 1.;
/* prepare the value */
g_value_init (&value, GDK_TYPE_RGBA);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list