Skip to content

Commit

Permalink
Release 1.0.23
Browse files Browse the repository at this point in the history
* Updated build scripts.
* Updated module versions in dependencies.
  • Loading branch information
sadko4u committed Aug 2, 2024
2 parents 34e051e + d256dd1 commit 6ddcfe6
Show file tree
Hide file tree
Showing 15 changed files with 264 additions and 137 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
* RECENT CHANGES
*******************************************************************************

=== 1.0.23 ===
* Updated build scripts.
* Updated module versions in dependencies.

=== 1.0.22 ===
* Updated module versions in dependencies.

Expand Down
2 changes: 1 addition & 1 deletion include/lsp-plug.in/ws/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#define LSP_WS_LIB_MAJOR 1
#define LSP_WS_LIB_MINOR 0
#define LSP_WS_LIB_MICRO 22
#define LSP_WS_LIB_MICRO 23

#if defined(LSP_WS_LIB_PUBLISHER)
#define LSP_WS_LIB_PUBLIC LSP_EXPORT_MODIFIER
Expand Down
1 change: 1 addition & 0 deletions include/private/win/WinDDSurface.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ namespace lsp

public:
void sync_size();
void invalidate();
};

} /* namespace win */
Expand Down
9 changes: 5 additions & 4 deletions include/private/win/WinDisplay.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2023 Vladimir Sadovnikov <[email protected]>
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2024 Vladimir Sadovnikov <[email protected]>
*
* This file is part of lsp-ws-lib
* Created on: 1 июл. 2022 г.
Expand Down Expand Up @@ -89,7 +89,7 @@ namespace lsp
typedef lltl::pphash<char, font_t> custom_font_cache_t;

protected:
static volatile atomic_t hLock;
static atomic_t hLock;
static volatile DWORD nThreadId;
static HHOOK hMouseHook;
static HHOOK hKeyboardHook;
Expand All @@ -112,13 +112,14 @@ namespace lsp
WinDisplay *pNextHandler; // Next hook handler in the chain of handlers
lltl::parray<WinWindow> vGrab[__GRAB_TOTAL]; // Grab queue according to the priority
lltl::parray<WinWindow> sTargets; // Targets for event delivery
lltl::parray<WinWindow> vWindows; // All registered windows
HWND hClipWnd; // Clipboard window
IDataSource *pClipData; // Data source for clipboard
lltl::parray<void> vClipMemory; // Memory chunks allocated for the clipboard
WinWindow *pDragWindow; // Window which is currently acting in Drag&Drop action
ipc::Thread *pPingThread; // Pinger thread
volatile timestamp_t nLastIdleCall; // The time of last idle call
volatile atomic_t nIdlePending; // Number of idle requests pending
atomic_t nIdlePending; // Number of idle requests pending
LSPString sWindowClassName; // Window class name
LSPString sClipboardClassName; // Clipboard window class name

Expand Down
4 changes: 4 additions & 0 deletions include/private/win/WinWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ namespace lsp
void handle_mouse_leave();
void handle_mouse_enter(const ws::event_t *ev);
status_t set_geomety_impl();
void place_above(HWND wnd);
HWND placement_window(HWND wnd);
static HWND wrapping_window(HWND wnd);

public:
explicit WinWindow(WinDisplay *dpy, HWND wnd, IEventHandler *handler, bool wrapper);
Expand Down Expand Up @@ -189,6 +192,7 @@ namespace lsp
HWND win_handle();
WinDisplay *win_display();
WinDNDTarget *dnd_target();
void idle();
};
} /* namespace win */
} /* namespace ws */
Expand Down
2 changes: 1 addition & 1 deletion include/private/x11/X11Display.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ namespace lsp
} x11_screen_t;

private:
static volatile atomic_t hLock;
static atomic_t hLock;
static X11Display *pHandlers;
X11Display *pNextHandler;

Expand Down
8 changes: 4 additions & 4 deletions include/private/x11/X11Window.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2020 Vladimir Sadovnikov <[email protected]>
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2024 Vladimir Sadovnikov <[email protected]>
*
* This file is part of lsp-ws-lib
* Created on: 10 окт. 2016 г.
Expand Down Expand Up @@ -79,13 +79,13 @@ namespace lsp
static bool check_click(const btn_event_t *ev);
static bool check_double_click(const btn_event_t *pe, const btn_event_t *ce);
void send_focus_event();
status_t commit_size();
status_t commit_size(const ws::rectangle_t *new_size);

protected:

void calc_constraints(rectangle_t *dst, const rectangle_t *req);

status_t do_update_constraints(bool disable=false);
status_t do_update_constraints(bool disable);

