forked from github_mirror/framelesshelper
minor tweaks
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
a89f19af96
commit
7b769a71a0
|
@ -25,7 +25,7 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
project(FramelessHelper
|
||||
VERSION 2.1.7.0
|
||||
VERSION 2.1.8.0
|
||||
DESCRIPTION "Cross-platform window customization framework for Qt Widgets and Qt Quick."
|
||||
HOMEPAGE_URL "https://github.com/wangwenx190/framelesshelper/"
|
||||
LANGUAGES CXX
|
||||
|
@ -80,6 +80,19 @@ set(CMAKE_AUTORCC ON)
|
|||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(PROJECT_VERSION_COMMIT "UNKNOWN")
|
||||
find_program(GIT_EXECUTABLE_PATH git)
|
||||
if(GIT_EXECUTABLE_PATH AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE_PATH} rev-parse HEAD
|
||||
OUTPUT_VARIABLE PROJECT_VERSION_COMMIT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endif()
|
||||
|
||||
set(PROJECT_COMPILE_DATETIME "UNKNOWN")
|
||||
string(TIMESTAMP PROJECT_COMPILE_DATETIME UTC)
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Gui)
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui)
|
||||
|
||||
|
|
|
@ -173,10 +173,8 @@ QT_END_NAMESPACE
|
|||
|
||||
FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||
|
||||
[[maybe_unused]] static constexpr const int FRAMELESSHELPER_VERSION_MAJOR = 2;
|
||||
[[maybe_unused]] static constexpr const int FRAMELESSHELPER_VERSION_MINOR = 1;
|
||||
[[maybe_unused]] static constexpr const int FRAMELESSHELPER_VERSION_PATCH = 7;
|
||||
[[maybe_unused]] static constexpr const int FRAMELESSHELPER_VERSION_TWEAK = 0;
|
||||
#include <framelesshelper_version.inc>
|
||||
|
||||
[[maybe_unused]] static constexpr const int FRAMELESSHELPER_VERSION =
|
||||
FRAMELESSHELPER_MAKE_VERSION(FRAMELESSHELPER_VERSION_MAJOR, FRAMELESSHELPER_VERSION_MINOR,
|
||||
FRAMELESSHELPER_VERSION_PATCH, FRAMELESSHELPER_VERSION_TWEAK);
|
||||
|
@ -495,16 +493,25 @@ struct SystemParameters
|
|||
};
|
||||
static_assert(std::size(WindowsVersions) == (static_cast<int>(WindowsVersion::_11_22H2) + 1));
|
||||
|
||||
struct VersionInfo
|
||||
{
|
||||
VersionNumber version = {};
|
||||
QString commit = {};
|
||||
QString compileDateTime = {};
|
||||
QString compiler = {};
|
||||
};
|
||||
|
||||
} // namespace Global
|
||||
|
||||
namespace FramelessHelper::Core
|
||||
{
|
||||
FRAMELESSHELPER_CORE_API void initialize();
|
||||
FRAMELESSHELPER_CORE_API void uninitialize();
|
||||
[[nodiscard]] FRAMELESSHELPER_CORE_API int version();
|
||||
[[nodiscard]] FRAMELESSHELPER_CORE_API Global::VersionInfo version();
|
||||
} // namespace FramelessHelper::Core
|
||||
|
||||
FRAMELESSHELPER_END_NAMESPACE
|
||||
|
||||
Q_DECLARE_METATYPE(FRAMELESSHELPER_PREPEND_NAMESPACE(Global)::VersionNumber)
|
||||
Q_DECLARE_METATYPE(FRAMELESSHELPER_PREPEND_NAMESPACE(Global)::SystemParameters)
|
||||
Q_DECLARE_METATYPE(FRAMELESSHELPER_PREPEND_NAMESPACE(Global)::VersionInfo)
|
||||
|
|
|
@ -44,6 +44,9 @@ public:
|
|||
|
||||
void set(const Global::Option option, const bool on = true);
|
||||
Q_NODISCARD bool isSet(const Global::Option option) const;
|
||||
|
||||
static void setLoadFromEnvironmentVariablesDisabled(const bool on = true);
|
||||
static void setLoadFromConfigurationFileDisabled(const bool on = true);
|
||||
};
|
||||
|
||||
FRAMELESSHELPER_END_NAMESPACE
|
||||
|
|
|
@ -33,7 +33,11 @@ set(SUB_PROJ_NAME ${PROJECT_NAME}${SUB_MOD_NAME})
|
|||
|
||||
set(INCLUDE_PREFIX ../../include/${PROJECT_NAME}/${SUB_MOD_NAME})
|
||||
|
||||
configure_file(framelesshelper_version.inc.in
|
||||
${PROJECT_BINARY_DIR}/framelesshelper_version.inc @ONLY)
|
||||
|
||||
set(SOURCES
|
||||
${PROJECT_BINARY_DIR}/framelesshelper_version.inc
|
||||
${INCLUDE_PREFIX}/framelesshelpercore_global.h
|
||||
${INCLUDE_PREFIX}/framelesshelper_qt.h
|
||||
${INCLUDE_PREFIX}/framelessmanager.h
|
||||
|
@ -62,7 +66,11 @@ endif()
|
|||
|
||||
if(WIN32 AND NOT FRAMELESSHELPER_BUILD_STATIC)
|
||||
enable_language(RC)
|
||||
list(APPEND SOURCES framelesshelpercore.rc)
|
||||
configure_file(framelesshelpercore.rc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/framelesshelpercore.rc @ONLY)
|
||||
list(APPEND SOURCES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/framelesshelpercore.rc
|
||||
)
|
||||
endif()
|
||||
|
||||
if(FRAMELESSHELPER_BUILD_STATIC)
|
||||
|
@ -132,4 +140,5 @@ target_link_libraries(${SUB_PROJ_NAME} PRIVATE
|
|||
target_include_directories(${SUB_PROJ_NAME} PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/${INCLUDE_PREFIX}"
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/${INCLUDE_PREFIX}/private"
|
||||
"$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>"
|
||||
)
|
||||
|
|
|
@ -60,6 +60,8 @@ struct ConfigData
|
|||
QMutex mutex;
|
||||
bool loaded = false;
|
||||
bool options[OptionCount] = {};
|
||||
bool disableEnvVar = false;
|
||||
bool disableCfgFile = false;
|
||||
};
|
||||
|
||||
Q_GLOBAL_STATIC(ConfigData, g_data)
|
||||
|
@ -92,10 +94,12 @@ void FramelessConfig::reload(const bool force)
|
|||
return new QSettings(appDir.filePath(kConfigFileName), QSettings::IniFormat);
|
||||
}());
|
||||
for (int i = 0; i != OptionCount; ++i) {
|
||||
const bool on = (qEnvironmentVariableIsSet(OptionsTable[i].env.constData())
|
||||
&& (qEnvironmentVariableIntValue(OptionsTable[i].env.constData()) > 0))
|
||||
|| (!configFile.isNull() && configFile->value(QUtf8String(OptionsTable[i].cfg), false).toBool());
|
||||
g_data()->options[i] = on;
|
||||
const bool envVar = (!g_data()->disableEnvVar
|
||||
&& qEnvironmentVariableIsSet(OptionsTable[i].env.constData())
|
||||
&& (qEnvironmentVariableIntValue(OptionsTable[i].env.constData()) > 0));
|
||||
const bool cfgFile = (!g_data()->disableCfgFile && !configFile.isNull()
|
||||
&& configFile->value(QUtf8String(OptionsTable[i].cfg), false).toBool());
|
||||
g_data()->options[i] = (envVar || cfgFile);
|
||||
}
|
||||
g_data()->loaded = true;
|
||||
}
|
||||
|
@ -112,4 +116,16 @@ bool FramelessConfig::isSet(const Option option) const
|
|||
return g_data()->options[static_cast<int>(option)];
|
||||
}
|
||||
|
||||
void FramelessConfig::setLoadFromEnvironmentVariablesDisabled(const bool on)
|
||||
{
|
||||
QMutexLocker locker(&g_data()->mutex);
|
||||
g_data()->disableEnvVar = on;
|
||||
}
|
||||
|
||||
void FramelessConfig::setLoadFromConfigurationFileDisabled(const bool on)
|
||||
{
|
||||
QMutexLocker locker(&g_data()->mutex);
|
||||
g_data()->disableCfgFile = on;
|
||||
}
|
||||
|
||||
FRAMELESSHELPER_END_NAMESPACE
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (C) 2022 by wangwenx190 (Yuhang Zhao)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
[[maybe_unused]] static constexpr const int FRAMELESSHELPER_VERSION_MAJOR = @PROJECT_VERSION_MAJOR@;
|
||||
[[maybe_unused]] static constexpr const int FRAMELESSHELPER_VERSION_MINOR = @PROJECT_VERSION_MINOR@;
|
||||
[[maybe_unused]] static constexpr const int FRAMELESSHELPER_VERSION_PATCH = @PROJECT_VERSION_PATCH@;
|
||||
[[maybe_unused]] static constexpr const int FRAMELESSHELPER_VERSION_TWEAK = @PROJECT_VERSION_TWEAK@;
|
||||
[[maybe_unused]] static constexpr const char FRAMELESSHELPER_VERSION_STR[] = "@PROJECT_VERSION@\0";
|
||||
[[maybe_unused]] static constexpr const char FRAMELESSHELPER_COMMIT_STR[] = "@PROJECT_VERSION_COMMIT@\0";
|
||||
[[maybe_unused]] static constexpr const char FRAMELESSHELPER_COMPILE_DATETIME[] = "@PROJECT_COMPILE_DATETIME@\0";
|
|
@ -476,28 +476,27 @@ void FramelessHelperWin::addWindow(const SystemParameters ¶ms)
|
|||
Utils::fixupQtInternals(windowId);
|
||||
Utils::updateInternalWindowFrameMargins(params.getWindowHandle(), true);
|
||||
Utils::updateWindowFrameMargins(windowId, false);
|
||||
static const bool isWin10OrGreater = Utils::isWindowsVersionOrGreater(WindowsVersion::_10_1507);
|
||||
if (isWin10OrGreater) {
|
||||
const FramelessConfig * const config = FramelessConfig::instance();
|
||||
if (!config->isSet(Option::DisableWindowsSnapLayouts)) {
|
||||
if (!createFallbackTitleBarWindow(windowId, data.params.isWindowFixedSize())) {
|
||||
qWarning() << "Failed to create the fallback title bar window.";
|
||||
static const bool isWin10RS1OrGreater = Utils::isWindowsVersionOrGreater(WindowsVersion::_10_1607);
|
||||
if (isWin10RS1OrGreater) {
|
||||
const bool dark = Utils::shouldAppsUseDarkMode();
|
||||
Utils::updateWindowFrameBorderColor(windowId, dark);
|
||||
static const bool isWin10RS5OrGreater = Utils::isWindowsVersionOrGreater(WindowsVersion::_10_1809);
|
||||
if (isWin10RS5OrGreater) {
|
||||
static const bool isQtQuickApplication = (params.getCurrentApplicationType() == ApplicationType::Quick);
|
||||
if (isQtQuickApplication) {
|
||||
// Causes some QtWidgets paint incorrectly, so only apply to Qt Quick applications.
|
||||
Utils::updateGlobalWin32ControlsTheme(windowId, dark);
|
||||
}
|
||||
}
|
||||
static const bool isWin10RS1OrGreater = Utils::isWindowsVersionOrGreater(WindowsVersion::_10_1607);
|
||||
if (isWin10RS1OrGreater) {
|
||||
const bool dark = Utils::shouldAppsUseDarkMode();
|
||||
Utils::updateWindowFrameBorderColor(windowId, dark);
|
||||
static const bool isWin10RS5OrGreater = Utils::isWindowsVersionOrGreater(WindowsVersion::_10_1809);
|
||||
if (isWin10RS5OrGreater) {
|
||||
static const bool isQtQuickApplication = (params.getCurrentApplicationType() == ApplicationType::Quick);
|
||||
if (isQtQuickApplication) {
|
||||
// Causes some QtWidgets paint incorrectly, so only apply to Qt Quick applications.
|
||||
Utils::updateGlobalWin32ControlsTheme(windowId, dark);
|
||||
}
|
||||
static const bool isWin11OrGreater = Utils::isWindowsVersionOrGreater(WindowsVersion::_11_21H2);
|
||||
if (isWin11OrGreater) {
|
||||
Utils::forceSquareCornersForWindow(windowId, !config->isSet(Option::WindowUseRoundCorners));
|
||||
static const bool isWin11OrGreater = Utils::isWindowsVersionOrGreater(WindowsVersion::_11_21H2);
|
||||
if (isWin11OrGreater) {
|
||||
const FramelessConfig * const config = FramelessConfig::instance();
|
||||
Utils::forceSquareCornersForWindow(windowId, !config->isSet(Option::WindowUseRoundCorners));
|
||||
// The fallback title bar window is only used to activate the Snap Layout feature
|
||||
// introduced in Windows 11, so it's not necessary to create it on systems below Win11.
|
||||
if (!config->isSet(Option::DisableWindowsSnapLayouts)) {
|
||||
if (!createFallbackTitleBarWindow(windowId, data.params.isWindowFixedSize())) {
|
||||
qWarning() << "Failed to create the fallback title bar window.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,0,0,0
|
||||
PRODUCTVERSION 2,1,7,0
|
||||
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PROJECT_VERSION_TWEAK@
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
|
@ -41,18 +41,19 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "wangwenx190"
|
||||
VALUE "FileDescription", "FramelessHelper Core Module"
|
||||
VALUE "FileVersion", "0.0.0.0"
|
||||
VALUE "LegalCopyright", "MIT License"
|
||||
VALUE "CompanyName", "wangwenx190\0"
|
||||
VALUE "FileDescription", "FramelessHelper Core Module\0"
|
||||
VALUE "FileVersion", "0.0.0.0\0"
|
||||
VALUE "LegalCopyright", "MIT License\0"
|
||||
#ifdef _DEBUG
|
||||
VALUE "OriginalFilename", "FramelessHelperCored.dll"
|
||||
VALUE "OriginalFilename", "FramelessHelperCored.dll\0"
|
||||
#else
|
||||
VALUE "OriginalFilename", "FramelessHelperCore.dll"
|
||||
VALUE "OriginalFilename", "FramelessHelperCore.dll\0"
|
||||
#endif
|
||||
VALUE "ProductName", "FramelessHelper"
|
||||
VALUE "ProductVersion", "2.1.7.0"
|
||||
VALUE "InternalName", "FramelessHelperCore"
|
||||
VALUE "ProductName", "FramelessHelper\0"
|
||||
VALUE "ProductVersion", "@PROJECT_VERSION@\0"
|
||||
VALUE "InternalName", "FramelessHelperCore\0"
|
||||
VALUE "Comments", "Built from commit @PROJECT_VERSION_COMMIT@ on @PROJECT_COMPILE_DATETIME@ (UTC).\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
|
@ -36,6 +36,30 @@
|
|||
# include "framelesshelper_win.h"
|
||||
#endif
|
||||
|
||||
#ifndef COMPILER_STRING
|
||||
# ifdef Q_CC_CLANG // Must be before GNU, because Clang claims to be GNU too.
|
||||
# define COMPILER_STRING __VERSION__ // Already includes the compiler's name.
|
||||
# elif defined(Q_CC_GHS)
|
||||
# define COMPILER_STRING "GHS " QT_STRINGIFY(__GHS_VERSION_NUMBER)
|
||||
# elif defined(Q_CC_GNU)
|
||||
# define COMPILER_STRING "GCC " __VERSION__
|
||||
# elif defined(Q_CC_MSVC)
|
||||
# if (_MSC_VER < 1910)
|
||||
# define COMPILER_STRING "MSVC 2015"
|
||||
# elif (_MSC_VER < 1917)
|
||||
# define COMPILER_STRING "MSVC 2017"
|
||||
# elif (_MSC_VER < 1930)
|
||||
# define COMPILER_STRING "MSVC 2019"
|
||||
# elif (_MSC_VER < 2000)
|
||||
# define COMPILER_STRING "MSVC 2022"
|
||||
# else
|
||||
# define COMPILER_STRING "MSVC version " QT_STRINGIFY(_MSC_VER)
|
||||
# endif
|
||||
# else
|
||||
# define COMPILER_STRING "UNKNOWN"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// The "Q_INIT_RESOURCE()" macro can't be used within a namespace,
|
||||
// so we wrap it into a separate function outside of the namespace and
|
||||
// then call it instead inside the namespace, that's also the recommended
|
||||
|
@ -325,6 +349,7 @@ void FramelessHelper::Core::initialize()
|
|||
qRegisterMetaType<ApplicationType>();
|
||||
qRegisterMetaType<VersionNumber>();
|
||||
qRegisterMetaType<SystemParameters>();
|
||||
qRegisterMetaType<VersionInfo>();
|
||||
}
|
||||
|
||||
void FramelessHelper::Core::uninitialize()
|
||||
|
@ -332,9 +357,20 @@ void FramelessHelper::Core::uninitialize()
|
|||
// Currently nothing to do here.
|
||||
}
|
||||
|
||||
int FramelessHelper::Core::version()
|
||||
VersionInfo FramelessHelper::Core::version()
|
||||
{
|
||||
return FRAMELESSHELPER_VERSION;
|
||||
static const VersionInfo result = []() -> VersionInfo {
|
||||
VersionInfo ver = {};
|
||||
ver.version.major = FRAMELESSHELPER_VERSION_MAJOR;
|
||||
ver.version.minor = FRAMELESSHELPER_VERSION_MINOR;
|
||||
ver.version.patch = FRAMELESSHELPER_VERSION_PATCH;
|
||||
ver.version.tweak = FRAMELESSHELPER_VERSION_TWEAK;
|
||||
ver.commit = QUtf8String(FRAMELESSHELPER_COMMIT_STR);
|
||||
ver.compileDateTime = QUtf8String(FRAMELESSHELPER_COMPILE_DATETIME);
|
||||
ver.compiler = QUtf8String(COMPILER_STRING);
|
||||
return ver;
|
||||
}();
|
||||
return result;
|
||||
}
|
||||
|
||||
FRAMELESSHELPER_END_NAMESPACE
|
||||
|
|
|
@ -65,6 +65,15 @@ using Display = struct _XDisplay;
|
|||
[[maybe_unused]] static constexpr const char GTK_THEME_PREFER_DARK_PROP[] = "gtk-application-prefer-dark-theme";
|
||||
FRAMELESSHELPER_STRING_CONSTANT2(GTK_THEME_DARK_REGEX, "[:-]dark")
|
||||
|
||||
FRAMELESSHELPER_BYTEARRAY_CONSTANT(rootwindow)
|
||||
FRAMELESSHELPER_BYTEARRAY_CONSTANT(x11screen)
|
||||
FRAMELESSHELPER_BYTEARRAY_CONSTANT(apptime)
|
||||
FRAMELESSHELPER_BYTEARRAY_CONSTANT(appusertime)
|
||||
FRAMELESSHELPER_BYTEARRAY_CONSTANT(gettimestamp)
|
||||
FRAMELESSHELPER_BYTEARRAY_CONSTANT(startupid)
|
||||
FRAMELESSHELPER_BYTEARRAY_CONSTANT(display)
|
||||
FRAMELESSHELPER_BYTEARRAY_CONSTANT(connection)
|
||||
|
||||
template<typename T>
|
||||
[[nodiscard]] static inline T gtkSetting(const gchar *propertyName)
|
||||
{
|
||||
|
@ -167,11 +176,11 @@ template<typename T>
|
|||
if (!native) {
|
||||
return 0;
|
||||
}
|
||||
QScreen *scr = ((screen == -1) ? QGuiApplication::primaryScreen() : x11_findScreenForVirtualDesktop(screen));
|
||||
QScreen *scr = ((screen == -1) ? QGuiApplication::primaryScreen() : x11_findScreenForVirtualDesktop(screen));
|
||||
if (!scr) {
|
||||
return 0;
|
||||
}
|
||||
return static_cast<xcb_window_t>(reinterpret_cast<quintptr>(native->nativeResourceForScreen(QByteArrayLiteral("rootwindow"), scr)));
|
||||
return static_cast<xcb_window_t>(reinterpret_cast<quintptr>(native->nativeResourceForScreen(krootwindow, scr)));
|
||||
}
|
||||
|
||||
[[maybe_unused]] [[nodiscard]] static inline int x11_appScreen()
|
||||
|
@ -183,7 +192,7 @@ template<typename T>
|
|||
if (!native) {
|
||||
return 0;
|
||||
}
|
||||
return reinterpret_cast<qintptr>(native->nativeResourceForIntegration(QByteArrayLiteral("x11screen")));
|
||||
return reinterpret_cast<qintptr>(native->nativeResourceForIntegration(kx11screen));
|
||||
}
|
||||
|
||||
[[maybe_unused]] [[nodiscard]] static inline quint32 x11_appTime()
|
||||
|
@ -199,7 +208,7 @@ template<typename T>
|
|||
if (!screen) {
|
||||
return 0;
|
||||
}
|
||||
return static_cast<xcb_timestamp_t>(reinterpret_cast<quintptr>(native->nativeResourceForScreen(QByteArrayLiteral("apptime"), screen)));
|
||||
return static_cast<xcb_timestamp_t>(reinterpret_cast<quintptr>(native->nativeResourceForScreen(kapptime, screen)));
|
||||
}
|
||||
|
||||
[[maybe_unused]] [[nodiscard]] static inline quint32 x11_appUserTime()
|
||||
|
@ -215,7 +224,7 @@ template<typename T>
|
|||
if (!screen) {
|
||||
return 0;
|
||||
}
|
||||
return static_cast<xcb_timestamp_t>(reinterpret_cast<quintptr>(native->nativeResourceForScreen(QByteArrayLiteral("appusertime"), screen)));
|
||||
return static_cast<xcb_timestamp_t>(reinterpret_cast<quintptr>(native->nativeResourceForScreen(kappusertime, screen)));
|
||||
}
|
||||
|
||||
[[maybe_unused]] [[nodiscard]] static inline quint32 x11_getTimestamp()
|
||||
|
@ -231,7 +240,7 @@ template<typename T>
|
|||
if (!screen) {
|
||||
return 0;
|
||||
}
|
||||
return static_cast<xcb_timestamp_t>(reinterpret_cast<quintptr>(native->nativeResourceForScreen(QByteArrayLiteral("gettimestamp"), screen)));
|
||||
return static_cast<xcb_timestamp_t>(reinterpret_cast<quintptr>(native->nativeResourceForScreen(kgettimestamp, screen)));
|
||||
}
|
||||
|
||||
[[maybe_unused]] [[nodiscard]] static inline QByteArray x11_nextStartupId()
|
||||
|
@ -243,7 +252,7 @@ template<typename T>
|
|||
if (!native) {
|
||||
return {};
|
||||
}
|
||||
return static_cast<char *>(native->nativeResourceForIntegration(QByteArrayLiteral("startupid")));
|
||||
return static_cast<char *>(native->nativeResourceForIntegration(kstartupid));
|
||||
}
|
||||
|
||||
[[maybe_unused]] [[nodiscard]] static inline Display *x11_display()
|
||||
|
@ -263,7 +272,7 @@ template<typename T>
|
|||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
|
||||
return native->display();
|
||||
#else
|
||||
return reinterpret_cast<Display *>(native->nativeResourceForIntegration(QByteArrayLiteral("display")));
|
||||
return reinterpret_cast<Display *>(native->nativeResourceForIntegration(kdisplay));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -284,7 +293,7 @@ template<typename T>
|
|||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
|
||||
return native->connection();
|
||||
#else
|
||||
return reinterpret_cast<xcb_connection_t *>(native->nativeResourceForIntegration(QByteArrayLiteral("connection")));
|
||||
return reinterpret_cast<xcb_connection_t *>(native->nativeResourceForIntegration(kconnection));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,11 @@ set(SOURCES
|
|||
|
||||
if(WIN32 AND NOT FRAMELESSHELPER_BUILD_STATIC)
|
||||
enable_language(RC)
|
||||
list(APPEND SOURCES framelesshelperquick.rc)
|
||||
configure_file(framelesshelperquick.rc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/framelesshelperquick.rc @ONLY)
|
||||
list(APPEND SOURCES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/framelesshelperquick.rc
|
||||
)
|
||||
endif()
|
||||
|
||||
if(FRAMELESSHELPER_BUILD_STATIC)
|
||||
|
@ -112,4 +116,5 @@ target_link_libraries(${SUB_PROJ_NAME} PUBLIC
|
|||
target_include_directories(${SUB_PROJ_NAME} PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/${INCLUDE_PREFIX}"
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/${INCLUDE_PREFIX}/private"
|
||||
"$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>"
|
||||
)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,0,0,0
|
||||
PRODUCTVERSION 2,1,7,0
|
||||
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PROJECT_VERSION_TWEAK@
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
|
@ -41,18 +41,19 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "wangwenx190"
|
||||
VALUE "FileDescription", "FramelessHelper Quick Module"
|
||||
VALUE "FileVersion", "0.0.0.0"
|
||||
VALUE "LegalCopyright", "MIT License"
|
||||
VALUE "CompanyName", "wangwenx190\0"
|
||||
VALUE "FileDescription", "FramelessHelper Quick Module\0"
|
||||
VALUE "FileVersion", "0.0.0.0\0"
|
||||
VALUE "LegalCopyright", "MIT License\0"
|
||||
#ifdef _DEBUG
|
||||
VALUE "OriginalFilename", "FramelessHelperQuickd.dll"
|
||||
VALUE "OriginalFilename", "FramelessHelperQuickd.dll\0"
|
||||
#else
|
||||
VALUE "OriginalFilename", "FramelessHelperQuick.dll"
|
||||
VALUE "OriginalFilename", "FramelessHelperQuick.dll\0"
|
||||
#endif
|
||||
VALUE "ProductName", "FramelessHelper"
|
||||
VALUE "ProductVersion", "2.1.7.0"
|
||||
VALUE "InternalName", "FramelessHelperQuick"
|
||||
VALUE "ProductName", "FramelessHelper\0"
|
||||
VALUE "ProductVersion", "@PROJECT_VERSION@\0"
|
||||
VALUE "InternalName", "FramelessHelperQuick\0"
|
||||
VALUE "Comments", "Built from commit @PROJECT_VERSION_COMMIT@ on @PROJECT_COMPILE_DATETIME@ (UTC).\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "quickstandardsystembutton_p.h"
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
#include <private/framelessmanager_p.h>
|
||||
#include <framelessmanager_p.h>
|
||||
#include <utils.h>
|
||||
#include <QtQuick/qquickwindow.h>
|
||||
#include <QtQuick/private/qquickitem_p.h>
|
||||
|
|
|
@ -50,7 +50,11 @@ set(SOURCES
|
|||
|
||||
if(WIN32 AND NOT FRAMELESSHELPER_BUILD_STATIC)
|
||||
enable_language(RC)
|
||||
list(APPEND SOURCES framelesshelperwidgets.rc)
|
||||
configure_file(framelesshelperwidgets.rc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/framelesshelperwidgets.rc @ONLY)
|
||||
list(APPEND SOURCES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/framelesshelperwidgets.rc
|
||||
)
|
||||
endif()
|
||||
|
||||
if(FRAMELESSHELPER_BUILD_STATIC)
|
||||
|
@ -101,4 +105,5 @@ target_link_libraries(${SUB_PROJ_NAME} PUBLIC
|
|||
target_include_directories(${SUB_PROJ_NAME} PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/${INCLUDE_PREFIX}"
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/${INCLUDE_PREFIX}/private"
|
||||
"$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>"
|
||||
)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,0,0,0
|
||||
PRODUCTVERSION 2,1,7,0
|
||||
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PROJECT_VERSION_TWEAK@
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
|
@ -41,18 +41,19 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "wangwenx190"
|
||||
VALUE "FileDescription", "FramelessHelper Widgets Module"
|
||||
VALUE "FileVersion", "0.0.0.0"
|
||||
VALUE "LegalCopyright", "MIT License"
|
||||
VALUE "CompanyName", "wangwenx190\0"
|
||||
VALUE "FileDescription", "FramelessHelper Widgets Module\0"
|
||||
VALUE "FileVersion", "0.0.0.0\0"
|
||||
VALUE "LegalCopyright", "MIT License\0"
|
||||
#ifdef _DEBUG
|
||||
VALUE "OriginalFilename", "FramelessHelperWidgetsd.dll"
|
||||
VALUE "OriginalFilename", "FramelessHelperWidgetsd.dll\0"
|
||||
#else
|
||||
VALUE "OriginalFilename", "FramelessHelperWidgets.dll"
|
||||
VALUE "OriginalFilename", "FramelessHelperWidgets.dll\0"
|
||||
#endif
|
||||
VALUE "ProductName", "FramelessHelper"
|
||||
VALUE "ProductVersion", "2.1.7.0"
|
||||
VALUE "InternalName", "FramelessHelperWidgets"
|
||||
VALUE "ProductName", "FramelessHelper\0"
|
||||
VALUE "ProductVersion", "@PROJECT_VERSION@\0"
|
||||
VALUE "InternalName", "FramelessHelperWidgets\0"
|
||||
VALUE "Comments", "Built from commit @PROJECT_VERSION_COMMIT@ on @PROJECT_COMPILE_DATETIME@ (UTC).\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
|
@ -27,7 +27,7 @@
|
|||
#include <QtGui/qpainter.h>
|
||||
#include <QtWidgets/qtooltip.h>
|
||||
#include <framelessmanager.h>
|
||||
#include <private/framelessmanager_p.h>
|
||||
#include <framelessmanager_p.h>
|
||||
#include <utils.h>
|
||||
|
||||
FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||
|
|
Loading…
Reference in New Issue