How to hide a DocementWindow added to desktop from taskbar?

Hello there;

I have a base window that drives from the DialogWindow that is added to Desktop. My aim is to hide this window displaying at the taskbar. I have searched the form and found this:

So implementing something like:

int BaseDialog::getDesktopWindowStyleFlags()
	int flags = DocumentWindow::getDesktopWindowStyleFlags();

	flags &= ~(ComponentPeer::windowAppearsOnTaskbar);

	return flags;

But it didn’t work as deep inside the TopLevelWindow’s parentHierarchyChanged method there is a call to:

void TopLevelWindow::setDropShadowEnabled (const bool useShadow)
    useDropShadow = useShadow;

    if (isOnDesktop())
        deleteAndZero (shadower);
        Component::addToDesktop (getDesktopWindowStyleFlags());

which overwrites my style flag by calling its own getDesktopWindowStyleFlags()

Is there any work around for this case or any idea to achieve the issue stated above?

Thanks for advance.

It looks to me like your code there should work fine (?)… Unless the problem is that the setDropShadowEnabled thing happens during the superclass constructor, in which case, maybe just make an extra call to parentHierarchychanged after your own constructor has run.