diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 18:38:28 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 18:38:28 +0000 |
commit | c3e5312a57b506e1a6d26dace8e8c9320b9966a3 (patch) | |
tree | 2476d7ca57e528bb0c8818452f3010f03b60191f /views/widget/widget_gtk.h | |
parent | 004ec925e3f71aeba2acd1461741ccddd92eeedc (diff) | |
download | chromium_src-c3e5312a57b506e1a6d26dace8e8c9320b9966a3.zip chromium_src-c3e5312a57b506e1a6d26dace8e8c9320b9966a3.tar.gz chromium_src-c3e5312a57b506e1a6d26dace8e8c9320b9966a3.tar.bz2 |
Revert 78222 - Add native capture API to Widget, and fix a bug in Window where we wouldn't let the window be closed from the X.
BUG=72040
TEST=none
TBR=sky
Review URL: http://codereview.chromium.org/6697016
TBR=ben@chromium.org
Review URL: http://codereview.chromium.org/6695028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78241 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget_gtk.h')
-rw-r--r-- | views/widget/widget_gtk.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h index 584be82..370e9cf 100644 --- a/views/widget/widget_gtk.h +++ b/views/widget/widget_gtk.h @@ -182,9 +182,6 @@ class WidgetGtk : public Widget, virtual void* GetNativeWindowProperty(const char* name) OVERRIDE; virtual TooltipManager* GetTooltipManager() const OVERRIDE; virtual bool IsScreenReaderActive() const OVERRIDE; - virtual void SetNativeCapture() OVERRIDE; - virtual void ReleaseNativeCapture() OVERRIDE; - virtual bool HasNativeCapture() const OVERRIDE; virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE; virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE; virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; @@ -266,10 +263,19 @@ class WidgetGtk : public Widget, void set_mouse_down(bool mouse_down) { is_mouse_down_ = mouse_down; } + // Do we own the mouse grab? + bool has_capture() const { return has_capture_; } + // Returns whether capture should be released on mouse release. The default // is true. virtual bool ReleaseCaptureOnMouseReleased(); + // Does a mouse grab on this widget. + virtual void DoGrab(); + + // Releases a grab done by this widget. + virtual void ReleaseGrab(); + // Invoked when input grab is stolen by other GtkWidget in the same // application. virtual void HandleGrabBroke(); @@ -341,6 +347,9 @@ class WidgetGtk : public Widget, // If true, the mouse is currently down. bool is_mouse_down_; + // Have we done a mouse grab? + bool has_capture_; + // The following are used to detect duplicate mouse move events and not // deliver them. Displaying a window may result in the system generating // duplicate move events even though the mouse hasn't moved. |