Changeset View
Changeset View
Standalone View
Standalone View
shell_client.cpp
Show First 20 Lines • Show All 925 Lines • ▼ Show 20 Line(s) | 921 | for (QWindow *w: windows) { | |||
---|---|---|---|---|---|
926 | if (s->id() != surface()->id()) { | 926 | if (s->id() != surface()->id()) { | ||
927 | continue; | 927 | continue; | ||
928 | } | 928 | } | ||
929 | m_internalWindow = w; | 929 | m_internalWindow = w; | ||
930 | m_internalWindowFlags = m_internalWindow->flags(); | 930 | m_internalWindowFlags = m_internalWindow->flags(); | ||
931 | connect(m_internalWindow, &QWindow::xChanged, this, &ShellClient::updateInternalWindowGeometry); | 931 | connect(m_internalWindow, &QWindow::xChanged, this, &ShellClient::updateInternalWindowGeometry); | ||
932 | connect(m_internalWindow, &QWindow::yChanged, this, &ShellClient::updateInternalWindowGeometry); | 932 | connect(m_internalWindow, &QWindow::yChanged, this, &ShellClient::updateInternalWindowGeometry); | ||
933 | connect(m_internalWindow, &QWindow::destroyed, this, [this] { m_internalWindow = nullptr; }); | 933 | connect(m_internalWindow, &QWindow::destroyed, this, [this] { m_internalWindow = nullptr; }); | ||
934 | connect(m_internalWindow, &QWindow::opacityChanged, this, &ShellClient::setOpacity); | ||||
934 | 935 | | |||
935 | // Try reading the window type from the QWindow. PlasmaCore.Dialog provides a dynamic type property | 936 | // Try reading the window type from the QWindow. PlasmaCore.Dialog provides a dynamic type property | ||
936 | // let's check whether it exists, if it does it's our window type | 937 | // let's check whether it exists, if it does it's our window type | ||
937 | const QVariant windowType = m_internalWindow->property("type"); | 938 | const QVariant windowType = m_internalWindow->property("type"); | ||
938 | if (!windowType.isNull()) { | 939 | if (!windowType.isNull()) { | ||
939 | m_windowType = static_cast<NET::WindowType>(windowType.toInt()); | 940 | m_windowType = static_cast<NET::WindowType>(windowType.toInt()); | ||
940 | } | 941 | } | ||
942 | setOpacity(m_internalWindow->opacity()); | ||||
941 | return; | 943 | return; | ||
942 | } | 944 | } | ||
943 | } | 945 | } | ||
944 | 946 | | |||
945 | void ShellClient::updateInternalWindowGeometry() | 947 | void ShellClient::updateInternalWindowGeometry() | ||
946 | { | 948 | { | ||
947 | if (!m_internalWindow) { | 949 | if (!m_internalWindow) { | ||
948 | return; | 950 | return; | ||
▲ Show 20 Lines • Show All 506 Lines • Show Last 20 Lines |