hyprbars: fix type mismatch on 32-bit systems (#317)

This commit is contained in:
Jean-Louis Fuchs 2025-04-05 22:21:53 +02:00 committed by GitHub
parent 6dca4ece21
commit cef1854a54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -199,7 +199,7 @@ void CHyprBar::handleMovement() {
return; return;
} }
bool CHyprBar::doButtonPress(long int* const* PBARPADDING, long int* const* PBARBUTTONPADDING, long int* const* PHEIGHT, Vector2D COORDS, const bool BUTTONSRIGHT) { bool CHyprBar::doButtonPress(Hyprlang::INT* const* PBARPADDING, Hyprlang::INT* const* PBARBUTTONPADDING, Hyprlang::INT* const* PHEIGHT, Vector2D COORDS, const bool BUTTONSRIGHT) {
//check if on a button //check if on a button
float offset = **PBARPADDING; float offset = **PBARPADDING;
@ -368,7 +368,7 @@ void CHyprBar::renderBarTitle(const Vector2D& bufferSize, const float scale) {
cairo_surface_destroy(CAIROSURFACE); cairo_surface_destroy(CAIROSURFACE);
} }
size_t CHyprBar::getVisibleButtonCount(long int* const* PBARBUTTONPADDING, long int* const* PBARPADDING, const Vector2D& bufferSize, const float scale) { size_t CHyprBar::getVisibleButtonCount(Hyprlang::INT* const* PBARBUTTONPADDING, Hyprlang::INT* const* PBARPADDING, const Vector2D& bufferSize, const float scale) {
float availableSpace = bufferSize.x - **PBARPADDING * scale * 2; float availableSpace = bufferSize.x - **PBARPADDING * scale * 2;
size_t count = 0; size_t count = 0;

View file

@ -81,7 +81,7 @@ class CHyprBar : public IHyprWindowDecoration {
void handleDownEvent(SCallbackInfo& info, std::optional<ITouch::SDownEvent> touchEvent); void handleDownEvent(SCallbackInfo& info, std::optional<ITouch::SDownEvent> touchEvent);
void handleUpEvent(SCallbackInfo& info); void handleUpEvent(SCallbackInfo& info);
void handleMovement(); void handleMovement();
bool doButtonPress(long int* const* PBARPADDING, long int* const* PBARBUTTONPADDING, long int* const* PHEIGHT, Vector2D COORDS, bool BUTTONSRIGHT); bool doButtonPress(Hyprlang::INT* const* PBARPADDING, Hyprlang::INT* const* PBARBUTTONPADDING, Hyprlang::INT* const* PHEIGHT, Vector2D COORDS, bool BUTTONSRIGHT);
CBox assignedBoxGlobal(); CBox assignedBoxGlobal();
@ -102,7 +102,7 @@ class CHyprBar : public IHyprWindowDecoration {
// for dynamic updates // for dynamic updates
int m_iLastHeight = 0; int m_iLastHeight = 0;
size_t getVisibleButtonCount(long int* const* PBARBUTTONPADDING, long int* const* PBARPADDING, const Vector2D& bufferSize, const float scale); size_t getVisibleButtonCount(Hyprlang::INT* const* PBARBUTTONPADDING, Hyprlang::INT* const* PBARPADDING, const Vector2D& bufferSize, const float scale);
friend class CBarPassElement; friend class CBarPassElement;
}; };