mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-12 22:55:53 +08:00
Compare commits
11 Commits
v2.3.2-alp
...
v2.3.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
210c2b70bd | ||
|
|
8320686e0d | ||
|
|
90f7a68695 | ||
|
|
0ed18c6b89 | ||
|
|
69a65e4725 | ||
|
|
4dddbb5816 | ||
|
|
894191d1cb | ||
|
|
f791a482b9 | ||
|
|
0ed9451430 | ||
|
|
28466eea10 | ||
|
|
1bdc95a498 |
@@ -53,7 +53,7 @@ include_directories (BEFORE SYSTEM ./ext/gtest/include)
|
||||
|
||||
if (UNIX)
|
||||
if (NOT APPLE)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
|
||||
# For config.h, detect the libraries, functions, etc.
|
||||
|
||||
14
README.md
14
README.md
@@ -1,7 +1,9 @@
|
||||
# Barrier
|
||||
|
||||
Eliminate the barrier between your machines.
|
||||
Find [releases here](https://github.com/debauchee/barrier/releases).
|
||||
Find [releases for windows and macOS here](https://github.com/debauchee/barrier/releases).
|
||||
Your distro probably already has barrier packaged for it, see [distro specific packages](#distro-specific-packages)
|
||||
below for a list. Alternatively, we also provide a [flatpak](https://github.com/flathub/com.github.debauchee.barrier).
|
||||
|
||||
### Contact info:
|
||||
|
||||
@@ -14,8 +16,9 @@ Master branch overall build status: [](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)
|
||||
* Windows Debug Build Status: [](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)
|
||||
* Windows Release Build Status: [](https://dev.azure.com/debauchee/Barrier/_build/latest?definitionId=1&branchName=master)
|
||||
* Snap: [](https://build.snapcraft.io/user/debauchee/barrier)
|
||||
|
||||
Our CI Builds are provided by Microsoft Azure Pipelines.
|
||||
Our CI Builds are provided by Microsoft Azure Pipelines, Flathub, and Canonical.
|
||||
|
||||
### What is it?
|
||||
|
||||
@@ -43,6 +46,13 @@ For short and simple questions or to just say hello find us on the Freenode IRC
|
||||
|
||||
At this time we are looking for developers to help fix the issues found in the issue tracker. Submit pull requests once you've polished up your patch and we'll review and possibly merge it.
|
||||
|
||||
## Distro specific packages
|
||||
|
||||
While not a comprehensive list, repology provides a decent list of distro
|
||||
specific packages.
|
||||
|
||||
[](https://repology.org/project/barrier/versions)
|
||||
|
||||
### FAQ
|
||||
|
||||
Q: Does drag and drop work on linux?
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
set B_BUILD_TYPE=%CI_ENV_BUILD_TYPE%
|
||||
set B_QT_ROOT=%cd%\deps\Qt
|
||||
set B_QT_VER=Qt5.12.3\5.12.3
|
||||
set B_QT_VER=Qt5.13.0\5.13.0
|
||||
set B_QT_MSVC=msvc2017_64
|
||||
set B_BONJOUR=%cd%\deps\BonjourSDKLike
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$qli_install_version = '2019.05.26.1'
|
||||
$qt_version = '5.12.3'
|
||||
$qt_version = '5.13.0'
|
||||
|
||||
New-Item -Force -ItemType Directory -Path ".\deps\"
|
||||
|
||||
|
||||
@@ -50,6 +50,8 @@ if exist bin\Debug (
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Cored.dll bin\Debug\ > NUL
|
||||
copy ..\ext\openssl\windows\x64\bin\* bin\Debug\ > NUL
|
||||
copy ..\res\openssl\barrier.conf bin\Debug\ > NUL
|
||||
mkdir bin\Debug\platforms
|
||||
copy %B_QT_FULLPATH%\plugins\platforms\qwindowsd.dll bin\Debug\platforms\ > NUL
|
||||
) else if exist bin\Release (
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Core.dll bin\Release\ > NUL
|
||||
copy %B_QT_FULLPATH%\bin\Qt5Gui.dll bin\Release\ > NUL
|
||||
|
||||
@@ -11,7 +11,7 @@ if (NOT DEFINED BARRIER_VERSION_MAJOR)
|
||||
if (DEFINED ENV{BARRIER_VERSION_MAJOR})
|
||||
set (BARRIER_VERSION_MAJOR $ENV{BARRIER_VERSION_MAJOR})
|
||||
else()
|
||||
set (BARRIER_VERSION_MAJOR 1)
|
||||
set (BARRIER_VERSION_MAJOR 2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -19,7 +19,7 @@ if (NOT DEFINED BARRIER_VERSION_MINOR)
|
||||
if (DEFINED ENV{BARRIER_VERSION_MINOR})
|
||||
set (BARRIER_VERSION_MINOR $ENV{BARRIER_VERSION_MINOR})
|
||||
else()
|
||||
set (BARRIER_VERSION_MINOR 9)
|
||||
set (BARRIER_VERSION_MINOR 3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -27,7 +27,7 @@ if (NOT DEFINED BARRIER_VERSION_PATCH)
|
||||
if (DEFINED ENV{BARRIER_VERSION_PATCH})
|
||||
set (BARRIER_VERSION_PATCH $ENV{BARRIER_VERSION_PATCH})
|
||||
else()
|
||||
set (BARRIER_VERSION_PATCH 0)
|
||||
set (BARRIER_VERSION_PATCH 2)
|
||||
message (WARNING "Barrier version wasn't set. Set to ${BARRIER_VERSION_MAJOR}.${BARRIER_VERSION_MINOR}.${BARRIER_VERSION_PATCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -118,7 +118,7 @@ private:
|
||||
void sendClipboardEvent(Event::Type type, ClipboardID id) const;
|
||||
|
||||
// message handlers
|
||||
bool onMouseMove(SInt32 mx, SInt32 my);
|
||||
bool onMouseMove(CGFloat mx, CGFloat my);
|
||||
// mouse button handler. pressed is true if this is a mousedown
|
||||
// event, false if it is a mouseup event. macButton is the index
|
||||
// of the button pressed using the mac button mapping.
|
||||
|
||||
@@ -1077,20 +1077,20 @@ OSXScreen::handleSystemEvent(const Event& event, void*)
|
||||
}
|
||||
|
||||
bool
|
||||
OSXScreen::onMouseMove(SInt32 mx, SInt32 my)
|
||||
OSXScreen::onMouseMove(CGFloat mx, CGFloat my)
|
||||
{
|
||||
LOG((CLOG_DEBUG2 "mouse move %+d,%+d", mx, my));
|
||||
LOG((CLOG_DEBUG2 "mouse move %+f,%+f", mx, my));
|
||||
|
||||
SInt32 x = mx - m_xCursor;
|
||||
SInt32 y = my - m_yCursor;
|
||||
CGFloat x = mx - m_xCursor;
|
||||
CGFloat y = my - m_yCursor;
|
||||
|
||||
if ((x == 0 && y == 0) || (mx == m_xCenter && mx == m_yCenter)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// save position to compute delta of next motion
|
||||
m_xCursor = mx;
|
||||
m_yCursor = my;
|
||||
m_xCursor = (SInt32)mx;
|
||||
m_yCursor = (SInt32)my;
|
||||
|
||||
if (m_isOnScreen) {
|
||||
// motion on primary screen
|
||||
@@ -1119,7 +1119,21 @@ OSXScreen::onMouseMove(SInt32 mx, SInt32 my)
|
||||
}
|
||||
else {
|
||||
// send motion
|
||||
sendEvent(m_events->forIPrimaryScreen().motionOnSecondary(), MotionInfo::alloc(x, y));
|
||||
// Accumulate together the move into the running total
|
||||
static CGFloat m_xFractionalMove = 0;
|
||||
static CGFloat m_yFractionalMove = 0;
|
||||
|
||||
m_xFractionalMove += x;
|
||||
m_yFractionalMove += y;
|
||||
|
||||
// Return the integer part
|
||||
SInt32 intX = (SInt32)m_xFractionalMove;
|
||||
SInt32 intY = (SInt32)m_yFractionalMove;
|
||||
|
||||
// And keep only the fractional part
|
||||
m_xFractionalMove -= intX;
|
||||
m_yFractionalMove -= intY;
|
||||
sendEvent(m_events->forIPrimaryScreen().motionOnSecondary(), MotionInfo::alloc(intX, intY));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user