diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-13 20:03:37 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-13 20:03:37 +0000 |
commit | d3ce6c2c6d203f9479530ac46fc5af9e8a9ccffe (patch) | |
tree | af6c6061c46a9c26fc427cf20430f94ff4857b72 /app | |
parent | ad52bc02638bec160930dee6351ef7e0deead676 (diff) | |
download | chromium_src-d3ce6c2c6d203f9479530ac46fc5af9e8a9ccffe.zip chromium_src-d3ce6c2c6d203f9479530ac46fc5af9e8a9ccffe.tar.gz chromium_src-d3ce6c2c6d203f9479530ac46fc5af9e8a9ccffe.tar.bz2 |
Linux: Notify Chrome when it loses the focus.
I think that this was a regression -- the code was only
notifying windows about their active/inactive states
when the focus was passed to a new Chrome window. If a
different app got the focus instead, they'd retain the
old states.
BUG=32127
TEST=tried it
Review URL: http://codereview.chromium.org/548022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/active_window_watcher_x.cc | 11 | ||||
-rw-r--r-- | app/active_window_watcher_x.h | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/app/active_window_watcher_x.cc b/app/active_window_watcher_x.cc index c118718..3c11b15 100644 --- a/app/active_window_watcher_x.cc +++ b/app/active_window_watcher_x.cc @@ -66,13 +66,10 @@ void ActiveWindowWatcherX::NotifyActiveWindowChanged() { if (format == 32 && num_items == 1) { int xid = *reinterpret_cast<int*>(property); GdkWindow* active_window = gdk_window_lookup(xid); - - if (active_window) { - FOR_EACH_OBSERVER( - Observer, - observers_, - ActiveWindowChanged(active_window)); - } + FOR_EACH_OBSERVER( + Observer, + observers_, + ActiveWindowChanged(active_window)); } if (property) XFree(property); diff --git a/app/active_window_watcher_x.h b/app/active_window_watcher_x.h index 2ea524e..0934ad4 100644 --- a/app/active_window_watcher_x.h +++ b/app/active_window_watcher_x.h @@ -18,6 +18,7 @@ class ActiveWindowWatcherX { public: class Observer { public: + // |active_window| will be NULL if the active window isn't one of Chrome's. virtual void ActiveWindowChanged(GdkWindow* active_window) = 0; }; |