mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
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. :^)
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 10:55:21 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a7f414bba7f
@@ -254,6 +254,7 @@ protected:
|
||||
virtual void leave_event(CEvent&);
|
||||
virtual void child_event(CChildEvent&) override;
|
||||
virtual void change_event(GEvent&);
|
||||
virtual void drop_event(GDropEvent&);
|
||||
|
||||
private:
|
||||
void handle_paint_event(GPaintEvent&);
|
||||
|
||||
Reference in New Issue
Block a user