summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-09-01 14:03:09 +0200
committerDanny Baumann <dannybaumann@web.de>2007-09-01 14:03:09 +0200
commitaabf50d2164627443452221d7bab532ffc7ba9a2 (patch)
tree7457aae1e58257158e6f9e05bb7686d94dc94094
parentf3e9d6f14ed86c339e242ae3aff3811843a0e2b2 (diff)
downloadworkarounds-aabf50d2164627443452221d7bab532ffc7ba9a2.tar.gz
workarounds-aabf50d2164627443452221d7bab532ffc7ba9a2.tar.bz2
Fix recognition of Firefox windows.
Re-apply fixes on class name changes.
-rw-r--r--workarounds.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/workarounds.c b/workarounds.c
index 283c16b..f5ae1d8 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -209,7 +209,7 @@ workaroundsDoFixes (CompWindow *w)
{
if (w->wmType == CompWindowTypeNormalMask &&
w->attrib.override_redirect && w->resName &&
- strcmp (w->resName, "gecko"))
+ (strcmp (w->resName, "gecko") == 0))
{
newWmType = CompWindowTypeDropdownMenuMask;
}
@@ -250,9 +250,7 @@ workaroundsDoFixes (CompWindow *w)
free (windowRole);
}
- /* fix Qt transients - FIXME: is there a better way to detect them?
- Especially we have to take care of windows which get a class name
- later on */
+ /* fix Qt transients - FIXME: is there a better way to detect them? */
if (w->wmType == newWmType)
{
if (!w->resName && w->attrib.override_redirect &&
@@ -321,14 +319,25 @@ workaroundsHandleEvent (CompDisplay *d,
(*d->handleEvent) (d, event);
WRAP (wd, d, handleEvent, workaroundsHandleEvent);
- if (event->type == ClientMessage)
- {
+ switch (event->type) {
+ case ClientMessage:
if (event->xclient.message_type == d->winDesktopAtom)
{
w = findWindowAtDisplay (d, event->xclient.window);
if (w)
workaroundsUpdateSticky (w);
}
+ break;
+ case PropertyNotify:
+ if (event->xproperty.atom == XA_WM_CLASS)
+ {
+ w = findWindowAtDisplay (d, event->xproperty.window);
+ if (w)
+ workaroundsDoFixes (w);
+ }
+ break;
+ default:
+ break;
}
}