mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
XEmbedComponent: Add new option to ignore the XEMBED_MAPPED flag
This commit is contained in:
parent
fde2512f64
commit
9d45b5bc30
2 changed files with 18 additions and 1 deletions
|
|
@ -78,6 +78,19 @@ public:
|
||||||
return withMember (*this, &XEmbedComponentOptions::allowForeignWidgetToResizeComponent, x);
|
return withMember (*this, &XEmbedComponentOptions::allowForeignWidgetToResizeComponent, x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** When this option is enabled the client window will be unconditionally mapped regardless of
|
||||||
|
the value of the XEMBED_MAPPED flag.
|
||||||
|
|
||||||
|
You should generally not use this option. The default value is false.
|
||||||
|
|
||||||
|
It's used internally by JUCE plugin hosting to accommodate some plugins that report
|
||||||
|
XEmbedInfo compatibility, but don't set the flag.
|
||||||
|
*/
|
||||||
|
[[nodiscard]] XEmbedComponentOptions withIgnoreXembedMapped (bool x = true) const
|
||||||
|
{
|
||||||
|
return withMember (*this, &XEmbedComponentOptions::ignoreXembedMapped, x);
|
||||||
|
}
|
||||||
|
|
||||||
/** @see withClientWindow() */
|
/** @see withClientWindow() */
|
||||||
[[nodiscard]] auto getClientWindow() const { return clientWindow; }
|
[[nodiscard]] auto getClientWindow() const { return clientWindow; }
|
||||||
|
|
||||||
|
|
@ -87,10 +100,14 @@ public:
|
||||||
/** @see withAllowForeignWidgetToResizeComponent() */
|
/** @see withAllowForeignWidgetToResizeComponent() */
|
||||||
[[nodiscard]] bool getAllowForeignWidgetToResizeComponent() const { return allowForeignWidgetToResizeComponent; }
|
[[nodiscard]] bool getAllowForeignWidgetToResizeComponent() const { return allowForeignWidgetToResizeComponent; }
|
||||||
|
|
||||||
|
/** @see withIgnoreXembedMapped() */
|
||||||
|
[[nodiscard]] bool getIgnoreXembedMapped() const { return ignoreXembedMapped; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned long clientWindow{};
|
unsigned long clientWindow{};
|
||||||
bool wantsKeyboardFocus = true;
|
bool wantsKeyboardFocus = true;
|
||||||
bool allowForeignWidgetToResizeComponent = false;
|
bool allowForeignWidgetToResizeComponent = false;
|
||||||
|
bool ignoreXembedMapped = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
|
||||||
|
|
@ -317,7 +317,7 @@ private:
|
||||||
if (window == 0)
|
if (window == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto shouldBeMapped = pimpl.getXEmbedMappedFlag()
|
const auto shouldBeMapped = (pimpl.getXEmbedMappedFlag() || pimpl.options.getIgnoreXembedMapped())
|
||||||
&& pimpl.owner.isShowing()
|
&& pimpl.owner.isShowing()
|
||||||
&& pimpl.lastPeer != nullptr;
|
&& pimpl.lastPeer != nullptr;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue