-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core: move to hyprwayland-scanner (#624)
nix: add hyprwayland-scanner dep flake.lock: update --------- Co-authored-by: Mihai Fufezan <[email protected]>
- Loading branch information
Showing
21 changed files
with
709 additions
and
867 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
#include "CursorShape.hpp" | ||
#include "hyprlock.hpp" | ||
#include "Seat.hpp" | ||
|
||
CCursorShape::CCursorShape(wp_cursor_shape_manager_v1* mgr) : mgr(mgr) { | ||
if (!g_pHyprlock->m_pPointer) | ||
CCursorShape::CCursorShape(SP<CCWpCursorShapeManagerV1> mgr) : mgr(mgr) { | ||
if (!g_pSeatManager->m_pPointer) | ||
return; | ||
|
||
dev = wp_cursor_shape_manager_v1_get_pointer(mgr, g_pHyprlock->m_pPointer); | ||
dev = makeShared<CCWpCursorShapeDeviceV1>(mgr->sendGetPointer(g_pSeatManager->m_pPointer->resource())); | ||
} | ||
|
||
void CCursorShape::setShape(const wp_cursor_shape_device_v1_shape shape) { | ||
void CCursorShape::setShape(const wpCursorShapeDeviceV1Shape shape) { | ||
if (!dev) | ||
return; | ||
|
||
wp_cursor_shape_device_v1_set_shape(dev, lastCursorSerial, shape); | ||
dev->sendSetShape(lastCursorSerial, shape); | ||
} | ||
|
||
void CCursorShape::hideCursor() { | ||
wl_pointer_set_cursor(g_pHyprlock->m_pPointer, lastCursorSerial, nullptr, 0, 0); | ||
g_pSeatManager->m_pPointer->sendSetCursor(lastCursorSerial, nullptr, 0, 0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
#pragma once | ||
|
||
#include <wayland-client.h> | ||
#include "cursor-shape-v1-protocol.h" | ||
#include "../defines.hpp" | ||
#include "cursor-shape-v1.hpp" | ||
|
||
class CCursorShape { | ||
public: | ||
CCursorShape(wp_cursor_shape_manager_v1* mgr); | ||
CCursorShape(SP<CCWpCursorShapeManagerV1> mgr); | ||
|
||
void setShape(const wp_cursor_shape_device_v1_shape shape); | ||
void setShape(const wpCursorShapeDeviceV1Shape shape); | ||
void hideCursor(); | ||
|
||
uint32_t lastCursorSerial = 0; | ||
|
||
private: | ||
wp_cursor_shape_manager_v1* mgr = nullptr; | ||
wp_cursor_shape_device_v1* dev = nullptr; | ||
SP<CCWpCursorShapeManagerV1> mgr = nullptr; | ||
SP<CCWpCursorShapeDeviceV1> dev = nullptr; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#pragma once | ||
|
||
#include <wayland-client.h> | ||
#include <memory> | ||
|
||
#include <EGL/egl.h> | ||
|
Oops, something went wrong.