Wed 30 Nov 2011 02:12:17 PM UTC, 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.
|
Sun 27 Nov 2011 11:33:03 PM UTC, comment #13:
Thanks, that's more make sense
the underlying code for clipboard handling is in
gdk\win32\gdkselection-win32.c
Briefly reading, it should support both bmp(without alpha) and png. Will read more..
|
Sun 27 Nov 2011 10:36:26 PM UTC, 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.
|
Sun 27 Nov 2011 08:40:33 PM UTC, 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.
|
Sun 27 Nov 2011 07:45:04 PM UTC, 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.
|
Sun 27 Nov 2011 06:58:42 PM UTC, comment #9:
Sorry, not won't accept it but not seeing the changes.
|
Sun 27 Nov 2011 06:57:05 PM UTC, comment #8:
I use my own gimp build for this testing:
http://dl.dropbox.com/u/2554170/GTKGraphics-1.0_Core2_Win32_Setup.exe
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
|
Sun 27 Nov 2011 05:51:26 PM UTC, 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.
|
Tue 15 Nov 2011 11:58:33 PM UTC, 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
|
Mon 24 Oct 2011 01:04:43 PM UTC, comment #5:
Apparently bugfix isn't related to our case according the committer.
|
Fri 21 Oct 2011 07:48:16 AM UTC, comment #4:
Bakhtiar, better add a comment to the bugzilla bug then, with the exact gtk version and link here.
|
Fri 21 Oct 2011 07:31:11 AM UTC, 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.
|
Sun 26 Jun 2011 03:41:49 PM UTC, 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.
https://bugzilla.gnome.org/show_bug.cgi?id=652239
|
Sun 26 Jun 2011 08:02:07 AM UTC, comment #1:
I just tested with 0.9.1 on Linux and it works as expected. Marking bug as Windows specific.
|
Sat 25 Jun 2011 08:52:55 PM UTC, 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).
|