Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_gtk.h

Issue 155971: Linux: Select omnibox text on button release instead of press. (Closed)
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
index e0370eef9591c5aa5fe69b3e6197fe2d9b3da4b3..c0f6dd459c3a63b1b50b52c82775c8150b92a4c0 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
@@ -133,6 +133,14 @@ class AutocompleteEditViewGtk : public AutocompleteEditView {
}
gboolean HandleViewButtonPress(GdkEventButton* event);
+ static gboolean HandleViewButtonReleaseThunk(GtkWidget* view,
+ GdkEventButton* event,
+ gpointer self) {
+ return reinterpret_cast<AutocompleteEditViewGtk*>(self)->
+ HandleViewButtonRelease(event);
+ }
+ gboolean HandleViewButtonRelease(GdkEventButton* event);
+
static gboolean HandleViewFocusInThunk(GtkWidget* view,
GdkEventFocus* event,
gpointer self) {
@@ -296,6 +304,19 @@ class AutocompleteEditViewGtk : public AutocompleteEditView {
// ID of the signal handler for "mark-set" on |text_buffer_|.
gulong mark_set_handler_id_;
+ // Is the first mouse button currently down?
+ 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_;
+
DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk);
};
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698