forked from quickshell/quickshell
wayland: namespace type names a bit to prevent future conflicts
This commit is contained in:
parent
1e647cee51
commit
3480707e99
8 changed files with 106 additions and 106 deletions
|
@ -18,9 +18,9 @@
|
|||
#include "window.hpp"
|
||||
|
||||
// clang-format off
|
||||
[[nodiscard]] QtWayland::zwlr_layer_shell_v1::layer toWaylandLayer(const Layer::Enum& layer) noexcept;
|
||||
[[nodiscard]] QtWayland::zwlr_layer_shell_v1::layer toWaylandLayer(const WlrLayer::Enum& layer) noexcept;
|
||||
[[nodiscard]] QtWayland::zwlr_layer_surface_v1::anchor toWaylandAnchors(const Anchors& anchors) noexcept;
|
||||
[[nodiscard]] QtWayland::zwlr_layer_surface_v1::keyboard_interactivity toWaylandKeyboardFocus(const KeyboardFocus::Enum& focus) noexcept;
|
||||
[[nodiscard]] QtWayland::zwlr_layer_surface_v1::keyboard_interactivity toWaylandKeyboardFocus(const WlrKeyboardFocus::Enum& focus) noexcept;
|
||||
[[nodiscard]] QSize constrainedSize(const Anchors& anchors, const QSize& size) noexcept;
|
||||
// clang-format on
|
||||
|
||||
|
@ -127,12 +127,12 @@ void QSWaylandLayerSurface::updateKeyboardFocus() {
|
|||
this->set_keyboard_interactivity(toWaylandKeyboardFocus(this->ext->mKeyboardFocus));
|
||||
}
|
||||
|
||||
QtWayland::zwlr_layer_shell_v1::layer toWaylandLayer(const Layer::Enum& layer) noexcept {
|
||||
QtWayland::zwlr_layer_shell_v1::layer toWaylandLayer(const WlrLayer::Enum& layer) noexcept {
|
||||
switch (layer) {
|
||||
case Layer::Background: return QtWayland::zwlr_layer_shell_v1::layer_background;
|
||||
case Layer::Bottom: return QtWayland::zwlr_layer_shell_v1::layer_bottom;
|
||||
case Layer::Top: return QtWayland::zwlr_layer_shell_v1::layer_top;
|
||||
case Layer::Overlay: return QtWayland::zwlr_layer_shell_v1::layer_overlay;
|
||||
case WlrLayer::Background: return QtWayland::zwlr_layer_shell_v1::layer_background;
|
||||
case WlrLayer::Bottom: return QtWayland::zwlr_layer_shell_v1::layer_bottom;
|
||||
case WlrLayer::Top: return QtWayland::zwlr_layer_shell_v1::layer_top;
|
||||
case WlrLayer::Overlay: return QtWayland::zwlr_layer_shell_v1::layer_overlay;
|
||||
}
|
||||
|
||||
return QtWayland::zwlr_layer_shell_v1::layer_top;
|
||||
|
@ -148,12 +148,12 @@ QtWayland::zwlr_layer_surface_v1::anchor toWaylandAnchors(const Anchors& anchors
|
|||
}
|
||||
|
||||
QtWayland::zwlr_layer_surface_v1::keyboard_interactivity
|
||||
toWaylandKeyboardFocus(const KeyboardFocus::Enum& focus) noexcept {
|
||||
toWaylandKeyboardFocus(const WlrKeyboardFocus::Enum& focus) noexcept {
|
||||
switch (focus) {
|
||||
case KeyboardFocus::None: return QtWayland::zwlr_layer_surface_v1::keyboard_interactivity_none;
|
||||
case KeyboardFocus::Exclusive:
|
||||
case WlrKeyboardFocus::None: return QtWayland::zwlr_layer_surface_v1::keyboard_interactivity_none;
|
||||
case WlrKeyboardFocus::Exclusive:
|
||||
return QtWayland::zwlr_layer_surface_v1::keyboard_interactivity_exclusive;
|
||||
case KeyboardFocus::OnDemand:
|
||||
case WlrKeyboardFocus::OnDemand:
|
||||
return QtWayland::zwlr_layer_surface_v1::keyboard_interactivity_on_demand;
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ void LayershellWindowExtension::setExclusiveZone(qint32 exclusiveZone) {
|
|||
|
||||
qint32 LayershellWindowExtension::exclusiveZone() const { return this->mExclusiveZone; }
|
||||
|
||||
void LayershellWindowExtension::setLayer(Layer::Enum layer) {
|
||||
void LayershellWindowExtension::setLayer(WlrLayer::Enum layer) {
|
||||
if (layer != this->mLayer) {
|
||||
this->mLayer = layer;
|
||||
if (this->surface != nullptr) this->surface->updateLayer();
|
||||
|
@ -121,9 +121,9 @@ void LayershellWindowExtension::setLayer(Layer::Enum layer) {
|
|||
}
|
||||
}
|
||||
|
||||
Layer::Enum LayershellWindowExtension::layer() const { return this->mLayer; }
|
||||
WlrLayer::Enum LayershellWindowExtension::layer() const { return this->mLayer; }
|
||||
|
||||
void LayershellWindowExtension::setKeyboardFocus(KeyboardFocus::Enum focus) {
|
||||
void LayershellWindowExtension::setKeyboardFocus(WlrKeyboardFocus::Enum focus) {
|
||||
if (focus != this->mKeyboardFocus) {
|
||||
this->mKeyboardFocus = focus;
|
||||
if (this->surface != nullptr) this->surface->updateKeyboardFocus();
|
||||
|
@ -131,7 +131,7 @@ void LayershellWindowExtension::setKeyboardFocus(KeyboardFocus::Enum focus) {
|
|||
}
|
||||
}
|
||||
|
||||
KeyboardFocus::Enum LayershellWindowExtension::keyboardFocus() const {
|
||||
WlrKeyboardFocus::Enum LayershellWindowExtension::keyboardFocus() const {
|
||||
return this->mKeyboardFocus;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "../../core/panelinterface.hpp"
|
||||
|
||||
///! WlrLayershell layer
|
||||
namespace Layer { // NOLINT
|
||||
namespace WlrLayer { // NOLINT
|
||||
Q_NAMESPACE;
|
||||
QML_ELEMENT;
|
||||
|
||||
|
@ -29,7 +29,7 @@ Q_ENUM_NS(Enum);
|
|||
} // namespace Layer
|
||||
|
||||
///! WlrLayershell keyboard focus mode
|
||||
namespace KeyboardFocus { // NOLINT
|
||||
namespace WlrKeyboardFocus { // NOLINT
|
||||
Q_NAMESPACE;
|
||||
QML_ELEMENT;
|
||||
|
||||
|
@ -74,11 +74,11 @@ public:
|
|||
void setExclusiveZone(qint32 exclusiveZone);
|
||||
[[nodiscard]] qint32 exclusiveZone() const;
|
||||
|
||||
void setLayer(Layer::Enum layer);
|
||||
[[nodiscard]] Layer::Enum layer() const;
|
||||
void setLayer(WlrLayer::Enum layer);
|
||||
[[nodiscard]] WlrLayer::Enum layer() const;
|
||||
|
||||
void setKeyboardFocus(KeyboardFocus::Enum focus);
|
||||
[[nodiscard]] KeyboardFocus::Enum keyboardFocus() const;
|
||||
void setKeyboardFocus(WlrKeyboardFocus::Enum focus);
|
||||
[[nodiscard]] WlrKeyboardFocus::Enum keyboardFocus() const;
|
||||
|
||||
// no effect if configured
|
||||
void setUseWindowScreen(bool value);
|
||||
|
@ -101,9 +101,9 @@ private:
|
|||
Anchors mAnchors;
|
||||
Margins mMargins;
|
||||
qint32 mExclusiveZone = 0;
|
||||
Layer::Enum mLayer = Layer::Top;
|
||||
WlrLayer::Enum mLayer = WlrLayer::Top;
|
||||
QString mNamespace = "quickshell";
|
||||
KeyboardFocus::Enum mKeyboardFocus = KeyboardFocus::None;
|
||||
WlrKeyboardFocus::Enum mKeyboardFocus = WlrKeyboardFocus::None;
|
||||
|
||||
friend class QSWaylandLayerSurface;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue