diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-08 16:50:23 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-08 16:50:23 +0100 |
commit | a7f414bba7f4fa306af30cdf52df6df85278ed62 (patch) | |
tree | 0a7e483b275e01421ca2945a6276c5f95ea5ba12 /Servers/WindowServer/WSClientConnection.h | |
parent | e09a02ad3f95c9622be803d4074b85a55b91c2fa (diff) | |
download | serenity-a7f414bba7f4fa306af30cdf52df6df85278ed62.zip |
LibGUI+WindowServer: Start fleshing out drag&drop functionality
This patch enables basic drag&drop between applications.
You initiate a drag by creating a GDragOperation object and calling
exec() on it. This creates a nested event loop in the calling program
that only returns once the drag operation has ended.
On the receiving side, you get a call to GWidget::drop_event() with
a GDropEvent containing information about the dropped data.
The only data passed right now is a piece of text that's also used
to visually indicate that a drag is happening (by showing the text in
a little box that follows the mouse cursor around.)
There are things to fix here, but we're off to a nice start. :^)
Diffstat (limited to 'Servers/WindowServer/WSClientConnection.h')
-rw-r--r-- | Servers/WindowServer/WSClientConnection.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Servers/WindowServer/WSClientConnection.h b/Servers/WindowServer/WSClientConnection.h index b7d3bc4987..707c882d2f 100644 --- a/Servers/WindowServer/WSClientConnection.h +++ b/Servers/WindowServer/WSClientConnection.h @@ -92,6 +92,7 @@ private: virtual OwnPtr<WindowServer::DestroyMenuAppletResponse> handle(const WindowServer::DestroyMenuApplet&) override; virtual OwnPtr<WindowServer::SetMenuAppletBackingStoreResponse> handle(const WindowServer::SetMenuAppletBackingStore&) override; virtual OwnPtr<WindowServer::InvalidateMenuAppletRectResponse> handle(const WindowServer::InvalidateMenuAppletRect&) override; + virtual OwnPtr<WindowServer::StartDragResponse> handle(const WindowServer::StartDrag&) override; HashMap<i32, NonnullOwnPtr<WSMenuApplet>> m_menu_applets; HashMap<int, NonnullRefPtr<WSWindow>> m_windows; |