Beispiel #1
0
void WindowProperty::setWindowId(int window)
{
    if (m_windowId == window)
        return;

    m_windowId = window;

    if (m_surface) {
        QObject::disconnect(m_surface, SIGNAL(windowPropertyChanged(QString,QVariant)), 
                            this, SLOT(windowPropertyChanged(QString)));
        QObject::disconnect(m_surface, SIGNAL(destroyed(QObject *)),
                            this, SIGNAL(valueChanged()));
        m_surface = 0;
    }

    LipstickCompositor *c = LipstickCompositor::instance();
    if (c) m_surface = c->surfaceForId(window);

    if (m_surface) {
        QObject::connect(m_surface, SIGNAL(windowPropertyChanged(QString,QVariant)), 
                         this, SLOT(windowPropertyChanged(QString)));
        QObject::connect(m_surface, SIGNAL(destroyed(QObject *)),
                         this, SIGNAL(valueChanged()));
    }
    
    disconnectRef();

    emit windowIdChanged();
    emit valueChanged();
}
Beispiel #2
0
void LipstickCompositor::surfaceCreated(QWaylandSurface *surface)
{
    Q_UNUSED(surface)
    connect(surface, SIGNAL(mapped()), this, SLOT(surfaceMapped()));
    connect(surface, SIGNAL(unmapped()), this, SLOT(surfaceUnmapped()));
    connect(surface, SIGNAL(sizeChanged()), this, SLOT(surfaceSizeChanged()));
    connect(surface, SIGNAL(titleChanged()), this, SLOT(surfaceTitleChanged()));
    connect(surface, SIGNAL(windowPropertyChanged(QString,QVariant)), this, SLOT(windowPropertyChanged(QString)));
    connect(surface, SIGNAL(raiseRequested()), this, SLOT(surfaceRaised()));
    connect(surface, SIGNAL(lowerRequested()), this, SLOT(surfaceLowered()));
    connect(surface, SIGNAL(damaged(QRect)), this, SLOT(surfaceDamaged(QRect)));
}
Beispiel #3
0
void X11Support::onX11Event(XEvent* event)
{
	if(event->type == m_damageEventBase + XDamageNotify)
	{
		// Repair damaged area.
		XDamageNotifyEvent* damageEvent = reinterpret_cast<XDamageNotifyEvent*>(event);
		XDamageSubtract(QX11Info::display(), damageEvent->damage, None, None);

		emit windowDamaged(event->xany.window);
	}
	if(event->type == DestroyNotify)
		emit windowClosed(event->xdestroywindow.window);
	if(event->type == PropertyNotify)
		emit windowPropertyChanged(event->xproperty.window, event->xproperty.atom);
	if(event->type == ClientMessage)
		emit clientMessageReceived(event->xclient.window, event->xclient.message_type, event->xclient.data.b);
}
Beispiel #4
0
DockApplet::DockApplet(PanelWindow* panelWindow)
	: Applet(panelWindow), m_dragging(false)
{
	// Register for notifications about window property changes.
	connect(X11Support::instance(), SIGNAL(windowPropertyChanged(ulong,ulong)), this, SLOT(windowPropertyChanged(ulong,ulong)));
}
void QWaylandNativeInterface::emitWindowPropertyChanged(QPlatformWindow *window, const QString &name)
{
    emit windowPropertyChanged(window,name);
}
void ExtendedSurface::setWindowPropertyImpl(const QString &name, const QVariant &value)
{
    m_windowProperties.insert(name, value);
    emit windowPropertyChanged(name,value);
}