GNOME Bugzilla – Bug 711555
dnd: Don't try to remove an invalid idle source
Last modified: 2013-11-06 17:37:23 UTC
See patch.
Created attachment 259091 [details] [review] dnd: Don't try to remove an invalid idle source As the handler returns false, the corresponding source is removed automatically and its id invalidated. Reset the id to 0 to reflect this, otherwise newer versions of GLib will print a warning when we later try to remove it explicitly.
Review of attachment 259091 [details] [review]: OK. (We should also not remove the existing idle, and just quick-return when there's already an idle queued, but that would also require this fix)
Created attachment 259121 [details] [review] dnd: Don't queue an idle handler if we already have one Removing an existing source before scheduling a new one is not wrong, but slightly less effective than doing nothing and relying on the previously created source to do the job. (In reply to comment #2) > (We should also not remove the existing idle, and just quick-return when > there's already an idle queued, but that would also require this fix) Sure.
Review of attachment 259121 [details] [review]: Yep.
Attachment 259091 [details] pushed as 735f589 - dnd: Don't try to remove an invalid idle source Attachment 259121 [details] pushed as fce2930 - dnd: Don't queue an idle handler if we already have one