diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp index f5ef489d..83d18044 100644 --- a/distrho/src/DistrhoUI.cpp +++ b/distrho/src/DistrhoUI.cpp @@ -161,6 +161,10 @@ void UI::uiReshape(uint width, uint height) glViewport(0, 0, static_cast(width), static_cast(height)); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); +#else + // unused + (void)width; + (void)height; #endif } diff --git a/examples/CairoUI/DemoWidgetClickable.cc b/examples/CairoUI/DemoWidgetClickable.cc index d37dff71..4af38f95 100644 --- a/examples/CairoUI/DemoWidgetClickable.cc +++ b/examples/CairoUI/DemoWidgetClickable.cc @@ -64,17 +64,12 @@ void DemoWidgetClickable::onDisplay() bool DemoWidgetClickable::onMouse(const MouseEvent &event) { if (event.press) { - Point pos = getAbsolutePos(); - Size size = getSize(); - + int w = getWidth(); + int h = getHeight(); int mx = event.pos.getX(); int my = event.pos.getY(); - int px = pos.getX(); - int py = pos.getY(); - - bool inside = mx >= 0 && my >= 0 && - mx < size.getWidth() && my < size.getHeight(); + bool inside = mx >= 0 && my >= 0 && mx < w && my < h; if (inside) { colorid_ = (colorid_ + 1) % 3; repaint(); diff --git a/examples/CairoUI/PluginUI.cc b/examples/CairoUI/PluginUI.cc index a4985e8d..8b666f3e 100644 --- a/examples/CairoUI/PluginUI.cc +++ b/examples/CairoUI/PluginUI.cc @@ -46,7 +46,7 @@ void ExampleUI::onDisplay() cairo_paint(cr); } -void ExampleUI::parameterChanged(uint32_t index, float value) +void ExampleUI::parameterChanged(uint32_t, float) { }