Changeset View
Changeset View
Standalone View
Standalone View
shell/panelconfigview.cpp
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
53 | 53 | | |||
54 | connect(panelView, SIGNAL(screenChanged(QScreen *)), &m_screenSyncTimer, SLOT(start())); | 54 | connect(panelView, SIGNAL(screenChanged(QScreen *)), &m_screenSyncTimer, SLOT(start())); | ||
55 | m_screenSyncTimer.setSingleShot(true); | 55 | m_screenSyncTimer.setSingleShot(true); | ||
56 | m_screenSyncTimer.setInterval(150); | 56 | m_screenSyncTimer.setInterval(150); | ||
57 | connect(&m_screenSyncTimer, &QTimer::timeout, | 57 | connect(&m_screenSyncTimer, &QTimer::timeout, | ||
58 | [=]() { | 58 | [=]() { | ||
59 | setScreen(panelView->screen()); | 59 | setScreen(panelView->screen()); | ||
60 | KWindowSystem::setType(winId(), NET::Dock); | 60 | KWindowSystem::setType(winId(), NET::Dock); | ||
61 | setFlags(Qt::WindowFlags((flags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) & (~Qt::WindowDoesNotAcceptFocus))); | | |||
62 | KWindowSystem::setState(winId(), NET::KeepAbove); | 61 | KWindowSystem::setState(winId(), NET::KeepAbove); | ||
63 | syncGeometry(); | 62 | syncGeometry(); | ||
64 | syncLocation(); | 63 | syncLocation(); | ||
65 | }); | 64 | }); | ||
66 | 65 | | |||
67 | KWindowSystem::setType(winId(), NET::Dock); | 66 | KWindowSystem::setType(winId(), NET::Dock); | ||
68 | KWindowSystem::setState(winId(), NET::KeepAbove); | 67 | KWindowSystem::setState(winId(), NET::KeepAbove); | ||
69 | setFlags(Qt::WindowFlags((flags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) & (~Qt::WindowDoesNotAcceptFocus))); | | |||
mart: note: removing the whole line seems to be necessary as seems that setting any flag does break… | |||||
I can see why it would break KeepAbove. QXcbWindow::setWindowFlags explicitly sets setNetWmStateWindowFlags without reading it from the window first. davidedmundson: I can see why it would break KeepAbove.
QXcbWindow::setWindowFlags explicitly sets… | |||||
70 | KWindowSystem::forceActiveWindow(winId()); | 68 | KWindowSystem::forceActiveWindow(winId()); | ||
71 | 69 | | |||
72 | KWindowEffects::enableBlurBehind(winId(), true); | 70 | KWindowEffects::enableBlurBehind(winId(), true); | ||
73 | updateContrast(); | 71 | updateContrast(); | ||
74 | connect(&m_theme, &Plasma::Theme::themeChanged, this, &PanelConfigView::updateContrast); | 72 | connect(&m_theme, &Plasma::Theme::themeChanged, this, &PanelConfigView::updateContrast); | ||
75 | 73 | | |||
76 | rootContext()->setContextProperty(QStringLiteral("panel"), panelView); | 74 | rootContext()->setContextProperty(QStringLiteral("panel"), panelView); | ||
77 | rootContext()->setContextProperty(QStringLiteral("configDialog"), this); | 75 | rootContext()->setContextProperty(QStringLiteral("configDialog"), this); | ||
▲ Show 20 Lines • Show All 211 Lines • Show Last 20 Lines |
note: removing the whole line seems to be necessary as seems that setting any flag does break focus