summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 10:01:57 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 10:01:57 +0000
commit0f1354ccb69fe29243703064060d9ed87b306c1d (patch)
treeea7975f110fdabc5ccc43043e2f2d57d547ca51a /chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
parenta9e41c680f8d1ab6745e6bec0496d4f27d19d4ad (diff)
downloadchromium_src-0f1354ccb69fe29243703064060d9ed87b306c1d.zip
chromium_src-0f1354ccb69fe29243703064060d9ed87b306c1d.tar.gz
chromium_src-0f1354ccb69fe29243703064060d9ed87b306c1d.tar.bz2
Hack around klipper / glipper clipboard races.
I don't completely understand the problem, but I hacked up glipper to dump what was going on. It watches the primary clipboard ownership changes, then waits for the clipboard contents. There are some races there and then it eats our selection. The solution, which isn't great, is to disable the primary selection around setting up the inline autocomplete selection. This means that the primary selection is the full text and not just the inlined portion, but I don't see a huge case for using the autocompleted portion as the primary selection anyway. The other clipboard (ctrl-c / ctrl-v) should work the same as before. BUG=11956 TEST=That inline autocomplete works correctly like it did before. It should now also work correctly with glipper / klipper running. Review URL: http://codereview.chromium.org/119170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view_gtk.h')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_gtk.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
index 65dcad9..ab6ebd3 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
@@ -200,6 +200,11 @@ class AutocompleteEditViewGtk : public AutocompleteEditView {
GtkTextTag* insecure_scheme_tag_;
GtkTextTag* black_text_tag_;
+ // The primary selection clipboard for our text view widget. This is used
+ // for working around some clipboard manager (klipper / glipper) bugs by
+ // removing and adding back the clipboard around inline autocomplete.
+ GtkClipboard* primary_clipboard_;
+
scoped_ptr<AutocompleteEditModel> model_;
scoped_ptr<AutocompletePopupViewGtk> popup_view_;
AutocompleteEditController* controller_;