mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 18:45:59 +01:00
protocols: fix for hyprwayland-scanner update
This commit is contained in:
parent
ed69502ff6
commit
87173bd09d
4 changed files with 9 additions and 9 deletions
|
@ -86,7 +86,7 @@ void CCursorShapeProtocol::createCursorShapeDevice(CWpCursorShapeManagerV1* pMgr
|
|||
|
||||
void CCursorShapeProtocol::onSetShape(CWpCursorShapeDeviceV1* pMgr, uint32_t serial, wpCursorShapeDeviceV1Shape shape) {
|
||||
if ((uint32_t)shape == 0 || (uint32_t)shape > sizeof(SHAPE_NAMES)) {
|
||||
wl_resource_post_error(pMgr->resource(), ERROR_INVALID_SHAPE, "The shape is invalid");
|
||||
wl_resource_post_error(pMgr->resource(), WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE, "The shape is invalid");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ void CTearingControl::updateWindow() {
|
|||
if (!pWindow)
|
||||
return;
|
||||
|
||||
pWindow->m_bTearingHint = hint == PRESENTATION_HINT_ASYNC;
|
||||
pWindow->m_bTearingHint = hint == WP_TEARING_CONTROL_V1_PRESENTATION_HINT_ASYNC;
|
||||
}
|
||||
|
||||
bool CTearingControl::good() {
|
||||
|
|
|
@ -28,7 +28,7 @@ class CTearingControl {
|
|||
|
||||
SP<CWpTearingControlV1> resource;
|
||||
CWindow* pWindow = nullptr;
|
||||
wpTearingControlV1PresentationHint hint = PRESENTATION_HINT_VSYNC;
|
||||
wpTearingControlV1PresentationHint hint = WP_TEARING_CONTROL_V1_PRESENTATION_HINT_VSYNC;
|
||||
|
||||
friend class CTearingControlProtocol;
|
||||
};
|
||||
|
|
|
@ -11,19 +11,19 @@ CXDGDecoration::CXDGDecoration(SP<CZxdgToplevelDecorationV1> resource_, wl_resou
|
|||
resource->setSetMode([this](CZxdgToplevelDecorationV1*, zxdgToplevelDecorationV1Mode mode) {
|
||||
std::string modeString;
|
||||
switch (mode) {
|
||||
case zxdgToplevelDecorationV1Mode::MODE_CLIENT_SIDE: modeString = "MODE_CLIENT_SIDE"; break;
|
||||
case zxdgToplevelDecorationV1Mode::MODE_SERVER_SIDE: modeString = "MODE_SERVER_SIDE"; break;
|
||||
case ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE: modeString = "MODE_CLIENT_SIDE"; break;
|
||||
case ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE: modeString = "MODE_SERVER_SIDE"; break;
|
||||
default: modeString = "INVALID"; break;
|
||||
}
|
||||
|
||||
Debug::log(LOG, "[xdgDecoration] setMode: {}. {} MODE_SERVER_SIDE as reply.", modeString,
|
||||
(mode == zxdgToplevelDecorationV1Mode::MODE_SERVER_SIDE ? "Sending" : "Ignoring and sending"));
|
||||
resource->sendConfigure(zxdgToplevelDecorationV1Mode::MODE_SERVER_SIDE);
|
||||
(mode == ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE ? "Sending" : "Ignoring and sending"));
|
||||
resource->sendConfigure(ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
||||
});
|
||||
|
||||
resource->setUnsetMode([this](CZxdgToplevelDecorationV1*) {
|
||||
Debug::log(LOG, "[xdgDecoration] unsetMode. Sending MODE_SERVER_SIDE.");
|
||||
resource->sendConfigure(zxdgToplevelDecorationV1Mode::MODE_SERVER_SIDE);
|
||||
resource->sendConfigure(ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ void CXDGDecorationProtocol::destroyDecoration(CXDGDecoration* decoration) {
|
|||
|
||||
void CXDGDecorationProtocol::onGetDecoration(CZxdgDecorationManagerV1* pMgr, uint32_t id, wl_resource* xdgToplevel) {
|
||||
if (m_mDecorations.contains(xdgToplevel)) {
|
||||
wl_resource_post_error(pMgr->resource(), zxdgToplevelDecorationV1Error::ERROR_ALREADY_CONSTRUCTED, "Decoration object already exists");
|
||||
wl_resource_post_error(pMgr->resource(), ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ALREADY_CONSTRUCTED, "Decoration object already exists");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue