kdiff3 has two issues under ubuntu gnome.
Problem 1: When starting kdiff3, it often does not take keyboard focus. User is required to click on window title bar to get keyboard focus.
Problem 2: At exit, kdiff3 often stalls for a number of seconds due to an issue with the Qt clipboard.
This patch fixes both of these issues.