Changeset View
Changeset View
Standalone View
Standalone View
xdgshellclient.cpp
Show First 20 Lines • Show All 367 Lines • ▼ Show 20 Line(s) | 367 | stream << "\'XdgShellClient:" << surface() << ";WMCLASS:" << resourceClass() << ":" | |||
---|---|---|---|---|---|
368 | << resourceName() << ";Caption:" << caption() << "\'"; | 368 | << resourceName() << ";Caption:" << caption() << "\'"; | ||
369 | } | 369 | } | ||
370 | 370 | | |||
371 | bool XdgShellClient::belongsToDesktop() const | 371 | bool XdgShellClient::belongsToDesktop() const | ||
372 | { | 372 | { | ||
373 | const auto clients = waylandServer()->clients(); | 373 | const auto clients = waylandServer()->clients(); | ||
374 | 374 | | |||
375 | return std::any_of(clients.constBegin(), clients.constEnd(), | 375 | return std::any_of(clients.constBegin(), clients.constEnd(), | ||
376 | [this](const XdgShellClient *client) { | 376 | [this](const AbstractClient *client) { | ||
377 | if (belongsToSameApplication(client, SameApplicationChecks())) { | 377 | if (belongsToSameApplication(client, SameApplicationChecks())) { | ||
378 | return client->isDesktop(); | 378 | return client->isDesktop(); | ||
379 | } | 379 | } | ||
380 | return false; | 380 | return false; | ||
381 | } | 381 | } | ||
382 | ); | 382 | ); | ||
383 | } | 383 | } | ||
384 | 384 | | |||
▲ Show 20 Lines • Show All 790 Lines • ▼ Show 20 Line(s) | 1172 | if (m_xdgShellToplevel) { | |||
1175 | } | 1175 | } | ||
1176 | } | 1176 | } | ||
1177 | if (m_xdgShellPopup) { | 1177 | if (m_xdgShellPopup) { | ||
1178 | transientSurface = m_xdgShellPopup->transientFor().data(); | 1178 | transientSurface = m_xdgShellPopup->transientFor().data(); | ||
1179 | } | 1179 | } | ||
1180 | if (!transientSurface) { | 1180 | if (!transientSurface) { | ||
1181 | transientSurface = waylandServer()->findForeignTransientForSurface(surface()); | 1181 | transientSurface = waylandServer()->findForeignTransientForSurface(surface()); | ||
1182 | } | 1182 | } | ||
1183 | XdgShellClient *transientClient = waylandServer()->findClient(transientSurface); | 1183 | AbstractClient *transientClient = waylandServer()->findClient(transientSurface); | ||
1184 | if (transientClient != transientFor()) { | 1184 | if (transientClient != transientFor()) { | ||
1185 | // Remove from main client. | 1185 | // Remove from main client. | ||
1186 | if (transientFor()) { | 1186 | if (transientFor()) { | ||
1187 | transientFor()->removeTransient(this); | 1187 | transientFor()->removeTransient(this); | ||
1188 | } | 1188 | } | ||
1189 | setTransientFor(transientClient); | 1189 | setTransientFor(transientClient); | ||
1190 | if (transientClient) { | 1190 | if (transientClient) { | ||
1191 | transientClient->addTransient(this); | 1191 | transientClient->addTransient(this); | ||
▲ Show 20 Lines • Show All 737 Lines • ▼ Show 20 Line(s) | 1928 | { | |||
1929 | if (isMinimized()) { | 1929 | if (isMinimized()) { | ||
1930 | workspace()->clientHidden(this); | 1930 | workspace()->clientHidden(this); | ||
1931 | } else { | 1931 | } else { | ||
1932 | emit windowShown(this); | 1932 | emit windowShown(this); | ||
1933 | } | 1933 | } | ||
1934 | workspace()->updateMinimizedOfTransients(this); | 1934 | workspace()->updateMinimizedOfTransients(this); | ||
1935 | } | 1935 | } | ||
1936 | 1936 | | |||
1937 | void XdgShellClient::placeIn(const QRect &area) | | |||
1938 | { | | |||
1939 | Placement::self()->place(this, area); | | |||
1940 | setGeometryRestore(frameGeometry()); | | |||
1941 | } | | |||
1942 | | ||||
1943 | void XdgShellClient::showOnScreenEdge() | 1937 | void XdgShellClient::showOnScreenEdge() | ||
1944 | { | 1938 | { | ||
1945 | if (!m_plasmaShellSurface || m_unmapped) { | 1939 | if (!m_plasmaShellSurface || m_unmapped) { | ||
1946 | return; | 1940 | return; | ||
1947 | } | 1941 | } | ||
1948 | hideClient(false); | 1942 | hideClient(false); | ||
1949 | workspace()->raiseClient(this); | 1943 | workspace()->raiseClient(this); | ||
1950 | if (m_plasmaShellSurface->panelBehavior() == PlasmaShellSurfaceInterface::PanelBehavior::AutoHide) { | 1944 | if (m_plasmaShellSurface->panelBehavior() == PlasmaShellSurfaceInterface::PanelBehavior::AutoHide) { | ||
▲ Show 20 Lines • Show All 130 Lines • Show Last 20 Lines |