Changeset View
Changeset View
Standalone View
Standalone View
src/plasmaquick/dialog.cpp
Show First 20 Lines • Show All 302 Lines • ▼ Show 20 Line(s) | 301 | #if HAVE_KWAYLAND | |||
---|---|---|---|---|---|
303 | //to set its position again as there won't be any move event to sync QWindow::position and shellsurface::position | 303 | //to set its position again as there won't be any move event to sync QWindow::position and shellsurface::position | ||
304 | if (shellSurface && type != Dialog::OnScreenDisplay) { | 304 | if (shellSurface && type != Dialog::OnScreenDisplay) { | ||
305 | shellSurface->setPosition(q->position()); | 305 | shellSurface->setPosition(q->position()); | ||
306 | } | 306 | } | ||
307 | #endif | 307 | #endif | ||
308 | } | 308 | } | ||
309 | } | 309 | } | ||
310 | 310 | | |||
311 | if (!q->flags().testFlag(Qt::ToolTip) && type != Dialog::Notification) { | 311 | if (!q->flags().testFlag(Qt::ToolTip) && type != Dialog::Notification && type != Dialog::CriticalNotification) { | ||
312 | KWindowEffects::SlideFromLocation slideLocation = KWindowEffects::NoEdge; | 312 | KWindowEffects::SlideFromLocation slideLocation = KWindowEffects::NoEdge; | ||
313 | 313 | | |||
314 | switch (location) { | 314 | switch (location) { | ||
315 | case Plasma::Types::TopEdge: | 315 | case Plasma::Types::TopEdge: | ||
316 | slideLocation = KWindowEffects::TopEdge; | 316 | slideLocation = KWindowEffects::TopEdge; | ||
317 | break; | 317 | break; | ||
318 | case Plasma::Types::LeftEdge: | 318 | case Plasma::Types::LeftEdge: | ||
319 | slideLocation = KWindowEffects::LeftEdge; | 319 | slideLocation = KWindowEffects::LeftEdge; | ||
Show All 16 Lines | 335 | if (visible) { | |||
336 | q->raise(); | 336 | q->raise(); | ||
337 | 337 | | |||
338 | if (type != Dialog::Normal) { | 338 | if (type != Dialog::Normal) { | ||
339 | KWindowSystem::setType(q->winId(), (NET::WindowType)type); | 339 | KWindowSystem::setType(q->winId(), (NET::WindowType)type); | ||
340 | } else { | 340 | } else { | ||
341 | q->setFlags(Qt::FramelessWindowHint | q->flags()); | 341 | q->setFlags(Qt::FramelessWindowHint | q->flags()); | ||
342 | } | 342 | } | ||
343 | 343 | | |||
344 | if (type == Dialog::Dock || type == Dialog::Notification || type == Dialog::OnScreenDisplay) { | 344 | if (type == Dialog::Dock || type == Dialog::Notification || type == Dialog::OnScreenDisplay || type == Dialog::CriticalNotification) { | ||
345 | KWindowSystem::setOnAllDesktops(q->winId(), true); | 345 | KWindowSystem::setOnAllDesktops(q->winId(), true); | ||
346 | } else { | 346 | } else { | ||
347 | KWindowSystem::setOnAllDesktops(q->winId(), false); | 347 | KWindowSystem::setOnAllDesktops(q->winId(), false); | ||
348 | } | 348 | } | ||
349 | } | 349 | } | ||
350 | } | 350 | } | ||
351 | 351 | | |||
352 | void DialogPrivate::updateMinimumWidth() | 352 | void DialogPrivate::updateMinimumWidth() | ||
▲ Show 20 Lines • Show All 733 Lines • ▼ Show 20 Line(s) | 1067 | { | |||
1086 | } else { | 1086 | } else { | ||
1087 | if (d->type == Tooltip) { | 1087 | if (d->type == Tooltip) { | ||
1088 | d->frameSvgItem->setImagePath(QStringLiteral("widgets/tooltip")); | 1088 | d->frameSvgItem->setImagePath(QStringLiteral("widgets/tooltip")); | ||
1089 | } else { | 1089 | } else { | ||
1090 | d->frameSvgItem->setImagePath(QStringLiteral("dialogs/background")); | 1090 | d->frameSvgItem->setImagePath(QStringLiteral("dialogs/background")); | ||
1091 | } | 1091 | } | ||
1092 | } | 1092 | } | ||
1093 | 1093 | | |||
1094 | if (type == Dock || type == Notification || type == OnScreenDisplay) { | 1094 | if (type == Dock || type == Notification || type == OnScreenDisplay || type == CriticalNotification) { | ||
1095 | KWindowSystem::setOnAllDesktops(winId(), true); | 1095 | KWindowSystem::setOnAllDesktops(winId(), true); | ||
1096 | } else { | 1096 | } else { | ||
1097 | KWindowSystem::setOnAllDesktops(winId(), false); | 1097 | KWindowSystem::setOnAllDesktops(winId(), false); | ||
1098 | } | 1098 | } | ||
1099 | 1099 | | |||
1100 | emit typeChanged(); | 1100 | emit typeChanged(); | ||
1101 | } | 1101 | } | ||
1102 | 1102 | | |||
▲ Show 20 Lines • Show All 292 Lines • Show Last 20 Lines |