summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_x.cxx6
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 0822202bc..a00edb443 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1021,14 +1021,14 @@ static unsigned char *create_bmp(const unsigned char *data, int W, int H, int *r
return b;
}
-void Fl::copy_image(const unsigned char *data, int W, int H, int clipboard){
- if(!data || W<=0 || H<=0) return;
+// takes a raw RGB image and puts it in the copy/paste buffer
+void Fl_X::copy_image(const unsigned char *data, int W, int H, int clipboard){
+ if (!data || W <= 0 || H <= 0) return;
delete[] fl_selection_buffer[clipboard];
fl_selection_buffer[clipboard] = (char *) create_bmp(data,W,H,&fl_selection_length[clipboard]);
fl_selection_buffer_length[clipboard] = fl_selection_length[clipboard];
fl_i_own_selection[clipboard] = 1;
fl_selection_type[clipboard] = Fl::clipboard_image;
-
Atom property = clipboard ? CLIPBOARD : XA_PRIMARY;
XSetSelectionOwner(fl_display, property, fl_message_window, fl_event_time);
}
diff --git a/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx
index 3cb07dbd5..e665bc9ea 100644
--- a/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx
@@ -69,7 +69,7 @@ Fl_Xlib_Copy_Surface_Driver::~Fl_Xlib_Copy_Surface_Driver() {
unsigned char *data = fl_read_image(NULL,0,0,width,height,0);
fl_window = oldwindow;
_ss->set_current();
- Fl::copy_image(data,width,height,1);
+ Fl_X::copy_image(data,width,height,1);
delete[] data;
fl_delete_offscreen(xid);
}