From 86eae0f8df91d6523d5e7ea3908cbe55dee668c5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 24 Jan 2019 23:40:12 +0100 Subject: Let userland retain the window backing store while drawing into it. To start painting, call: gui$get_window_backing_store() Then finish up with: gui$release_window_backing_store() Process will retain the underlying GraphicsBitmap behind the scenes. This fixes racing between the WindowServer and GUI clients. This patch also adds a WSWindowLocker that is exactly what it sounds like. --- Userland/guitest.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Userland/guitest.cpp') diff --git a/Userland/guitest.cpp b/Userland/guitest.cpp index 8f48a5cc75..b6a0401f42 100644 --- a/Userland/guitest.cpp +++ b/Userland/guitest.cpp @@ -30,6 +30,7 @@ int main(int argc, char** argv) return 1; } + // NOTE: We never release the backing store. This is just a simple app. :^) GUI_WindowBackingStoreInfo backing; int rc = gui_get_window_backing_store(window_id, &backing); if (rc < 0) { -- cgit v1.2.3