bugMyPaint - Bugs: bug #18278, [Windows] [GTK] "paste"...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #18278: [Windows] [GTK] "paste" from clipboard always paste the same image

Submitted by:  gissehel <gissehel2>
Submitted on:  Sat Jun 25 20:52:55 2011  
Severity: 3 - NormalPriority: 5 - Normal
Status: Need InfoPrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 0.9.1Planned Release: None
Operating System: Windows

(Jump to the original submission Jump to the original submission)

Thu Feb 11 01:07:57 2016, comment #16:

Probably is still happening: see https://github.com/mypaint/mypaint/issues/595

Andrew Chadwick <achadwick>
Project Administrator
Tue Jun 24 21:09:25 2014, comment #15:

Hi everyone --

I'm in the middle of triaging bugs for the project's migration to github, and it looks as though this bug hasn't received any updates for a long time. Does anyone know if this is still happening with the 1.1.0+git builds, or more recently?


This bug tracker will shortly be moving to github. As part of this
process, we're reviewing old bug reports on gna.org. Please
respond so that we know this bug is still live.

Andrew Chadwick <achadwick>
Project Administrator
Wed Nov 30 14:12:17 2011, comment #14:

If your first workaround (dummy callback) harmless to linux then why not, I've seen the usage of request_target in pygtk tutorial although demonstrate text data.

Still doesn't explain why gdk not handle bmp automatically. And I don't see them (request_*) implemented in gimp and inkscape, so it's hard to compare.

Bakhtiar <tumagonx>
Project Administrator
Sun Nov 27 23:33:03 2011, comment #13:

Thanks, that's more make sense
the underlying code for clipboard handling is in

Briefly reading, it should support both bmp(without alpha) and png. Will read more..

Bakhtiar <tumagonx>
Project Administrator
Sun Nov 27 22:36:26 2011, comment #12:

From what I understand right now :

request_image calls request_content with "content type" (which is called "target") "image/png".

When copying an image any typical (almost all) windows software (like MS paint) the only target returned by "request_targets" is "image/bmp". When copying from Gimp on windows, the only target returned by "request_targets" is "image/png".
That explain the difference. Still not the whole process...

In the following sequence :
- Copy an image from MS paint
- call 'request_contents("image/png",callback)'
=> The callback receive the outdated information

In the following sequence :
- Copy an image from MS paint
- call 'request_targets(request_targets_callback)'
- call 'request_contents("image/png",callback)'
=> The request_targets_callback receive only "image/bmp" BUT callback receive the right information.

Look like "request_targets" enable a sort of "auto convert" once it has noticed that the content is an image. Didn't found that code thought. I still don't know if request_targets is mandatory or not, so I don't know if it's a gtk bug or not.

Note : under pygtk/linux, I always receive "image/png" when copying image from any app (gtk or not, like firefox), that explain the win32 specific.

gissehel <gissehel2>
Sun Nov 27 20:40:33 2011, comment #11:

After playing a bit with interactive python console and pygtk, I found an (ugly?) workaround.

Context : "clipboard" is a python var containing a GtkClipboard. I've already read image using clipboard.request_image(callback)

- Put an image in the clipboard using MS Paint
- call "clipboard.request_image(callback)"

callback will be call with the outdated image.

- create a dummy callback : "def dummycallback(a,b,c) : pass"
- Put an image in the clipboard using MS Paint
- call "clipboard.request_targets(dummycallback)"
- call "clipboard.request_image(callback)"

callback will be call with the expected image.

Clearly, it's a PyGtk or Gtk problem (except if request_targets is more or less mandatory ??)

I'm trying to write a clean simple python script to reproduce the problem.

gissehel <gissehel2>
Sun Nov 27 19:45:04 2011, comment #10:

Ok, I've tried GIMP -> MyPaint, and It works here too (at least on 1.0.0)

I've uninstalled 0.9.1, so I didn't test it with 0.9.1.

When I tested the first time, I remember trying :
Any windows app -> GIMP = working
Any windows app -> MyPaint = not working

But I don't remember if I tried :
GIMP -> MyPaint

If I tried, it was not working, because I clearly remember it was logical (i.e. : everything paste to MyPaint was not working, while every paste to something else was working...)

Is it a PyGtk problem ? Or the way MyPaint use PyGtk ?

