Esempio n. 1
0
void NetscapePlugin::platformGeometryDidChange()
{
    if (m_isWindowed) {
        uint64_t windowID = 0;
#if PLATFORM(GTK)
        windowID = static_cast<uint64_t>(GDK_WINDOW_XID(gtk_plug_get_socket_window(GTK_PLUG(m_platformPluginWidget))));
#endif
        IntRect clipRect(m_clipRect);
        clipRect.move(-m_frameRectInWindowCoordinates.x(), -m_frameRectInWindowCoordinates.y());
        controller()->windowedPluginGeometryDidChange(m_frameRectInWindowCoordinates, clipRect, windowID);
        return;
    }

    Display* display = x11HostDisplay();
    if (m_drawable)
        XFreePixmap(display, m_drawable);

    if (m_pluginSize.isEmpty()) {
        m_drawable = 0;
        return;
    }

    m_drawable = XCreatePixmap(display, rootWindowID(), m_pluginSize.width(), m_pluginSize.height(), displayDepth());

    XSync(display, false); // Make sure that the server knows about the Drawable.
}
void NetscapePluginX11::visibilityDidChange()
{
    ASSERT(m_plugin.isWindowed());
    uint64_t windowID = 0;
#if PLATFORM(GTK)
    windowID = static_cast<uint64_t>(GDK_WINDOW_XID(gtk_plug_get_socket_window(GTK_PLUG(m_platformPluginWidget))));
#endif
    m_plugin.controller()->windowedPluginVisibilityDidChange(m_plugin.isVisible(), windowID);
    m_plugin.controller()->windowedPluginGeometryDidChange(m_plugin.frameRectInWindowCoordinates(), m_plugin.clipRect(), windowID);
}
Esempio n. 3
0
void NetscapePlugin::platformVisibilityDidChange()
{
    if (!m_isWindowed)
        return;

    uint64_t windowID = 0;
#if PLATFORM(GTK)
    windowID = static_cast<uint64_t>(GDK_WINDOW_XID(gtk_plug_get_socket_window(GTK_PLUG(m_platformPluginWidget))));
#endif
    controller()->windowedPluginVisibilityDidChange(m_isVisible, windowID);
    controller()->windowedPluginGeometryDidChange(m_frameRectInWindowCoordinates, m_clipRect, windowID);
}
void NetscapePluginX11::geometryDidChange()
{
    if (m_plugin.isWindowed()) {
        uint64_t windowID = 0;
#if PLATFORM(GTK)
        windowID = static_cast<uint64_t>(GDK_WINDOW_XID(gtk_plug_get_socket_window(GTK_PLUG(m_platformPluginWidget))));
#endif
        m_plugin.controller()->windowedPluginGeometryDidChange(m_plugin.frameRectInWindowCoordinates(), m_plugin.clipRect(), windowID);
        return;
    }

    m_drawable.reset();
    if (m_plugin.size().isEmpty())
        return;

    m_drawable = XCreatePixmap(x11HostDisplay(), rootWindowID(), m_plugin.size().width(), m_plugin.size().height(), displayDepth());
    XSync(x11HostDisplay(), false); // Make sure that the server knows about the Drawable.
}