fix layer delete order bug, fix and improve brush preview during the stroke, fix windows mouse capture (api works only on the main thread)
This commit is contained in:
@@ -953,10 +953,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
break;
|
||||
case WM_LBUTTONDOWN:
|
||||
{
|
||||
SetCapture(hWnd);
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
auto pt = lastPoint;
|
||||
tasklist.emplace_back([pt, extra, hWnd, p = WacomTablet::I.get_pressure()]{
|
||||
SetCapture(hWnd);
|
||||
kEventSource pointer_source;
|
||||
if (WacomTablet::I.m_ink_pen || WacomTablet::I.m_ink_touch)
|
||||
{
|
||||
@@ -974,11 +974,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
break;
|
||||
case WM_LBUTTONUP:
|
||||
{
|
||||
ReleaseCapture();
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
auto pt = lastPoint;
|
||||
tasklist.emplace_back([pt, extra] {
|
||||
WacomTablet::I.reset_pressure();
|
||||
ReleaseCapture();
|
||||
kEventSource pointer_source;
|
||||
if (WacomTablet::I.m_ink_pen || WacomTablet::I.m_ink_touch)
|
||||
{
|
||||
@@ -996,10 +996,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
break;
|
||||
case WM_RBUTTONDOWN:
|
||||
{
|
||||
SetCapture(hWnd);
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
auto pt = lastPoint;
|
||||
tasklist.emplace_back([pt, extra, hWnd] {
|
||||
SetCapture(hWnd);
|
||||
kEventSource pointer_source;
|
||||
if (WacomTablet::I.m_ink_pen || WacomTablet::I.m_ink_touch)
|
||||
{
|
||||
@@ -1017,10 +1017,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
break;
|
||||
case WM_RBUTTONUP:
|
||||
{
|
||||
ReleaseCapture();
|
||||
std::lock_guard<std::mutex> lock(task_mutex);
|
||||
auto pt = lastPoint;
|
||||
tasklist.emplace_back([pt, extra] {
|
||||
ReleaseCapture();
|
||||
kEventSource pointer_source;
|
||||
if (WacomTablet::I.m_ink_pen || WacomTablet::I.m_ink_touch)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user