Exemplo n.º 1
0
void Widget::show()
{
    setSelfVisible(true);

    if (isParentVisible() && platformWidget())
        gtk_widget_show(platformWidget());
}
Exemplo n.º 2
0
void Widget::hide()
{
    setSelfVisible(false);

    if (isParentVisible() && platformWidget())
        gtk_widget_hide(platformWidget());
}
void WebPluginContainerImpl::setParentVisible(bool parentVisible)
{
    // We override this function to make sure that geometry updates are sent
    // over to the plugin. For e.g. when a plugin is instantiated it does not
    // have a valid parent. As a result the first geometry update from webkit
    // is ignored. This function is called when the plugin eventually gets a
    // parent.

    if (isParentVisible() == parentVisible)
        return;  // No change.

    Widget::setParentVisible(parentVisible);
    if (!isSelfVisible())
        return;  // This widget has explicitely been marked as not visible.

    m_webPlugin->updateVisibility(isVisible());
}