summaryrefslogtreecommitdiffstats
path: root/app/active_window_watcher_x.cc
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 00:42:45 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 00:42:45 +0000
commit2ccfaaa4df749f9ecb46c112c6f59e8063aadd86 (patch)
treec08cacfb5a869134c698c981c0ce8047e7d59e5e /app/active_window_watcher_x.cc
parent0b35d1c7ed660645057ba30cdab8b01ba7d53555 (diff)
downloadchromium_src-2ccfaaa4df749f9ecb46c112c6f59e8063aadd86.zip
chromium_src-2ccfaaa4df749f9ecb46c112c6f59e8063aadd86.tar.gz
chromium_src-2ccfaaa4df749f9ecb46c112c6f59e8063aadd86.tar.bz2
Fix to way we identify the active window. This deals with XFCE which
doesn't set the property correctly. Bug=31971 Test=Run Chrome under the XFCE WM and ensure that inactive windows titles are light blue Review URL: http://codereview.chromium.org/550019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36073 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/active_window_watcher_x.cc')
-rw-r--r--app/active_window_watcher_x.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/active_window_watcher_x.cc b/app/active_window_watcher_x.cc
index 8b8b72c..c118718 100644
--- a/app/active_window_watcher_x.cc
+++ b/app/active_window_watcher_x.cc
@@ -59,8 +59,11 @@ void ActiveWindowWatcherX::NotifyActiveWindowChanged() {
&remaining_bytes,
&property);
- // Check that the property was set and contained a single 32-bit item.
- if (format == 32 && num_items == 1 && remaining_bytes == 0) {
+ // Check that the property was set and contained a single 32-bit item (we
+ // don't check that remaining_bytes is 0, though, as XFCE's window manager
+ // seems to actually store two values in the property for some unknown
+ // reason.)
+ if (format == 32 && num_items == 1) {
int xid = *reinterpret_cast<int*>(property);
GdkWindow* active_window = gdk_window_lookup(xid);