summaryrefslogtreecommitdiffstats
path: root/src/dialogs/swatches.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2006-02-28 09:07:11 +0000
committerjoncruz <joncruz@users.sourceforge.net>2006-02-28 09:07:11 +0000
commitf6130f4091bd7840740dc6d87c901bacf85a9a26 (patch)
treea6a317c7e1fd4b85ada8453b3c92f9879a133682 /src/dialogs/swatches.cpp
parentCleanup of embedded swatches palette switching. (diff)
downloadinkscape-f6130f4091bd7840740dc6d87c901bacf85a9a26.tar.gz
inkscape-f6130f4091bd7840740dc6d87c901bacf85a9a26.zip
Fixed bug with color drag-n-drop
(bzr r189)
Diffstat (limited to 'src/dialogs/swatches.cpp')
-rw-r--r--src/dialogs/swatches.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/dialogs/swatches.cpp b/src/dialogs/swatches.cpp
index 7da1b5694..3063e2280 100644
--- a/src/dialogs/swatches.cpp
+++ b/src/dialogs/swatches.cpp
@@ -101,19 +101,15 @@ static void dragGetColorData( GtkWidget *widget,
g_free(tmp);
tmp = 0;
} else {
- guchar tmp[8];
- tmp[0] = item->_r;
- tmp[1] = item->_r;
- tmp[2] = item->_g;
- tmp[3] = item->_g;
- tmp[4] = item->_b;
- tmp[5] = item->_b;
- tmp[6] = 0x0ff;
- tmp[7] = 0x0ff;
+ guint16 tmp[4];
+ tmp[0] = (item->_r << 8) | item->_r;
+ tmp[1] = (item->_g << 8) | item->_g;
+ tmp[2] = (item->_b << 8) | item->_b;
+ tmp[3] = 0xffff;
gtk_selection_data_set( data,
typeXColor,
- 8, // format
- tmp,
+ 16, // format
+ reinterpret_cast<const guchar*>(tmp),
(3+1) * 2);
}
}