1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-21 10:11:00 +00:00
serenity/Services/WindowServer
Tom 75f61fe3d9 AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe
This makes most operations thread safe, especially so that they
can safely be used in the Kernel. This includes obtaining a strong
reference from a weak reference, which now requires an explicit
call to WeakPtr::strong_ref(). Another major change is that
Weakable::make_weak_ref() may require the explicit target type.
Previously we used reinterpret_cast in WeakPtr, assuming that it
can be properly converted. But WeakPtr does not necessarily have
the knowledge to be able to do this. Instead, we now ask the class
itself to deliver a WeakPtr to the type that we want.

Also, WeakLink is no longer specific to a target type. The reason
for this is that we want to be able to safely convert e.g. WeakPtr<T>
to WeakPtr<U>, and before this we just reinterpret_cast the internal
WeakLink<T> to WeakLink<U>, which is a bold assumption that it would
actually produce the correct code. Instead, WeakLink now operates
on just a raw pointer and we only make those constructors/operators
available if we can verify that it can be safely cast.

In order to guarantee thread safety, we now use the least significant
bit in the pointer for locking purposes. This also means that only
properly aligned pointers can be used.
2020-11-10 19:11:52 +01:00
..
AppletManager.cpp AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
AppletManager.h LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize 2020-06-10 10:59:04 +02:00
Button.cpp WindowServer: Fix flickering 2020-08-18 12:12:27 +02:00
Button.h Services: Convert WindowFrame button bitmaps to themable PNGs 2020-08-01 07:56:48 +02:00
ClientConnection.cpp LibGUI+WindowServer: Make DragOperation hold a MimeData instance 2020-11-08 21:46:13 +01:00
ClientConnection.h LibIPC: Share most of the code between {Client,Server}Connection 2020-09-12 14:49:29 +02:00
CMakeLists.txt Clipboard: Move the system clipboard to a dedicated service process :^) 2020-05-14 22:53:58 +02:00
Compositor.cpp WindowServer: Improve look of drag&drop items somewhat 2020-10-27 20:45:38 +01:00
Compositor.h WindowServer: Fix flickering 2020-08-18 12:12:27 +02:00
Cursor.cpp WindowServer+LibGfx: Add Gfx::StandardCursor::Hidden cursor 2020-11-02 20:58:07 +01:00
Cursor.h LibGfx: Move StandardCursor enum to LibGfx 2020-09-10 19:25:13 +02:00
Event.h LibGUI+WindowServer: Make DragOperation hold a MimeData instance 2020-11-08 21:46:13 +01:00
EventLoop.cpp LibIPC+Services: Make ClientConnection take socket as NonnullRefPtr 2020-07-06 13:30:11 +02:00
EventLoop.h Services: Renamed from Servers 2020-05-08 21:57:44 +02:00
main.cpp WindowServer+LibVT: Convert some dbgprintf() to dbg() 2020-08-18 17:19:52 +02:00
Menu.cpp LibGUI+LibGfx+WindowServer: Auto-generate disabled action icons :^) 2020-10-27 21:25:40 +01:00
Menu.h AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
MenuBar.cpp Services: Renamed from Servers 2020-05-08 21:57:44 +02:00
MenuBar.h Services: Renamed from Servers 2020-05-08 21:57:44 +02:00
MenuItem.cpp WindowServer: Add support for default MenuItem 2020-07-11 11:45:49 +02:00
MenuItem.h WindowServer: Add support for default MenuItem 2020-07-11 11:45:49 +02:00
MenuManager.cpp AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
MenuManager.h WindowServer: Make Menus the input window when showing them 2020-07-15 22:02:53 +02:00
Screen.cpp WindowServer: Close the framebuffer fd in ~Screen() 2020-08-17 18:05:35 +02:00
Screen.h Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
Window.cpp AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
Window.h LibGUI+WindowServer: Rename window "override cursor" to just "cursor" 2020-09-11 14:26:37 +02:00
WindowClient.ipc LibGUI+WindowServer: Make DragOperation hold a MimeData instance 2020-11-08 21:46:13 +01:00
WindowFrame.cpp WindowServer: Fix invalidating window frame 2020-09-07 19:39:48 +02:00
WindowFrame.h WindowServer: Fix flickering 2020-08-18 12:12:27 +02:00
WindowManager.cpp AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
WindowManager.h LibGUI+WindowServer: Make DragOperation hold a MimeData instance 2020-11-08 21:46:13 +01:00
WindowServer.ipc LibGUI+WindowServer: Make DragOperation hold a MimeData instance 2020-11-08 21:46:13 +01:00
WindowSwitcher.cpp AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
WindowSwitcher.h LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize 2020-06-10 10:59:04 +02:00
WindowType.h Services: Renamed from Servers 2020-05-08 21:57:44 +02:00