diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-31 15:23:52 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-31 15:23:52 +0000 |
commit | 9eb8f98b6f7582ce25ba8cac11827edb8a08a5eb (patch) | |
tree | 414144c1f93e2a4534a8ad7e763f30edb6242d6a /chrome/browser/autocomplete/autocomplete_edit_view_gtk.h | |
parent | 00f17cfe1032061d8802db44639f3be62294b474 (diff) | |
download | chromium_src-9eb8f98b6f7582ce25ba8cac11827edb8a08a5eb.zip chromium_src-9eb8f98b6f7582ce25ba8cac11827edb8a08a5eb.tar.gz chromium_src-9eb8f98b6f7582ce25ba8cac11827edb8a08a5eb.tar.bz2 |
Linux: Re-enable omnibox select-all-on-click for Chrome OS builds.
TEST=built chrome-os and non- binaries and made sure they worked as expected
Review URL: http://codereview.chromium.org/342069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30667 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.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h index adef44c..cbf4965 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h @@ -147,6 +147,7 @@ class AutocompleteEditViewGtk : public AutocompleteEditView, } gboolean HandleKeyRelease(GtkWidget* widget, GdkEventKey* event); +#if defined(OS_CHROMEOS) static gboolean HandleViewButtonPressThunk(GtkWidget* view, GdkEventButton* event, gpointer self) { @@ -162,6 +163,7 @@ class AutocompleteEditViewGtk : public AutocompleteEditView, HandleViewButtonRelease(event); } gboolean HandleViewButtonRelease(GdkEventButton* event); +#endif static gboolean HandleViewFocusInThunk(GtkWidget* view, GdkEventFocus* event, @@ -383,6 +385,27 @@ class AutocompleteEditViewGtk : public AutocompleteEditView, // ID of the signal handler for "mark-set" on |text_buffer_|. gulong mark_set_handler_id_; +#if defined(OS_CHROMEOS) + // The following variables are used to implement select-all-on-mouse-up, which + // is disabled in the standard Linux build due to poor interaction with the + // PRIMARY X selection. + + // Is the first mouse button currently down? When selection marks get moved, + // we use this to determine if the user was highlighting text with the mouse + // -- if so, we avoid selecting all the text on mouse-up. + bool button_1_pressed_; + + // Did the user change the selected text in the middle of the current click? + // If so, we don't select all of the text when the button is released -- we + // don't want to blow away their selection. + bool text_selected_during_click_; + + // Was the text view already focused before the user clicked in it? We use + // this to figure out whether we should select all of the text when the button + // is released (we only do so if the view was initially unfocused). + bool text_view_focused_before_button_press_; +#endif + #if !defined(TOOLKIT_VIEWS) // Supplies colors, et cetera. GtkThemeProvider* theme_provider_; |