As I said, I failed compiling MyPaint on windows, but I know daily use python on windows, and I can try interacting with pygtk clipboard if that question is not answered.

gissehel <gissehel2>
Sun Nov 27 18:58:42 2011, comment #9:

Sorry, not won't accept it but not seeing the changes.

Bakhtiar <tumagonx>
Project Administrator
Sun Nov 27 18:57:05 2011, comment #8:

I use my own gimp build for this testing:

with mypaint 1.0.0

What happening is if the clipboard data is not pixbuf data Mypaint won't accept it (a.k.a from MS Paint) Gimp however appears to have their own clipboard system that will accept other format.

In my tests
GIMP -> MyPaint = working
MS Paint -> MyPaint = not working
MS Paint -> GIMP = working
MS Paint -> GIMP -> MyPaint = working

Bakhtiar <tumagonx>
Project Administrator
Sun Nov 27 17:51:26 2011, comment #7:

Sorry for delay...

I tested both releases :
- 061111 from http://dl.dropbox.com/u/2554170/mypaint-git-061111.7z (link obtained on http://opensourcepack.blogspot.com/2009/08/mypaint-git-build-for-win32.html)
- 1.0 from http://download.gna.org/mypaint/mypaint-1.0.0-win32-installer.exe (link obtained on http://mypaint.intilinux.com/?page_id=6)

The exact same problem is present on both versions.

Version informations on file libgtk-win32-2.0-0.dll are :
- 061111 : 2.24.7
- 1.0 : 2.24.8

I also tried to compile myself, but failed miserably.

gissehel <gissehel2>
Tue Nov 15 23:58:33 2011, comment #6:

This bug fixed with latest GTK, or mypaint 061111git
please re-test http://mypaint.intilinux.com/?p=610

I try it between GIMP and MyPaint

Bakhtiar <tumagonx>
Project Administrator
Mon Oct 24 13:04:43 2011, comment #5:

Apparently bugfix isn't related to our case according the committer.

Bakhtiar <tumagonx>
Project Administrator
Fri Oct 21 07:48:16 2011, comment #4:

Bakhtiar, better add a comment to the bugzilla bug then, with the exact gtk version and link here.

Martin Renold <martinxyz>
Project Administrator
Fri Oct 21 07:31:11 2011, comment #3:

I have tried GTK+-2.24.7 which has https://bugzilla.gnome.org/show_bug.cgi?id=652239 merged but still able to reproduce the issue.

Bakhtiar <tumagonx>
Project Administrator
Sun Jun 26 15:41:49 2011, comment #2:

There seems to be active work being done on clipboard handling on then Win32 port of GTK, so there is hope that this bug will be fixed with newer versions. Eg.


Martin Renold <martinxyz>
Project Administrator
Sun Jun 26 08:02:07 2011, comment #1:

I just tested with 0.9.1 on Linux and it works as expected. Marking bug as Windows specific.

Martin Renold <martinxyz>
Project Administrator
Sat Jun 25 20:52:55 2011, original submission:

I'm using 0.9.1 "official" build downloaded from http://download.gna.org/mypaint/mypaint-0.9.1-win32-installer.exe under Windows 7.

When I paste an image into the current workspace, it works as excpeted.

But when I paste another image (so the clipboard changed), it always paste the same image as the first one.

The clipboard works in every other applications (lets say gimp for exemple) and I of course checked the images I exepected to be in the clipboard really were there by pasting them into SEVERAL image editors (like gimp).

gissehel <gissehel2>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by achadwick (Posted a comment)
  • -unavailable- added by tumagonx (Posted a comment)
  • -unavailable- added by martinxyz (Posted a comment)
  • -unavailable- added by gissehel2 (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Jun 24 21:09:25 2014achadwickStatusReady For Test=>Need Info
    Tue Nov 15 23:58:33 2011tumagonxStatusConfirmed=>Ready For Test
      Summary[Windows] "paste" from clipboard always paste the same image=>[Windows] [GTK] "paste" from clipboard always paste the same image
    Fri Oct 21 07:45:10 2011martinxyzStatusNone=>Confirmed
    Sun Jun 26 08:02:06 2011martinxyzSummaryThe "paste" action from clipboard only works once; it always paste the image that was in the clipboard the first time.=>[Windows] "paste" from clipboard always paste the same image
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup