mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibGUI: Don't accept drag events in AbstractView if it's not editable
With a new DragCopy cursor icon being used on accepted events, this caused a 'false assumption' that everything can be dropped into AbstractView. This will now only happen if the View is editable, which still isn't perfect, but at least the Settings app will no longer change cursors. Also note that we won't get "drag move" events as the comment below says, which disables automatic scrolling when dragging an element.
This commit is contained in:
@@ -770,7 +770,11 @@ void AbstractView::drag_enter_event(DragEvent& event)
|
||||
{
|
||||
if (!model())
|
||||
return;
|
||||
// NOTE: Right now, AbstractView always accepts drags since we won't get "drag move" events
|
||||
|
||||
if (!is_editable())
|
||||
return;
|
||||
|
||||
// NOTE: Right now, AbstractView accepts drags since we won't get "drag move" events
|
||||
// unless we accept the "drag enter" event.
|
||||
// We might be able to reduce event traffic by communicating the set of drag-accepting
|
||||
// rects in this widget to the windowing system somehow.
|
||||
|
||||
Reference in New Issue
Block a user