From 2ccfaaa4df749f9ecb46c112c6f59e8063aadd86 Mon Sep 17 00:00:00 2001 From: "davemoore@chromium.org" Date: Wed, 13 Jan 2010 00:42:45 +0000 Subject: 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 --- app/active_window_watcher_x.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/active_window_watcher_x.cc') 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(property); GdkWindow* active_window = gdk_window_lookup(xid); -- cgit v1.1