View Full Version : widget window-types confusion
sweeze
December 1st, 2006, 09:24 PM
Using gandalfn's 0.3.4 packages on ubuntu edgy, I'm seeing some strange things happening with window types mappings. It appears that all firefox/mozilla widgets are being recognized as window type "Normal." So menus, tooltips, auto-complete popups, etc that are rendered by mozilla code are taking animations from the "Normal" window types instead of the appropriate window type (tooltip, etc). If I install beryl, it does not display this behavior...
edit: also seems to happen with openoffice.org tooltips and menus. again, normal gnome/gtk apps work fine, as does opera (the only qt app i have installed)
mikedee
December 2nd, 2006, 01:25 AM
There is a hack in beryl which manually sets the window type to unknown. It does not look too good to me and could possibly cause problems for other windows.
I think it is a problem that mozilla need to fix but if you really want it here is the patch
diff --git a/src/window.c b/src/window.c
index 0776459..9ffa25a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -740,6 +740,8 @@ recalcWindowType (CompWindow *w)
if (type == CompWindowTypeNormalMask)
{
+ if (w->attrib.override_redirect)
+ type = CompWindowTypeUnknownMask; // menu fix hack
if (w->transientFor)
type = CompWindowTypeDialogMask;
}
mikedee
December 2nd, 2006, 08:53 PM
Just to let you know, I have moved the hacks to the plugin rather than being in the core. I am just testing it now but everything looks OK so I will try to release a new version in the next couple of days.
sweeze
December 4th, 2006, 05:28 PM
thanks mike! building with that patch works wonders. if you do end up moving it into the animation plugin, it would be great if you could add it to the trailfocus plugin as well (but then maybe it does make sense in core, rather than adding the hack to every plugin that might need it...)
mikedee
December 4th, 2006, 05:42 PM
For the moment I will add the hack to all the plugins that need it, I will post on the mailing list to see if it could be added to the core. I am working on window type options so that animation will be a lot more configurable and the best time to ask would be then.
I would probably understand if it was not accepted because it might not even be the right hack, I have a feeling that the nature of it means that it could have undesired effects if implemented at the core level whereas there is no potential of problems if applied to the plugins individually.
I think the real solution is for Mozilla and Open Office to fix their toolkits, hopefully that will happen soon and we will not need these hacks any more.
Check the animation plugin thread for an updated version.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.