public:
explicit X11Window(X11Display *core, size_t screen, ::Window wnd, IEventHandler *handler, bool wrapper);
Expand Down
13 changes: 9 additions & 4 deletions make/modules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,15 @@ $(ALL_SRC_MODULES) $(ALL_HDR_MODULES):
$(GIT) -C "$($(@)_PATH)" reset --hard
$(GIT) -C "$($(@)_PATH)" fetch origin --force --prune --prune-tags
$(GIT) -C "$($(@)_PATH)" fetch origin 'refs/tags/*:refs/tags/*' --force
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout -B "$($(@)_BRANCH)" "origin/$($(@)_BRANCH)" || \
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout "refs/tags/$($(@)_BRANCH)" || \
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout -B "$($(@)_NAME)-$($(@)_BRANCH)" "origin/$($(@)_NAME)-$($(@)_BRANCH)" || \
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout "refs/tags/$($(@)_NAME)-$($(@)_BRANCH)"
if $(GIT) -C "$($(@)_PATH)" rev-parse -q --verify "origin/$($(@)_BRANCH)" >/dev/null; then \
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout -B "$($(@)_BRANCH)" "origin/$($(@)_BRANCH)" >/dev/null; \
elif $(GIT) -C "$($(@)_PATH)" rev-parse -q --verify "refs/tags/$($(@)_BRANCH)" >/dev/null; then \
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout "refs/tags/$($(@)_BRANCH)"; \
elif $(GIT) -C "$($(@)_PATH)" rev-parse -q --verify "origin/$($(@)_NAME)-$($(@)_BRANCH)" >/dev/null; then \
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout -B "$($(@)_NAME)-$($(@)_BRANCH)" "origin/$($(@)_NAME)-$($(@)_BRANCH)"; \
else \
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout "refs/tags/$($(@)_NAME)-$($(@)_BRANCH)"; \
fi

fetch: $(SRC_MODULES) $(HDR_MODULES)

Expand Down
18 changes: 9 additions & 9 deletions modules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,55 +20,55 @@

#------------------------------------------------------------------------------
# Variables that describe source code dependencies
LSP_COMMON_LIB_VERSION := 1.0.36
LSP_COMMON_LIB_VERSION := 1.0.37
LSP_COMMON_LIB_NAME := lsp-common-lib
LSP_COMMON_LIB_TYPE := src
LSP_COMMON_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_COMMON_LIB_NAME).git
LSP_COMMON_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_COMMON_LIB_NAME).git

LSP_DSP_LIB_VERSION := 1.0.24
LSP_DSP_LIB_VERSION := 1.0.25
LSP_DSP_LIB_NAME := lsp-dsp-lib
LSP_DSP_LIB_TYPE := src
LSP_DSP_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_DSP_LIB_NAME).git
LSP_DSP_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_DSP_LIB_NAME).git

LSP_LLTL_LIB_VERSION := 1.0.19
LSP_LLTL_LIB_VERSION := 1.0.20
LSP_LLTL_LIB_NAME := lsp-lltl-lib
LSP_LLTL_LIB_TYPE := src
LSP_LLTL_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_LLTL_LIB_NAME).git
LSP_LLTL_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_LLTL_LIB_NAME).git

LSP_R3D_BASE_LIB_VERSION := 1.0.18
LSP_R3D_BASE_LIB_VERSION := 1.0.19
LSP_R3D_BASE_LIB_NAME := lsp-r3d-base-lib
LSP_R3D_BASE_LIB_TYPE := src
LSP_R3D_BASE_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_BASE_LIB_NAME).git
LSP_R3D_BASE_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_BASE_LIB_NAME).git

LSP_R3D_GLX_LIB_VERSION := 1.0.18
LSP_R3D_GLX_LIB_VERSION := 1.0.19
LSP_R3D_GLX_LIB_NAME := lsp-r3d-glx-lib
LSP_R3D_GLX_LIB_TYPE := src
LSP_R3D_GLX_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_GLX_LIB_NAME).git
LSP_R3D_GLX_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_GLX_LIB_NAME).git

LSP_R3D_IFACE_VERSION := 1.0.18
LSP_R3D_IFACE_VERSION := 1.0.19
LSP_R3D_IFACE_NAME := lsp-r3d-iface
LSP_R3D_IFACE_TYPE := src
LSP_R3D_IFACE_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_IFACE_NAME).git
LSP_R3D_IFACE_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_IFACE_NAME).git

LSP_R3D_WGL_LIB_VERSION := 1.0.13
LSP_R3D_WGL_LIB_VERSION := 1.0.14
LSP_R3D_WGL_LIB_NAME := lsp-r3d-wgl-lib
LSP_R3D_WGL_LIB_TYPE := src
LSP_R3D_WGL_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_WGL_LIB_NAME).git
LSP_R3D_WGL_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_WGL_LIB_NAME).git

