Skip to content

Commit

Permalink
Fixed compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Nov 10, 2023
1 parent ac28be8 commit cf2bab6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ set_property(GLOBAL PROPERTY USE_FOLDERS YES)

project(plugdata VERSION 0.8.1 LANGUAGES C CXX)

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
message(STATUS "Disabled sfizz")
set(ENABLE_SFIZZ OFF)
endif()

add_subdirectory(Libraries/ EXCLUDE_FROM_ALL)

cmake_policy(SET CMP0091 NEW)
Expand Down
2 changes: 1 addition & 1 deletion Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ PluginEditor::PluginEditor(PluginProcessor& p)
pluginConstrainer.setMinimumSize(850, 650);
setUseBorderResizer(true);
#if JUCE_LINUX
OSUtils::updateX11Constraints(getPeer()->getWindowHandle());
OSUtils::updateX11Constraints(getPeer()->getNativeHandle());
#endif
}
else {
Expand Down
4 changes: 2 additions & 2 deletions Source/PluginMode.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class PluginMode : public Component {
}

#if JUCE_LINUX
OSUtils::updateX11Constraints(getPeer()->getWindowHandle());
OSUtils::updateX11Constraints(getPeer()->getNativeHandle());
#endif
editor->setSize(newWidth, newHeight);
setBounds(0, 0, newWidth, newHeight);
Expand All @@ -166,7 +166,7 @@ class PluginMode : public Component {
}

#if JUCE_LINUX
OSUtils::updateX11Constraints(getPeer()->getWindowHandle());
OSUtils::updateX11Constraints(getPeer()->getNativeHandle());
#endif

if (auto* tabbar = editor->getActiveTabbar()) {
Expand Down
6 changes: 4 additions & 2 deletions Source/Utility/OSUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#define JUCE_GUI_BASICS_INCLUDE_XHEADERS 1
#include <juce_gui_basics/juce_gui_basics.h>


#include "OSUtils.h"

#if defined(__APPLE__)
Expand Down Expand Up @@ -168,9 +170,9 @@ OSUtils::KeyboardLayout OSUtils::getKeyboardLayout()
#if defined(__unix__) && !defined(__APPLE__)


bool OSUtils::updateX11Constraints(void* handle)
void OSUtils::updateX11Constraints(void* handle)
{
XWindowSystem::getInstance()->updateConstraints(handle);
juce::XWindowSystem::getInstance()->updateConstraints(reinterpret_cast<::Window>(handle));
}

bool OSUtils::isX11WindowMaximised(void* handle)
Expand Down
2 changes: 1 addition & 1 deletion Source/Utility/OSUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct OSUtils {
#elif defined(__unix__) && !defined(__APPLE__)
static void maximiseX11Window(void* handle, bool shouldBeMaximised);
static bool isX11WindowMaximised(void* handle);
static void updateX11Constraints(void* handle)
static void updateX11Constraints(void* handle);
#elif JUCE_MAC
static void enableInsetTitlebarButtons(void* nativeHandle, bool enabled);
static void HideTitlebarButtons(void* view, bool hideMinimiseButton, bool hideMaximiseButton, bool hideCloseButton);
Expand Down

0 comments on commit cf2bab6

Please sign in to comment.