After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 652239 - win32: resurect Windows clipboard selection notification
win32: resurect Windows clipboard selection notification
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-06-09 22:08 UTC by Marc-Andre Lureau
Modified: 2011-10-25 05:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
win32: resurect Windows clipboard selection notification (13.22 KB, patch)
2011-06-09 22:08 UTC, Marc-Andre Lureau
committed Details | Review

Description Marc-Andre Lureau 2011-06-09 22:08:06 UTC
This is a rewrite of e6fa7394baa8a7cb80ae01a0c81729717019172b, with
misc fixes that should help with some bugs Tim was talking about.
Comment 1 Marc-Andre Lureau 2011-06-09 22:08:08 UTC
Created attachment 189589 [details] [review]
win32: resurect Windows clipboard selection notification
Comment 2 Marc-Andre Lureau 2011-06-09 22:09:12 UTC
Review of attachment 189589 [details] [review]:

yes, I also removed a few trailing ws, I guess that's okayish..
Comment 3 Matthias Clasen 2011-06-10 03:09:54 UTC
(In reply to comment #2)
> Review of attachment 189589 [details] [review]:
> 
> yes, I also removed a few trailing ws, I guess that's okayish..

Sure, thats fine.
Comment 4 Matthias Clasen 2011-06-10 03:11:05 UTC
If the patch makes things work better on win32, I would say go ahead and commit it.
Comment 5 Hans Breuer 2011-06-10 06:08:00 UTC
I would like to kow waht it is supposed to do better, i.e what problem does it solve. At least I do not understand it from the patch nor from Tor's removal comment: "* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code. It didn't really do anything useful, and was just confusing and incomplete." 

http://git.gnome.org/browse/gtk+/commit/?id=e6fa7394baa8a7cb80ae01a0c81729717019172b
Comment 6 Marc-Andre Lureau 2011-06-10 07:07:37 UTC
(In reply to comment #5)
> I would like to kow waht it is supposed to do better, i.e what problem does it
> solve. At least I do not understand it from the patch nor from Tor's removal
> comment: "* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code. It
> didn't really do anything useful, and was just confusing and incomplete." 
> 
> http://git.gnome.org/browse/gtk+/commit/?id=e6fa7394baa8a7cb80ae01a0c81729717019172b

Hans, it simply implements a clipboard notified (it's called clipboard viewer in Wndows). The old version wasn't actually sending GDK_OWNER_CHANGE events, so it didn't work in fact. Also, the *big* mistake was that it didn't forward WM_CHANGECBCHAIN to the next viewer. And it was also lacking some error checking.

(note: the new way of doing things is AddClipboardFormatListener, but it's only on >= Vista, and its not yet supported by mingw)
Comment 7 Marc-Andre Lureau 2011-06-10 11:48:05 UTC
Attachment 189589 [details] pushed as 88707e6 - win32: resurect Windows clipboard selection notification
Comment 8 Bakhtiar Hasmanan 2011-10-22 09:51:13 UTC
Hi, I tried GTK+-2.24.7 with mypaint as reported here http://gna.org/bugs/?18278 but still have the issue.

Use case:
Start mypaint with empty canvas
Start MS Paint, make doodle and copy part of it into clipboard
Paste on mypaint, which seems OK at first
Modify my doodling in MS Paint and copy again to clipboard (different data and size)
Paste again on mypaint, but this time it keep paste the previous image and so forth
Comment 9 Bakhtiar Hasmanan 2011-10-22 10:57:53 UTC
Just re-read the note, so this isn't for XP nor MinGW?
Comment 10 Marc-Andre Lureau 2011-10-22 15:30:53 UTC
(In reply to comment #9)
> Just re-read the note, so this isn't for XP nor MinGW?

Bakhtiar, the patch was not about copy-paste function itself, but rather the notification of clipboard changes. I don't think it's related to the bug you described, which seems to be broken copy-paste, with outdated data.
Comment 11 Bakhtiar Hasmanan 2011-10-22 16:10:35 UTC
OK thanks for your confirmation! will search for similar report then.