LSP_RUNTIME_LIB_VERSION := 1.0.22
LSP_RUNTIME_LIB_VERSION := 1.0.23
LSP_RUNTIME_LIB_NAME := lsp-runtime-lib
LSP_RUNTIME_LIB_TYPE := src
LSP_RUNTIME_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_RUNTIME_LIB_NAME).git
LSP_RUNTIME_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_RUNTIME_LIB_NAME).git

LSP_TEST_FW_VERSION := 1.0.25
LSP_TEST_FW_VERSION := 1.0.26
LSP_TEST_FW_NAME := lsp-test-fw
LSP_TEST_FW_TYPE := src
LSP_TEST_FW_URL_RO := https://github.com/lsp-plugins/$(LSP_TEST_FW_NAME).git
Expand Down
2 changes: 1 addition & 1 deletion project.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ ARTIFACT_ID = LSP_WS_LIB
ARTIFACT_NAME = lsp-ws-lib
ARTIFACT_DESC = LSP window subsystem core library
ARTIFACT_HEADERS = lsp-plug.in
ARTIFACT_VERSION = 1.0.22
ARTIFACT_VERSION = 1.0.23

7 changes: 7 additions & 0 deletions src/main/win/WinDDSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ namespace lsp
}
}

void WinDDSurface::invalidate()
{
if (pShared != NULL)
pShared->Invalidate();
safe_release(pDC);
}

void WinDDSurface::sync_size()
{
if ((pShared == NULL) || (pShared->hWindow == NULL))
Expand Down
25 changes: 16 additions & 9 deletions src/main/win/WinDisplay.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2023 Vladimir Sadovnikov <[email protected]>
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
* (C) 2024 Vladimir Sadovnikov <[email protected]>
*
* This file is part of lsp-ws-lib
* Created on: 1 июл. 2022 г.
Expand Down Expand Up @@ -59,7 +59,7 @@ namespace lsp
static const char *CLIPBOARD_CLASS_NAME = "lsp-ws-lib::clipboard";

//-----------------------------------------------------------------
volatile atomic_t WinDisplay::hLock = 0;
atomic_t WinDisplay::hLock = 0;
volatile DWORD WinDisplay::nThreadId = 0;
WinDisplay *WinDisplay::pHandlers = NULL;
HHOOK WinDisplay::hMouseHook = NULL;
Expand Down Expand Up @@ -91,7 +91,7 @@ namespace lsp
pDragWindow = NULL;
pPingThread = NULL;
nLastIdleCall = 0;
nIdlePending = 0;
atomic_store(&nIdlePending, 0);
}

WinDisplay::~WinDisplay()
Expand All @@ -111,7 +111,7 @@ namespace lsp
bExit = false;

// Register window classes
sWindowClassName.fmt_ascii("%s", WINDOW_CLASS_NAME, this);
sWindowClassName.fmt_ascii("%s@%p", WINDOW_CLASS_NAME, this);

bzero(&wc, sizeof(wc));
wc.lpfnWndProc = window_proc;
Expand All @@ -125,7 +125,7 @@ namespace lsp
}

// Register clipboard window class
sClipboardClassName.fmt_ascii("%s", CLIPBOARD_CLASS_NAME, this);
sClipboardClassName.fmt_ascii("%s@%p", CLIPBOARD_CLASS_NAME, this);

bzero(&wc, sizeof(wc));
wc.lpfnWndProc = clipboard_proc;
Expand Down Expand Up @@ -285,7 +285,7 @@ namespace lsp
while (!ipc::Thread::is_cancelled())
{
// Post message if there was no idle loop for a long time
if (self->nIdlePending < 2)
if (atomic_load(&self->nIdlePending) < 2)
{
atomic_add(&self->nIdlePending, 1);
PostMessageW(self->hClipWnd, WM_USER, 0, 0);
Expand Down Expand Up @@ -1856,7 +1856,7 @@ namespace lsp
// Just increment the counter.
while (true)
{
atomic_t count = hLock;
atomic_t count = atomic_load(&hLock);
if (atomic_cas(&hLock, count, count + 1))
break;
}
Expand All @@ -1874,7 +1874,7 @@ namespace lsp
// before decrementing the counter
while (true)
{
atomic_t count = hLock;
atomic_t count = atomic_load(&hLock);
if (count == 1)
nThreadId = 0;
if (atomic_cas(&hLock, count, count - 1))
Expand Down Expand Up @@ -1987,6 +1987,13 @@ namespace lsp
{
ws::timestamp_t ts = system::get_time_millis();
dpy->process_pending_tasks(ts);
for (lltl::iterator<WinWindow> it = dpy->vWindows.values(); it; ++it)
{
WinWindow *wnd = it.get();
if (wnd != NULL)
wnd->idle();
}

atomic_add(&dpy->nIdlePending, -1);
return 0;
}
Expand Down
Loading

0 comments on commit 6ddcfe6

Please sign in to comment.