Skip to content

Commit 7f8ce0a

Browse files
committed
Revert "feat: add LayerOSD to dispaly notification on lock"
This reverts commit b70974e.
1 parent 9dadf40 commit 7f8ce0a

File tree

5 files changed

+4
-32
lines changed

5 files changed

+4
-32
lines changed

frame/layershell/dlayershellwindow.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class DS_SHARE DLayerShellWindow : public QObject
3434
public:
3535
~DLayerShellWindow() override;
3636

37-
// clang-format off
3837
/**
3938
* This enum type is used to specify the position where to anchor
4039
*/
@@ -57,8 +56,6 @@ class DS_SHARE DLayerShellWindow : public QObject
5756
LayerButtom = 1,
5857
LayerTop = 2,
5958
LayerOverlay = 3,
60-
LayerExtension = 8,
61-
LayerOSD
6259
};
6360

6461
Q_ENUM(Layer)
@@ -86,7 +83,6 @@ class DS_SHARE DLayerShellWindow : public QObject
8683
};
8784

8885
Q_ENUM(KeyboardInteractivity)
89-
// clang-format on
9086

9187
void setAnchors(Anchors anchor);
9288
Anchors anchors() const;

frame/layershell/qwaylandlayershellsurface.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ QWaylandLayerShellSurface::QWaylandLayerShellSurface(QtWayland::zwlr_layer_shell
4545
}
4646
}
4747

48-
init(shell->get_layer_surface(window->waylandSurface()->object(), output, shellLayer(), m_dlayerShellWindow->scope()));
48+
init(shell->get_layer_surface(window->waylandSurface()->object(), output, m_dlayerShellWindow->layer(), m_dlayerShellWindow->scope()));
4949

50-
set_layer(shellLayer());
51-
connect(m_dlayerShellWindow, &DLayerShellWindow::layerChanged, this, [this, window]() {
52-
set_layer(shellLayer());
50+
set_layer(m_dlayerShellWindow->layer());
51+
connect(m_dlayerShellWindow, &DLayerShellWindow::layerChanged, this, [this, window](){
52+
set_layer(m_dlayerShellWindow->layer());
5353
window->waylandSurface()->commit();
5454
});
5555

@@ -125,15 +125,6 @@ void QWaylandLayerShellSurface::trySetAnchorsAndSize()
125125
}
126126
}
127127

128-
DLayerShellWindow::Layer QWaylandLayerShellSurface::shellLayer() const
129-
{
130-
const auto layer = m_dlayerShellWindow->layer();
131-
if (layer >= DLayerShellWindow::LayerExtension)
132-
return DLayerShellWindow::LayerOverlay;
133-
134-
return layer;
135-
}
136-
137128
void QWaylandLayerShellSurface::zwlr_layer_surface_v1_configure(uint32_t serial, uint32_t width, uint32_t height)
138129
{
139130
ack_configure(serial);

frame/layershell/qwaylandlayershellsurface_p.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class QWaylandLayerShellSurface : public QtWaylandClient::QWaylandShellSurface,
3636
void calcAndSetRequestSize(QSize requestSize);
3737
bool anchorsSizeConflict() const;
3838
void trySetAnchorsAndSize();
39-
DLayerShellWindow::Layer shellLayer() const;
4039

4140
DLayerShellWindow* m_dlayerShellWindow;
4241
QSize m_pendingSize;

frame/layershell/x11dlayershellemulation.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,6 @@ void LayerShellEmulation::onLayerChanged()
105105
xcbWindow->setWindowType(QNativeInterface::Private::QXcbWindow::Notification);
106106
break;
107107
}
108-
case DLayerShellWindow::LayerOSD: {
109-
// FIXME: To display on top of lock for notification.
110-
m_window->setFlags(m_window->flags() & ~Qt::WindowStaysOnBottomHint | Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint);
111-
QObject::connect(m_window, &QWindow::visibleChanged, this, &LayerShellEmulation::doRaiseWindow, Qt::UniqueConnection);
112-
break;
113-
}
114108
}
115109
}
116110

@@ -235,13 +229,6 @@ void LayerShellEmulation::onExclusionZoneChanged()
235229
xcb_ewmh_set_wm_strut_partial(&ewmh_connection, m_window->winId(), strut_partial);
236230
}
237231

238-
void LayerShellEmulation::doRaiseWindow()
239-
{
240-
if (m_window && m_window->isVisible()) {
241-
m_window->raise();
242-
}
243-
}
244-
245232
// void X11Emulation::onKeyboardInteractivityChanged()
246233
// {
247234
// // kwin no implentation on wayland

frame/layershell/x11dlayershellemulation.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ private slots:
2727
void onPositionChanged();
2828
void onExclusionZoneChanged();
2929
// void onKeyboardInteractivityChanged();
30-
void doRaiseWindow();
3130

3231
private:
3332
QWindow* m_window;

0 commit comments

Comments
 (0)