summaryrefslogtreecommitdiff
path: root/src
diff options
authorJason Smith <jason.smith@canonical.com>2010-12-15 16:49:39 -0500
committerJason Smith <jason.smith@canonical.com>2010-12-15 16:49:39 -0500
commit30ea8f72aa3d4c0f3d96dc567cda392bd148f94f (patch)
tree7c514ddbd5d580699dd25b16e7ffebc1fbd0a905 /src
parent43f90a72ea15cc23e9c961357517ec796a6aaa4b (diff)
one more focus bug down
(bzr r711.1.4)
Diffstat (limited to 'src')
-rw-r--r--src/BamfLauncherIcon.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/BamfLauncherIcon.cpp b/src/BamfLauncherIcon.cpp
index b02ed608a..fecf1c574 100644
--- a/src/BamfLauncherIcon.cpp
+++ b/src/BamfLauncherIcon.cpp
@@ -225,7 +225,7 @@ BamfLauncherIcon::Focus ()
if (window)
{
- if (window->state () & CompWindowStateDemandsAttentionMask)
+ if (bamf_view_is_urgent (view))
any_urgent = true;
windows.push_back (window);
}
@@ -261,13 +261,31 @@ BamfLauncherIcon::Focus ()
if (any_urgent)
{
- for (it = windows.begin (); it != windows.end (); it++)
+ // we cant use the compiz tracking since it is currently broken
+ /*for (it = windows.begin (); it != windows.end (); it++)
{
if ((*it)->state () & CompWindowStateDemandsAttentionMask)
{
(*it)->activate ();
break;
}
+ }*/
+ for (l = children; l; l = l->next)
+ {
+ view = (BamfView *) l->data;
+
+ if (BAMF_IS_WINDOW (view))
+ {
+ guint32 xid = bamf_window_get_xid (BAMF_WINDOW (view));
+
+ CompWindow *window = m_Screen->findWindow ((Window) xid);
+
+ if (window && bamf_view_is_urgent (view))
+ {
+ window->activate ();
+ break;
+ }
+ }
}
}
else if (any_on_current)