renderer: add more uniforms to the screen shader (#11986)
These are: pointer_shape from the cursor-shape-v1 protocol prepared for v2, along with left_ptr...bottom_right_corner and killing (Hyprland specific)
pointer_shape_previous with
pointer_switch_time to blend between shapes
pointer_size scaled size as used by the normal cursor
pointer_pressed_positions[32] with
pointer_pressed_times[32] and
pointer_pressed_killed(32 bits) for click/touch animations and if they killed something
pointer_inactive_timeout with
pointer_last_active to smoothly fade the pointer out
pointer_hidden to hide it when the cursor is hidden (excluding by cursor:invisible as this config value can be used to turn off the normal cursor, which is useful when drawing it with the screen shader)
This commit is contained in:
parent
474cd004df
commit
46dab01bcc
11 changed files with 215 additions and 25 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include "../helpers/time/Timer.hpp"
|
||||
#include "../helpers/math/Math.hpp"
|
||||
#include "../helpers/time/Time.hpp"
|
||||
#include "../../protocols/cursor-shape-v1.hpp"
|
||||
|
||||
struct SMonitorRule;
|
||||
class CWorkspace;
|
||||
|
|
@ -108,8 +109,11 @@ class CHyprRenderer {
|
|||
std::vector<CHLBufferReference> m_usedAsyncBuffers;
|
||||
|
||||
struct {
|
||||
int hotspotX = 0;
|
||||
int hotspotY = 0;
|
||||
int hotspotX = 0;
|
||||
int hotspotY = 0;
|
||||
wpCursorShapeDeviceV1Shape shape = WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT;
|
||||
wpCursorShapeDeviceV1Shape shapePrevious = WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT;
|
||||
CTimer switchedTimer;
|
||||
std::optional<SP<CWLSurface>> surf;
|
||||
std::string name;
|
||||
} m_lastCursorData;
|
||||
|
|
@ -139,6 +143,7 @@ class CHyprRenderer {
|
|||
bool shouldBlur(WP<CPopup> p);
|
||||
|
||||
bool m_cursorHidden = false;
|
||||
bool m_cursorHiddenByCondition = false;
|
||||
bool m_cursorHasSurface = false;
|
||||
SP<CRenderbuffer> m_currentRenderbuffer = nullptr;
|
||||
SP<Aquamarine::IBuffer> m_currentBuffer = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue